Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Modify a delegate node in BOPF

Madjid_Khanevadegi
Participant
0 Likes
4,929

Hello,

I am using the BOPF API to try and modify a delegated BO node. Specifically i am using the /bobf/if_tra_service_manager->modify() method to try and update a delegated node in TRQ business object. I am able to modify nodes of the host object and its item but have not been able to modify the delegated object. Any insight that you might have on how to accomplish this would be much appreciated.

Thank you.

11 REPLIES 11
Read only

ivo_vollrath
Product and Topic Expert
Product and Topic Expert
0 Likes
3,709

In order to access an entity of the dependent object (DO) from within an entity implementation (e.g. action) of the host object (HO), the node key of the DO must be mapped to the HO. (This is because the same dependent object could be included multiple times in the same host object. However each node key of a business object must be unique.)

Use method GET_CONTENT_KEY_MAPPING of the configuration of the host object (/bobf/cl_frw_factory=>get_configuration) in order to receive the valid key of an entity of the dependent object. Parameters of this method:

IV_CONTENT_CAT (E.g. /BOBF/IF_CONF_C=>SC_CONTENT_ACT for an action, /BOBF/IF_CONF_C=>SC_CONTENT_NOD for a node, ...)

IV_DO_CONTENT_KEY Key of the entity, taken from the DO’s constants interface

IV_DO_ROOT_NODE_KEY Key of the representation node, taken from the Host Object‘s constants interface

EV_CONTENT_KEY Mapped key of the entity. This can be used to address this entity by the help of core services like retrieve, do_action , modify ...

Read only

0 Likes
3,709

thank you Ivo Vollrath

i can get and read delegated node data with that method, but can not update it . i want update the delegated field with modify method of BO service manager .

Read only

ivo_vollrath
Product and Topic Expert
Product and Topic Expert
0 Likes
3,709

OK. What exactly is the symptom? Do you receive failed keys? Do you receive an error message in eo_message?

Read only

0 Likes
3,709

No error messages are received

and no update any

Read only

ivo_vollrath
Product and Topic Expert
Product and Topic Expert
0 Likes
3,709

Hard to guess. there could be many reasons. Did you check the change object for failed changes? ... The field you want to change may be read-only (check the properties) ... There could be an authority check kicking in ...

Have you tried retrieving the modified instance immediately after modifying it, using the same service manager? If that would work, the problem may be located somewhere in the process after the modify call ...

Read only

0 Likes
3,709

I followed what you said,
but does not solved the problem
the problem may be with parameters being sent to "MODIFY" structure.
can i send my code for you?

thanks

Read only

ivo_vollrath
Product and Topic Expert
Product and Topic Expert
0 Likes
3,709

As long as the code is reduced to its essentials, you can post it here. There are probably other users who have much more practical experience with dependent objects than I do. Let's see if anyone is able to help.

Read only

0 Likes
3,709

thank you so much
this is my sample program , it is simple for test
in this example for forwarding order "2100000061" we want make update in TransportCharges BO

*&----------------------------------------------------------------------*
*& Report ZTEST1
*&----------------------------------------------------------------------*
Read only

0 Likes
3,709

Hi Madjid,

Can you please provide the sample code, I am also facing the same issue.

Read only

denis_konovalov
Active Contributor
0 Likes
3,709

I have removed tag that was irrelevant to products you're using.

Read only

Madjid_Khanevadegi
Participant
0 Likes
3,709

with the sample code "ZTEST2" i could update the TransportChare deligated node of TRQ bo

i have a new requirement

in TransportChare BO it has a sub node with name "ChargeItem" how to update it ? from TRQ BO

thanks