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

Field symbols ?

I would like to pass the DREF variable as parameter to the class method. How should I define the parameter ?

Would the TYPING METHOD be 'DREF' and Associated type 'DATA'?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 03, 2006 at 11:22 PM

    Not sure what you are trying to do yet, but I think you want to do something like this.

    data: dref type ref to data.


    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • For example, when creating a dynamic internal table.

      report  zrich_0002.
      field-symbols: <dyn_table> type standard table,
      data: new_table type ref to data.
      data: it_fldcat type lvc_t_fcat,
            wa_it_fldcat type lvc_s_fcat.
      data: index(2) type c.
      do 10 times.
        index = sy-index.
        clear wa_it_fldcat.
        concatenate 'Field' index into
                 wa_it_fldcat-fieldname .
        condense  wa_it_fldcat-fieldname no-gaps.
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 5.
        append wa_it_fldcat to it_fldcat .
      * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
          it_fieldcatalog = it_fldcat
          ep_table        = new_table.
      assign new_table->* to <dyn_table>.
      check sy-subrc = 0.


      Rich Heilman

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.