Created
January 17, 2018 08:55
-
-
Save svict4/fde577f06abba8bd8bcd61f9615c4eaf to your computer and use it in GitHub Desktop.
ABAP SAP CRM - Add node to a collection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATA: lr_entity TYPE REF TO if_bol_bo_property_access, | |
lr_node TYPE REF TO cl_bsp_wd_value_node, | |
lr_col TYPE REF TO if_bol_bo_col, | |
lr_node_struc TYPE REF TO <structure of your node>. | |
TRY. | |
lr_col ?= me->typed_context->node->collection_wrapper. | |
lr_col->clear( ). | |
CREATE DATA lr_node_struc. | |
CREATE OBJECT lr_node | |
EXPORTING | |
iv_data_ref = lr_node_struc. | |
lr_col->add( lr_node ). | |
ENDIF. | |
CATCH cx_root. | |
ENDTRY. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment