Skip to Content
author's profile photo Former Member
Former Member

FM for Variable and there type used in program .

Hi Expart,

Is there is any FM which return all the variable with there ref type (Data element ,C,id,t... like that ) when we pass the program name . i only know about RS_PROGRAM_INDEX which return all variable with in pgm .

and how to used FM " RS_PROGRAM_INDEX _SOURCE " It's may also return the variable and type .

Plz Plz help to get this

Thanks

Raju

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 11:52 AM

    Hi,

    I know for Internal Table use class CL_ABAP_STRUCTDESCR,

    Try this...

    DATA : l_descr_ref TYPE REF TO cl_abap_structdescr.

    l_descr_ref ?= cl_abap_typedescr=>describe_by_data( itab ).

    Now l_descr_ref->components holds the entire list of fields in itab.

    Thanks & Regards,

    ShreeMohan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 07:07 AM

    Go to Standard Program LSEMOF02

    and search for your FM RS_PROGRAM_INDEX_SOURCE

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 08:45 AM

    Try the function Module 'RS_PROGRAM_INDEX'. This returns all the components of the program.

    Also, check the FM 'GET_GLOBAL_SYMBOLS'.

    Edited by: jaya rangwani on Aug 12, 2009 10:48 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.