• 在SAP云平台ABAP编程环境里使用CAP模型创建Fiori应用


    创建必须的CDS view,激活,然后基于CDS view创建behavior definition:

    @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实现代码如下:

    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应用了:





    要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    反弹shell
    php-fpm(绕过open_basedir,结合ssrf)
    LNMP和LAMP的搭建
    linux常用命令 awk命令
    git 工作区管理
    linux常用命令 grep命令
    linux常用命令 print格式输出
    linux常用命令 cut字符截取命令
    linux常用命令 wc统计命令
    linux常用命令 sort排序命令
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/12315735.html
Copyright © 2020-2023  润新知