共計 1322 個字符,預計需要花費 4 分鐘才能閱讀完成。
這篇文章主要介紹“在 SAP ABAP 編程環境里怎么使用 CAP 模型創建 Fiori 應用”,在日常操作中,相信很多人在在 SAP ABAP 編程環境里怎么使用 CAP 模型創建 Fiori 應用問題上存在疑惑,丸趣 TV 小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”在 SAP ABAP 編程環境里怎么使用 CAP 模型創建 Fiori 應用”的疑惑有所幫助!接下來,請跟著丸趣 TV 小編一起來學習吧!
創建必須的 CDS view,激活,然后基于 CDS view 創建 behavior definition:
“`sql
@Semantics.user.createdBy: true
key holiday_id,
@Semantics.user.lastChangedBy: true
month_of_holiday,
@Semantics.systemDateTime.createdAt: true
day_of_holiday,
@Semantics.systemDateTime.lastChangedAt:true
changedat
“`
該 behavior definition 基于的 CDS view 為之前創建好的 ZCAL_I_HOLIDAY_JERRY:
這個 behavior definition 實現代碼如下:
“`abap
managed; // implementation in class zbp_cal_i_holiday_jerry unique;
define behavior for ZCAL_I_HOLIDAY_JERRY alias holidayRoot
persistent table ZCAL_HOLIDAY_001
lock master
This defines the root node as main locking object to avoid multiple persons editing the same object.
Sub nodes have to be defined as lock dependent later on.
//authorization master ( instance )
//etag master field_name
create;
update;
delete;
}
“`
基于 data definition 創建 service definition:
在 Service definition 里,將 CDS view 暴露出來,重命名為 HolidayRoot:
再基于 service definition 創建 service binding:
如果遇到語法錯誤,回過頭去檢查你的 behavior definition 或者 service definition 是否未激活。
service binding 成功創建后,激活,就可以通過 preview 按鈕,打開對應的 Fiori 應用了:
到此,關于“在 SAP ABAP 編程環境里怎么使用 CAP 模型創建 Fiori 應用”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注丸趣 TV 網站,丸趣 TV 小編會繼續努力為大家帶來更多實用的文章!