Skip to Content
0
Former Member
Jul 01, 2009 at 02:52 PM

Passing Field Symbols in FM

631 Views

Hi Friends,

In my FM, i want to pass field symbol back to my main program for further use. How can i achieve the same.

In my source code section of FM,

FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,
                 
               <fs_dyntable>,
               <fs_fldval> TYPE ANY,
               <fs_col1>,<fs_col2>.
  DATA : t_newtable TYPE REF TO data,t_newline  TYPE REF TO data,t_fldcat TYPE lvc_t_fcat.


  CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog           = t_fldcat
    IMPORTING
      ep_table                  = t_newtable
    EXCEPTIONS
      generate_subpool_dir_full = 1
      OTHERS                    = 2.

  ASSIGN t_newtable->* TO <t_dyntable>.
  CREATE DATA t_newline LIKE LINE OF <t_dyntable>.

i want to pass <t_dyntable> back to my prg but i am not getting how to pass it and where to write it.

Please guide me.

Thanks and Regards,

Gaurav