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

How to pass field symbol of type table to subroutine

Hello Experts,

Got stuck when passing field symbol of type table to subroutines.

Here is my code..

FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE.

perform fill_table using <dyn_table>.

form fill_table using f_dyn_table.

field-symbols : <fs_dyn_tab>.

DATA tabDREF TYPE REF TO DATA.

CREATE DATA tabdref TYPE table OF (f_dyn_table).

ASSIGN tabDREF->* TO <fs_dyn_tab>.

endform. " fill_table

When I try to execute this code I am getting a dump which says

'The current statement(CREATE DATA tabdref ..... ) requires a character-type data object.'

Many Thanks

Tags:
  • SAP Employee
replied

Yes, but I think that you may need to assign the field symbol, before using it in the PERFORM statement.

FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE.

**  ASSIGN HERE

perform fill_table using <dyn_table>.

Regards,

Rich Heilman

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