‎2019 Oct 07 3:03 PM
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.
‎2019 Oct 07 3:31 PM
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 ...
‎2019 Oct 07 3:53 PM
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 .
‎2019 Oct 07 4:06 PM
OK. What exactly is the symptom? Do you receive failed keys? Do you receive an error message in eo_message?
‎2019 Oct 08 6:22 AM
‎2019 Oct 08 7:29 AM
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 ...
‎2019 Oct 08 11:38 AM
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
‎2019 Oct 08 12:52 PM
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.
‎2019 Oct 08 2:21 PM
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
*&----------------------------------------------------------------------*
‎2023 Jul 06 8:15 AM
Hi Madjid,
Can you please provide the sample code, I am also facing the same issue.
‎2019 Oct 08 2:36 PM
I have removed tag that was irrelevant to products you're using.
‎2019 Oct 10 11:47 AM
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
