SAP ABAP RAP CRUD operation

Introduction

To enable the CRUD operations in SAP ABAP RAP managed scenario, you need to enable the transactional behavior in Behavior Definition. There is no need to explicitly implement the CRUD operation in behavior implementation class, the RAP framework itself handles this.

Steps for enabling CRUD in RAP Managed scenario

  1. Create CDS views
  2. Create Behavior Definition
  3. Enable transactional behavior of Business Object and activate.
  4. Test using EML (Entity Manipulation Language)

Create CDS views

Procedure

  1. Right-click on package
  2. Go to New >> Other Repository Objects >> Core Data Services >> Data Definition
  3. Provide the details (Name, Description).
  4. Select Next and provide the Transport Request number.
  5. Select Finish.

Interface view SAP RAP

Create Behavior Definition

Procedure

  1. Right-click on root CDS view
  2. Select New Behavior Definition
  3. Provide the details (Name, Description).
  4. Select Next and provide the Transport Request number.
  5. Select Finish.

Create Behavior Definition

Enable transactional behaviour and activate

Add transactional behaviour in Behavior Definition

Test using EML

In Report, implement EML statements to test the CRUD operations

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.