2009 Jan 07 5:53 AM
Hi Frnds,
I am having a requirement to collect all the data declarations in a program ( Global variable, Internal table ..). How can we get the data declaration's in a program. please help me. Thanks.
2009 Jan 07 6:29 AM
Hello Anand
Obviously there should be standard function around because when you display a report in SE80 and open the folder Fields in the tree view you can see all global data definitions.
A useful function module is RS_PROGRAM_INDEX. The TABLES parameter COMPO returns all components of your program object:
Type D = data definitionRegards
Uwe
2009 Jan 07 5:57 AM
Hi,
You can check the data declarations in an include which ends with TOP or some other custom include.
or else you need to find it manually.
Usually there is a standard of declarations in the top include for any program. If you are following the same then you can find it over there.
Regards,
Venkatesh
2009 Jan 07 5:58 AM
try out these fm's
GET_COMPONENT_LIST -- Detailed description of fields from programs
GET_GLOBAL_SYMBOLS -- Returns all components of a program
also try this fm
GET_INCLUDETAB
it will give u all includes
кu03B1ятu03B9к
Edited by: kartik tarla on Jan 7, 2009 11:28 AM
2009 Jan 07 6:16 AM
Thanks kartik,
Get Global Symbols fm is working fine. But having one small problem with it,
It is listing some other standard fields with the declared fields in output.How to remove those unwanted entries.
From the list of variable retrieved from the em, How can i differntiate the list with global variable, Internal table and workarea for an internal table.
Like global variable,whether there is any function module for local variables. Thanks a lot.
2009 Jan 07 6:29 AM
Hello Anand
Obviously there should be standard function around because when you display a report in SE80 and open the folder Fields in the tree view you can see all global data definitions.
A useful function module is RS_PROGRAM_INDEX. The TABLES parameter COMPO returns all components of your program object:
Type D = data definitionRegards
Uwe