cancel
Showing results for 
Search instead for 
Did you mean: 

Managed RAP application - Create Header & Item data on single create

aman_mittal
Explorer
0 Kudos
880

Hi Team,

I have built a Managed non-draft RAP app having Header and Item data to be stored in custom tables. Using the mentioned approach, Is there way to firstly show user header data and then get line item data based on header data on same object page using some custom action (as user wants to see the details of line item and make changes to it) and on click on create button of header object page, all data can be stored to DB tables on single header object create button.

Thanks,

Aman Mittal

andre.fischer carine.tchoutouodjomo koradaramjee789

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Aman,

you can try to create a static action like this

static action createHeaderItem parameter Z_SOME_PARAMETER result [1] $self;

and in the implementation use EML to create a header and item using code like the following.


    DATA create_child_node_cba TYPE TABLE FOR zr_header_item_tp\_Item.
    DATA create_root_node TYPE TABLE FOR CREATE zr_header_item_tp.

    DATA create_child_node_cba_line TYPE STRUCTURE FOR CREATE zr_header_item_tp\_Item.
    DATA create_root_node_line TYPE STRUCTURE FOR CREATE zr_header_item_tp.  
"...
"fill create_root_node_line and create_child_node_cba_line
"and append to create_root_node and create_child_node_cba
"... MODIFY ENTITIES OF zr_header_item_tp IN LOCAL MODE ENTITY header CREATE FIELDS ( root_field_1 root_field_2 ) WITH create_root_node CREATE BY \_Item FIELDS ( child_field_1 child_field_2 ) WITH create_child_node_cba MAPPED mapped FAILED failed REPORTED reported.

Accepted Solutions (0)

Answers (0)