10-28-2015 2:18 PM
Hi Guys.
I have a object:
Inside it has :
and inside has a strutucre that i need .
how can i get this structure with this data?
I try assign but didnt work.
FIELD-SYMBOLS:<trq_id> type any.
ASSIGN COMPONENT 'TRQ_ID' of STRUCTURE IS_DATA to <trq_id>.
if <trq_id> is assigned.
endif.
Thanks
10-28-2015 2:45 PM
Try to derefence the IS_DATA (REF TO DATA?) with an ASSIGN ->*
* Dereference
ASSIGN is_data->* TO <structure>.
* Assign components
ASSIGN COMPONENT 'TRQ_ID' of STRUCTURE <structure> to <trq_id>.
Regards,
Raymond
10-28-2015 2:24 PM
Hi Ronaldo,
first part I want to check with you:
From where do you want to access the structure? if it is oustside of the class, check if you can "see" the structure is_data.
10-28-2015 2:34 PM
Hi,
IS_DATA is an object, so if the structure is public, you can simply access by
local_structure = IS_DATA->structure.
if the structure is private you have to write a method to get it outside the object.
(if the structure is static public, you access it by IS_DATA=>strucutre)
regards
Stefan Seeburger
10-28-2015 2:46 PM
IS_DATA is an object,
on the first screenshot it shows that is_data is a structure...
is_data is a reference on data, not a reference on an instance of a class (object),
and guessing from the Type of the structure it is dynamically created
10-28-2015 2:45 PM
Try to derefence the IS_DATA (REF TO DATA?) with an ASSIGN ->*
* Dereference
ASSIGN is_data->* TO <structure>.
* Assign components
ASSIGN COMPONENT 'TRQ_ID' of STRUCTURE <structure> to <trq_id>.
Regards,
Raymond
10-28-2015 2:52 PM
you were faster, this should work,
let me explain what went wrong:
as is_data is a reference and no structure itself it has no component with the name trq_id
is_data->* is no reference anymore, it represents the value that reference is pointing on
10-28-2015 4:17 PM