Hi all,
I am trying to pass values to a deep structure but not able to do so.
Kindly guide as what is the approach to assign values in such a scenario.
See below the details :
ZIFLIGHT (structure) : Inside this ZFLIGHT_TT (table type) : Inside this ZIFLIGHT_ALL (line type) : Inside this three structure : CONTROL, DATA & DATAX.
Control has 1 field, values has to be assigned to this field.
data and datax has got 11 fields each; values to be assigned to be this field.
ZIFLIGHT (Top structure)
|
ZFLIGHT_TT (table type)
|
ZIFLIGHT_ALL (line type)
|
CONTROL(structure with 1 field)
DATA(structure with 11 fields)
DATAX(structure with 11 fields)
I am trying to do it by using field-symbols e.g.
LOOP AT ITAB ASSIGNING <FS_ITAB>.
ASSIGN COMPONENT 'ZFLIGHT_TT' OF STRUCTURE ZIFLIGHTTO <FS_ZIFLIGHT>.
IF SY-SUBRC EQ 0.
ASSIGN COMPONENT 'ZIFLIGHT_ALL' OF STRUCTURE <FS_ZIFLIGHT> TO <FS_ZIFLIGHT_ALL>.
IF SY-SUBRC EQ 0.
ASSIGN COMPONENT 'CONTROL' OF STRUCTURE <FS_ZIFLIGHT_ALL> TO <FS_CONTROL>.
IF SY-SUBRC EQ 0.
<FS_CONTROL>-TASK = <FS_ITAB>-VALUE.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
But it is not working and giving me dumps. Tried various combinations but not working, kindly guide.
Thanks,
Pradeep