Skip to Content

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

To create subroutine with variable table type

I am using the FM ' REUSE_ALV_BLOCK_LIST_APPEND ' in my requirement . This FM is supposed to be called many times. So, to avoid redundancy of code, I want to use a subroutine passing the few tables and a field.

However, I am facing problem passing the data table which will always have different structure .

I am writing my part of code below :

PERFORM reuse_alv_block_list_append

TABLES

it_fieldcat[]

it_events[]

it_final_data[]

USING

c_it_header_date .

FORM reuse_alv_block_list_append

TABLES

p_fieldcat TYPE slis_t_fieldcat_alv

p_events TYPE slis_t_event

p_data_table TYPE table <<----


I am not able to find what type should I pass here ?

USING

p_tabname TYPE slis_tabname

endform. " REUSE_ALV_BLOCK_LIST_APPEND

Please help,

Regards,

Nibha

Former Member
Former Member replied

Hi Priya,

FORM reuse_alv_block_list_append

TABLES

p_fieldcat TYPE slis_t_fieldcat_alv

p_events TYPE slis_t_event

*p_data_table "JUST DONT SPECIFY ANY TYPE AGAINST THIS"*

USING

p_tabname TYPE slis_tabname

endform. " REUSE_ALV_BLOCK_LIST_APPEND

Hope thi smay work

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question