Ansicht
Dokumentation

ABENSQL_MAPPING_FROM_ENTITY_ABEXA - SQL MAPPING FROM ENTITY ABEXA

ABENSQL_MAPPING_FROM_ENTITY_ABEXA - SQL MAPPING FROM ENTITY ABEXA

General Data in Customer Master   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Statements with the Addition MAPPING FROM ENTITY

This example demonstrates statements using the additions MAPPING FROM ENTITY. The internal tables and work areas used in the example are typed with BDEF derived types. These types are based on a simple managed RAP BO.

Data model

The CDS data model consists of the root entity DEMO_MANAGED_ROOT_MAP and its child entity DEMO_MANAGED_CHILD_MAP which is not used in this example.

Root entity:

Behavior definition

The CDS behavior definition DEMO_MANAGED_ROOT_MAP is defined in CDS BDL as follows:

Behavior implementation

For the above CDS behavior definition, one ABP is created. The global class of the behavior pool is BP_DEMO_MANAGED_ROOT_MAP. It is not relevant in this example.

Source Code

Execute

Description

The example shows the four statements INSERT, MODIFY, UPDATE, and DELETE with the addition MAPPING FROM ENTITY. For each statement, a structure and an internal table are filled with sample values. Both structure and internal table are typed with the BDEF derived types TYPE STRUCTURE FOR and TYPE TABLE FOR respectively. After the statements, a SELECT statement is used to retrieve the entries from a database table and insert them into an internal table to visualize the effect of the statements.

The example for UPDATE also shows the addition INDICATORS SET STRUCTURE.






CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 3003 Date: 20240426 Time: 175510     sap01-206 ( 44 ms )