2023 Mar 02 11:03 AM
Hello Experts,
I have implemented the BADI and in that Badi I want to get the some field values from the structure ITEM_DATA which is inside I_TSW_NODE.
I have attached the three images for reference.. I want the structure which is present in the I_TSW_NODE------>ITEM_NODE ---->ITEM_DATA. These variablesimage1.pngimage2.pngimage3.png are defined with type ref to.
Please help me how to get the ITEM_DATA structure to another structure.
Regards,
Saran
2023 Mar 03 9:52 AM
Hi,
I have resolved on my own and the solution is as follows.
DATA(item_node_temp) = i_tsw_node->get_parent( ).
DATA(item_data) = item_node_temp->get_data( ).
DATA(ls_item) = item_data-item.
Thanks for the replies.
Regards,
Saran.
2023 Mar 02 12:01 PM
ITEM_DATA is private attribute. It can only be accessed in that class methods. Check "Where used" functionality on that attribute. Maybe you will find "Getter" or some other usefull method.
I do not have this class in my system, so I cannot check.
2023 Mar 02 6:26 PM
Please show the images instead of hyperlinks, in order to have both the text and the image in one place. It's even more useful when there are several images, it avoids the pain to open and close each of them separately and repeatedly.
2023 Mar 02 6:27 PM
2023 Mar 02 6:32 PM
First of all, I agree with Tomas.
It's always difficult to access a private member of a standard class because you don't know how the class works, how you need to instantiate it, which methods to call till you can access that member.
Sometimes it's not possible when the data is not stored persistently and the only solution is to use the Enhancement Framework to create a public method to access the private member.
2023 Mar 03 9:52 AM
Hi,
I have resolved on my own and the solution is as follows.
DATA(item_node_temp) = i_tsw_node->get_parent( ).
DATA(item_data) = item_node_temp->get_data( ).
DATA(ls_item) = item_data-item.
Thanks for the replies.
Regards,
Saran.