on 11-21-2020 4:56 PM
Dear Experts,
I have a CBO requirement in which I have 2 nodes and One Custom Action Button to Refresh Item Data.
> Header Node - contains Customer data
> Item Node - Customer related Material Data
When I click on Refresh action/Button, the Material Qty should be updated with current available Qty. I am using API to get the Qty value and I am able to collect final data that needs to be updated in CBO,
I am reading
> Header data using LO_NODE = write->get_root
> Item Data using association->to_child_data( )
I am unable to update the existing Item records for the customer with Qty from Internal Table.
Thanks in Advance.
Regards,
-Pravin
Hello Pravin,
You can use the get_children method.
DATA lv_botest_key TYPE yy1_kr_botest.
lv_botest_key = '4'.
DATA(lo_botest) = write->get_root(
business_object_id = 'YY1_BOTEST'
key = lv_botest_key
).
DATA(lt_children) = lo_botest->get_children( node_id = 'bochild' ).
DATA lo_child LIKE LINE OF lt_children.
DATA ls_bochild TYPE yy1_bochild_botest.
LOOP AT lt_children INTO lo_child.
lo_child->get( IMPORTING data = ls_bochild ).
ls_bochild-field1 = 'update'.
lo_child->update(
CHANGING data = ls_bochild
).
ENDLOOP.
Fore more information, please check Code Samples to Write Data from Determinations or Actions to Custom Business Objects
Thank you,
Andrea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.