on 09-07-2017 10:20 AM
Hello,
I have an issue with accessing a structure from REF TO DATA object, which I get as an export parameter (ER_ENTITYSET) from a method. The object is dynamic generated.
The requirement is to change a value in the structure TOCNIT.
The problem is to access the very complex consturction of this object.
I have attached a screenshot of my debugger view. Left of the view is my class implementation with the method. As you can see, I have tried a many possibilities, but I did not found the right way.
On the right side of the screenshot you can see the structure of ER_ENTITYSET.
Buy the way, the class does not provide any methods to get the data singly.
Do you have any suggestions?
Thanks and best regards.
Alexander
It looks like common table. So try something like this:
FIELD-SYMBOLS <table> type standard table.
ASSIGN er_entityset->* TO <table>.
LOOP AT <table> ASSIGNING FIELD-SYMBOL(<line>).
CLEAR sy-subrc.
WHILE sy-subrc = 0.
ASSIGN COMPONENT sy-index OF STRUCTURE <line> TO FIELD-SYMBOL(<field>).
CHECK sy-subrc = 0.
WRITE:/ <field>. "<-- here is field value
ENDWHILE.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy,
thank you for your fast replay! That works fine.
Regards
Alexander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.