Recently, I got into issue of getting local structure declared in another program.
Initially, I though of re-declaration again in current program than I thought of searching of generic function or class which can give me locally declared structure from different program.
After due diligence & search I found FM - GET_COMPONENT_LIST.
SO I have created program A which has local declaration of structure as below.
TYPES: BEGIN OF ty_headout,
out001(40) TYPE c,
out002(40) TYPE c,
out003(40) TYPE c,
out004(40) TYPE c,
out005(40) TYPE c,
out006(40) TYPE c,
out007(40) TYPE c,
out008(40) TYPE c,
out009(40) TYPE c,
out010(40) TYPE c,
End OF ty_headout.
Data: wa_output TYPE ty_headout. "#EC NEEDED
By using FM - GET_COMPONENT_LIST, we can get list of structure component.
Regards,
Sameer