如何将事务行为添加到核心数据服务 (CDS)

Step 1: Open Eclipse

  1. Go to your ABAP package created in Create and Expose a Core Data Services Based on a Database Table and open your data definition ZI_BOOKING_XXX to add following statement: root

    Open Eclipse

  2. Save and activate.

    Open Eclipse

Done

Log on to answer question

Step 2: Open other repository object

Right-click on your package and navigate to New > Other ABAP Repository Object from the appearing context menu.

Open other repository object

Done

Log on to answer question

Step 3: Create behavior definition

  1. Navigate to Core Data Services, select Behavior Definition and press Next.

     

    Create behavior definition

  2. Create a behavior definition for booking node/entities.

     

    Create behavior definition

  3. Click Finish to complete your transport request.

     

    Create behavior definition

  4. Check result. An empty behavior definition for unmanaged implementation is created.

    Create behavior definition

Done

Log on to answer question

Step 4: Implement behavior definition

  1. Provide an alias (booking) and specify the lock master. Define the table field LastChangedAt for the ETag handling. Replace the following coding:

    swift

    Copy

        implementation unmanaged;
        define behavior for ZI_BOOKING_XXX alias booking
        lock master
        etag LastChangedAt
        {
          create;
          update;
          delete;
        }
    
  1.  
  2. Save and activate.

    Implement behavior definition

Done

Log on to answer question

Step 5: Create behavior implementation

  1. Right-click on your behavior definition and select New Behavior Implementation.

    Create behavior implementation

  2. Provide a name and click Next.

     

    Create behavior implementation

  3. Provide a transport request if required and cli

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值