Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Assign statement does not work...

Hello Experts, 

I am trying to pass the value of a field to a field-symbol but it does not work.
Please check my code below:

TYPES: BEGIN OF t_itab_name,
            itab_name TYPE char30,
           END OF t_itab_name.

DATA: lt_itab_name  TYPE STANDARD TABLE OF t_itab_name,
      wa_itab_name  LIKE LINE OF lt_itab_name.

FIELD-SYMBOLS: <fs_itab> TYPE table.

REFRESH lt_itab_name.
    DEFINE m_fill_itab_name.
      wa_itab_name-itab_name  = &1.
      append wa_itab_name to lt_itab_name.
      clear wa_itab_name.

    m_fill_itab_name 'ZSD_OUTPUT_ACQ'.
    m_fill_itab_name 'ZSD_OUTPUT_RET'.
    m_fill_itab_name 'ZSD_OUTPUT_NET'.

LOOP AT lt_itab_name INTO wa_itab_name.
          ASSIGN (wa_itab_name-itab_name) TO <fs_itab>.
        CATCH cx_sy_assign_cast_illegal_cast

Hope you can help me guys. Thank you and take care!
Former Member

OK, I see. But in this case you don't need the ASSIGN. You just pass the name of the table to the FM REUSE_ALV_FIELDCATALOGE_MERGE as you did. You can comment the line with ASSIGN (and everything else which belongs to it)

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question