| Terms | Notes |
| RAP business objects (RAP BO) | - A RAP BO is based on a special, tree-like hierarchical structure of [CDS entities](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_entity_glosry.htm "Glossary Entry") of a data model - Such a structure of entities can consist of [parent entities](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenparent_entity_glosry.htm "Glossary Entry") and [child entities](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenchild_entity_glosry.htm "Glossary Entry") that are themselves defined using [CDS compositions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_composition_glosry.htm "Glossary Entry") and [to-parent associations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abento_parent_association_glosry.htm "Glossary Entry"). - The top parent entity of a [CDS composition tree](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_composition_tree_glosry.htm "Glossary Entry") is the root entity that represents the business object. With a large composition tree, RAP BOs can be fairly complex. Or they can be very simple by just consisting of one root entity alone. - Note: There is a special syntax for the [CDS root entity](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenroot_entity_glosry.htm) of a RAP BO: [`define root view entity`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_define_root_view_v2.htm) |
| [RAP behavior definition](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_behavior_definition_glosry.htm "Glossary Entry") (BDEF) | - RAP BOs are described by the definitions specified in a special [DDIC](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddic_glosry.htm "Glossary Entry") artifact: RAP behavior definition (BDEF) - A BDEF defines the [RAP business object behavior](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_bo_behavior_glosry.htm "Glossary Entry") (i. e. the transactional behavior of a RAP BO) - Transactional behavior means a BDEF defines [behavior characteristics](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_entity_properties_glosry.htm "Glossary Entry") and [RAP BO operations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_bo_operation_glosry.htm "Glossary Entry") i. e. [RAP BO standard operations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_standard_operation_glosry.htm "Glossary Entry") ([CRUD operations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencrud_glosry.htm "Glossary Entry")), [non-standard operations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_nstandard_operation_glosry.htm "Glossary Entry") like specific [RAP actions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_action_glosry.htm "Glossary Entry") and [functions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_function_glosry.htm "Glossary Entry"), and more. - There are many other things that can be included impacting the RAP BO behavior like [RAP feature control](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_feature_control_glosry.htm "Glossary Entry"), for example, defining which data is mandatory and which is read-only, or [determinations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_determination_glosry.htm "Glossary Entry") and [validations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_validation_glosry.htm "Glossary Entry"). - BDEFs use [Behavior Definition Language](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbdl_glosry.htm "Glossary Entry") (BDL) for the definitions. Find more information on the topic and various options to define the transactional behavior in section [BDL for Behavior Definitions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbdl.htm) in the ABAP Keyword Documentation. |
| Transactional buffer and implementation types | - A BDEF defines the behavior of a RAP BO and, thus, how to handle its data. This data is available in the [RAP transactional buffer](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentransactional_buffer_glosry.htm "Glossary Entry"). - It is a storage for a RAP BO's data that is used and worked on during an [SAP LUW](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensap_luw_glosry.htm). - This data includes [RAP BO instances](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_bo_instance_glosry.htm "Glossary Entry") (i. e. concrete data sets of an entity). This is where EML enters the picture: EML is used, among others, to access this data in the transactional buffer. - Currently, there are two kinds of RAP BOs: [managed](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenmanaged_rap_bo_glosry.htm "Glossary Entry") and [unmanaged RAP BOs](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenunmanaged_rap_bo_glosry.htm "Glossary Entry"). - Managed and unmanaged are implementation types that are also specified in the BDEF. - The implementation type determines the [RAP BO provider](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_bo_provider_glosry.htm "Glossary Entry"), i. e. how the transactional buffer is provided and how the behavior of a RAP BO is implemented. |
| Managed RAP BOs | - The managed RAP BO provider fully or partly provides the transactional buffer and RAP BO behavior (for standard operations only). In this case, the developers need not cater for the transactional buffer and implement the standard operations. This implementation is mostly relevant for greenfield scenarios when starting from scratch. - Example: Regarding CRUD operations in managed RAP BOs, developers need not cater for an implementation at all. The standard operations work out of the box. For example, in case of an update operation, RAP BO instance data that is to be updated is automatically read into the transactional buffer, and then updated accordingly there. Finally, when triggering the saving, the updated instance in the transactional buffer is automatically saved to the database without any custom development needed. - The transactional buffer is provided, too. You do not need to create the buffer yourself. - Note: Usually, the behavior of a RAP BO requires some additional implementations also in the context of managed RAP BOs. For example, non-standard operations or feature controls must be self-implemented in [ABAP behavior pools](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbehavior_pool_glosry.htm "Glossary Entry") (see the details further down). |
| Unmanaged RAP BOs | - Everything must be provided by the [unmanaged RAP BO provider](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenunmanaged_rap_bo_prov_glosry.htm "Glossary Entry"), i. e. the transactional buffer and all RAP BO operations must be provided or self-implemented by developers in an ABAP behavior implementation - Unmanaged RAP BOs are, for example, relevant for brownfield scenarios, i. e. in scenarios in which transactional buffers and application logic is already available and should be embedded in the RAP world. Note that it is possible to have a managed RAP BO with unamanged parts, e.g. unamanged save or additional save. Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbdl_rap_bo.htm). |
| ABAP behavior implementation in an ABAP behavior pool (ABP) | - An [ABAP behavior pool](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbehavior_pool_glosry.htm "Glossary Entry") is a special [class pool](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclass_pool_glosry.htm "Glossary Entry") for an ABAP behavior implementation that implements the unmanaged RAP BO provider based on definitions in a BDEF. The class pool's name is specified in the BDEF. - The [global class](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenglobal_class_glosry.htm "Glossary Entry") of a behavior pool does not implement the behavior itself. It is empty on creation apart from the declaration and implementation part skeletons. The behavior implementation is coded in local [RAP handler classes](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabp_handler_class_glosry.htm "Glossary Entry") and a [RAP saver class](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabp_saver_class_glosry.htm "Glossary Entry") in the [CCIMP include](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenccimp_glosry.htm "Glossary Entry") of the behavior pool. These classes are called by the [RAP runtime engine](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_runtime_engine_glosry.htm "Glossary Entry") when the RAP BO is accessed. This is covered in more detail further down. - Usually, saver classes are not needed in managed RAP BOs (except for special variants of managed RAP BOs such as [RAP additional save](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_add_save_glosry.htm) and [RAP unmanaged save](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_unman_save_glosry.htm)). Local handler classes are usually needed in managed RAP BOs if implementations are required that go beyond standard operations. - Note: In more complex scenarios, with RAP BOs that consist of many entities, you can define behavior pools for individual entities by adding the syntax to the [`define behavior for`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbdl_define_beh.htm) notation. There is not a saver class for each entity but only one saver class for the BO as a whole. Any number of behavior pools can be assigned to a BDEF allowing applications a structuring into multiple units. |
| Component | Notes | Code Snippet |
|---|---|---|
| [`%cid`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_cid.htm), [`%cid_ref`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_cid_ref.htm) | - [`%cid`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_cid.htm) is a string to define a content ID. - Content IDs are used as a unique and preliminary identifier for RAP BO operations in which instances are created and especially in cases where the key values of RAP BO instances are not yet determined - Assume that you create a RAP BO instance with an EML create request and the key value has not yet been determined. In the same request - a save has not yet been triggered - an update is requested for this RAP BO instance. Using the content ID, it is guaranteed that the update operation happens for the desired instance. For this purpose, derived types for operations like update or delete include the component [`%cid_ref`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_cid_ref.htm) to refer to the content ID `%cid` as the name implies. - Note: You should always fill `%cid` even if not needed. The specified content ID is only valid within one ABAP EML request. You can use the optional addition [`AUTO FILL CID`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_fields.htm#!ABAP_ONE_ADD@1@) in EML modify operations to create `%cid` automatically. However, if you use this addition, you cannot refer to `%cid` in subsequent operations. | ``` abap MODIFY ENTITIES OF zdemo_abap_rap_ro_m ENTITY root CREATE FROM VALUE #( %control-key_field = if_abap_behv=>mk-on %control-field1 = if_abap_behv=>mk-on %control-field2 = if_abap_behv=>mk-on %control-field3 = if_abap_behv=>mk-on %control-field4 = if_abap_behv=>mk-on ( %cid = 'cid5' key_field = 5 field1 = 'iii' field2 = 'jjj' field3 = 50 field4 = 51 ) ) UPDATE FIELDS ( field1 field3 field4 ) WITH VALUE #( ( %cid_ref = 'cid5' field1 = 'up_kkk' field2 = 'up_lll' "Value not considered field3 = 500 field4 = 501 ) ) MAPPED FINAL(mapped) FAILED FINAL(failed) REPORTED FINAL(reported). ``` |
| [`%key`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_key.htm), [`%tky`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_tky.htm) | - Both are component groups summarizing all primary keys of a RAP BO instance. - Where possible, it is recommended that you use `%tky` instead of `%key`. `%tky` includes `%key` and also the draft indicator `%is_draft`. When using `%tky` in non-draft scenarios, you are prepared for a potential, later switch to a draft scenario. In doing so, you can avoid lots of adaptations in your code by manually adding the indicator. | The code snippet visualizes various specification options regarding `%key` and `%tky` as component groups, emphasizing how contained components may be accessed and that these component groups can contain further component groups. ``` abap MODIFY ENTITY zdemo_abap_rap_ro_m CREATE FROM VALUE #( %control = VALUE #( key_field = if_abap_behv=>mk-on field1 = if_abap_behv=>mk-on field2 = if_abap_behv=>mk-on field3 = if_abap_behv=>mk-on field4 = if_abap_behv=>mk-on ) ( %cid = 'cid1' %key-key_field = 1 field1 = 'aaa' field2 = 'bbb' field3 = 10 field4 = 11 ) ( %cid = 'cid2' %key = VALUE #( key_field = 2 ) field1 = 'ccc' field2 = 'ddd' field3 = 20 field4 = 21 ) ( %cid = 'cid3' key_field = 3 field1 = 'eee' field2 = 'fff' field3 = 30 field4 = 31 ) ( %cid = 'cid4' %data-%key-key_field = 4 field1 = 'ggg' field2 = 'hhh' field3 = 40 field4 = 41 ) ( %cid = 'cid5' %data-key_field = 5 field1 = 'iii' field2 = 'jjj' field3 = 50 field4 = 51 ) ) "Other options for referring to the key besides using %key "are demonstrated. UPDATE FIELDS ( field2 ) WITH VALUE #( ( %key-key_field = 1 field2 = 'up1' ) ( key_field = 2 field2 = 'up2' ) ( %tky-%key-key_field = 3 field2 = 'up3' ) ( %tky-key_field = 4 field2 = 'up4' ) ( %tky-%pky-%key-key_field = 5 field2 = 'up5' ) ( %tky-%pky-key_field = 6 field2 = 'up6' ) ( %pky-key_field = 7 field2 = 'up7' ) ( %pky-%key-key_field = 8 field2 = 'up8' ) ( %data-%key-key_field = 9 field2 = 'up9' ) ( %data-key_field = 10 field2 = 'up10' ) ) MAPPED FINAL(mapped) FAILED FINAL(failed) REPORTED FINAL(reported). ``` |
| [`%control`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_control.htm) | - Structured component that is a component of many BDEF derived types. It contains the names of all key and data fields of a RAP BO instance, which indicate flags. - For example, it is used to get information on which fields are provided or set a flag for which fields are requested by RAP BO providers or RAP BO consumers respectively during the current EML request. - For this purpose, the value of each field in the `%control` structure is of type `ABP_BEHV_FLAG`. For the value setting, you can use the structured constant `mk` of interface `IF_ABAP_BEHV`. Note that the technical type is `x length 1`. - Example: If you want to read data from a RAP BO instance and particular non-key fields in `%control` are set to `if_abap_behv=>mk-off`, the values of these fields are not returned in the result. | ``` abap MODIFY ENTITY zdemo_abap_rap_ro_m CREATE FROM VALUE #( %control-key_field = if_abap_behv=>mk-on %control-field1 = if_abap_behv=>mk-on %control-field2 = if_abap_behv=>mk-on %control-field3 = if_abap_behv=>mk-on %control-field4 = if_abap_behv=>mk-on ( %cid = 'cid1' key_field = 1 field1 = 'aaa' field2 = 'bbb' field3 = 10 field4 = 11 ) ( %cid = 'cid2' key_field = 2 field1 = 'ccc' field2 = 'ddd' field3 = 20 field4 = 21 ) ) MAPPED FINAL(mapped) FAILED FINAL(failed) REPORTED FINAL(reported). ``` |
| [%is_draft](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_is_draft.htm) | - Represents the draft indicator - Used in [RAP draft handling](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENRAP_DRAFT_HANDLING_GLOSRY.html) and indicates whether a RAP BO instance is active or not. A RAP BO instance with the draft indicator set to true represents a [RAP draft instance](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_draft_instance_glosry.htm), e.g. created by a create operation. A commit triggers the saving of the instance to a [draft table](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendraft_table_glosry.htm). - Is contained in `%tky` - Is of type `ABP_BEHV_FLAG` | ``` abap MODIFY ENTITY zdemo_abap_rap_draft_m CREATE AUTO FILL CID FIELDS ( num1 arithm_op num2 ) WITH VALUE #( ( %is_draft = if_abap_behv=>mk-on num1 = 1 arithm_op = '+' num2 = 2 ) ( %is_draft = if_abap_behv=>mk-on num1 = 2 arithm_op = '*' num2 = 4 ) ( %is_draft = if_abap_behv=>mk-on num1 = 3 arithm_op = '-' num2 = 5 ) ( %is_draft = if_abap_behv=>mk-on num1 = 1 arithm_op = '/' num2 = 4 ) ( %is_draft = if_abap_behv=>mk-on num1 = 2 arithm_op = 'P' num2 = 5 ) ) FAILED FINAL(f) REPORTED FINAL(r) MAPPED FINAL(m). ``` |
| [%target](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapderived_types_target.htm) | - Used to address compositions such as child entities in create operations. - Includes the target's primary key and data fields. | ``` abap MODIFY ENTITIES OF zdemo_abap_rap_ro_m ENTITY root CREATE FIELDS ( key_field field1 field2 field3 field4 ) WITH VALUE #( ( %cid = 'cid_cba' key_field = 9 field1 = 'qqq' field2 = 'rrr' field3 = 90 field4 = 91 ) ) CREATE BY \_child FIELDS ( key_ch field_ch1 field_ch2 ) WITH VALUE #( ( %cid_ref = 'cid_cba' %target = VALUE #( ( %cid = 'cid_ch1' key_ch = 9 field_ch1 = 'aaa_ch' field_ch2 = 99 ) ( %cid = 'cid_ch2' key_ch = 10 field_ch1 = 'bbb_ch' field_ch2 = 100 ) ) ) ) MAPPED FINAL(mapped) FAILED FINAL(failed) REPORTED FINAL(reported). ``` |
| Variant/Addition | Notes |
| Short form of `COMMIT ENTITIES` |
The following snippet shows a create operation. This operation has only
an impact on the database with the `COMMIT ENTITIES` statement.
Triggering the save sequence means that the execution of the statement
triggers the calling of the saver methods available in the saver class
of a behavior implementation. In managed scenarios (except for some
special variants), the saving is done automatically without implementing
a dedicated saver method. Optionally, you can specify the `RESPONSES` addition followed by a data object of type `ABP_BEHV_RESPONSE_TAB` to retrieve information returned by the response parameters of RAP saver methods.
```abap MODIFY ENTITIES OF root_ent ENTITY root_ent CREATE FIELDS ( key_field field1 field2 ) WITH VALUE #( ( %cid = 'cid' key_field = 7 field1 = 'K' field2 = 'L' ) ) MAPPED DATA(mapped) FAILED DATA(failed) REPORTED DATA(rep). COMMIT ENTITIES. IF sy-subrc <> 0. ... ENDIF. ... "Some modifications DATA f_resp TYPE abp_behv_response_tab. DATA r_resp TYPE abp_behv_response_tab. "Note: Inline declarations for the data objects are also possible. COMMIT ENTITIES RESPONSES FAILED f_resp REPORTED r_resp. IF sy-subrc <> 0. ... ENDIF. ``` |
| Long form of `COMMIT ENTITIES` |
The long syntax form includes the retrieval of information for one or more RAP BO entities. Root entities must be specified.
``` abap COMMIT ENTITIES RESPONSE OF zdemo_abap_rap_ro_m FAILED DATA(f1) REPORTED DATA(r1) RESPONSE OF zdemo_abap_rap_draft_m FAILED DATA(f2) REPORTED DATA(r2). IF sy-subrc <> 0. ... ENDIF. ``` |
| Dynamic form of `COMMIT ENTITIES` |
The dynamic syntax form allows you to retrieve RAP responses from RAP saver methods by dynamically specifying one or more RAP BO root entities.
``` abap DATA: root_name1 TYPE abp_root_entity_name VALUE 'ZDEMO_ABAP_RAP_RO_M', root_name2 TYPE abp_root_entity_name VALUE 'ZDEMO_ABAP_RAP_DRAFT_M', failed_resp TYPE abp_behv_response_tab. DATA(dyn_tab) = VALUE abp_entity_name_tab( ( root_name1 ) ( root_name2 ) ). COMMIT ENTITIES RESPONSES OF dyn_tab FAILED failed_resp REPORTED DATA(reported_resp). IF sy-subrc <> 0. ... ENDIF. ``` |
| Specifying a commit scope |
- Especially used in late numbering scenarios to get the final keys from the preliminary keys (using the [`CONVERT KEY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapconvert_key.htm) addition)
- The commit scope is opened by `COMMIT ENTITIES BEGIN ...` (`...` stands for further syntax options such as the specification of `RESPONSES ...` or `RESPONSE OF ...` ), and closed by `COMMIT ENTITIES END.`.
``` abap COMMIT ENTITIES BEGIN. ... "CONVERT KEY OF some_bo FROM ...-%pid TO DATA(some_key). "For example, converting the preliminary keys (e.g. %pid components) "based on entries in the MAPPED table of a RAP BO entity. "Using a CONVERT KEY statement, you can retrieve the final keys of "individual instances, and store them in a local variable. COMMIT ENTITIES END. ``` |
| Simulating a commit |
- The optional `IN SIMULATION MODE` addition can be specified with `COMMIT ENTITIES` statements allowing a RAP transaction to be checked.
- With this addition, only the RAP early save phase is processed without saving data, i.e. a final `COMMIT WORK` is not performed.
- The addition can be used to check the consistency of the transaction by evaluating, for example, the `sy-subrc` value as a result of executing the commit in simulation mode.
``` abap DELETE FROM zdemo_abap_rapt1. DO 2 TIMES. MODIFY ENTITIES OF zdemo_abap_rap_ro_m ENTITY root CREATE FIELDS ( key_field ) AUTO FILL CID WITH VALUE #( ( key_field = 100 ) ) MAPPED DATA(m1) FAILED DATA(f1) REPORTED DATA(r1). IF sy-index = 1. COMMIT ENTITIES IN SIMULATION MODE. ELSE. COMMIT ENTITIES. ENDIF. IF sy-subrc <> 0. ... ENDIF. SELECT FROM zdemo_abap_rapt1 FIELDS key_field ORDER BY key_field INTO TABLE @DATA(tab). IF sy-index = 1. ASSERT tab IS INITIAL. "Clearing the transactional buffer ROLLBACK ENTITIES. ELSE. ASSERT lines( tab ) = 1. ASSERT tab[ 1 ]-key_field = 100. ENDIF. ENDDO. ``` |