04-29-2009 6:19 AM
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
04-29-2009 6:27 AM
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
04-29-2009 6:26 AM
Hi,
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 LIKE it_fieldcat
p_events LIKE it_events
p_data_table LIKE it_final_data <<----
I am not able to find what type should I pass here ?
USING
p_tabname TYPE slis_tabname
Use LIKE Table, it resolves ur problem
Rgds,
Pavan
04-29-2009 6:27 AM
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
04-29-2009 6:31 AM
Hi priya
you need not mention the table type in the form.
form abc tables it_a using xyz type c.
Regards
Renu
04-29-2009 6:35 AM
But I am getting an error that ' number of formal parameters : 5 and number of actual parameters : 4 ' .
why is this coming ?
04-29-2009 6:38 AM
HI,
Try this way..
FORM reuse_alv_block_list_append
TABLES p_fieldcat STRUCTURE slis_fieldcat_alv
p_events STRUCTURE slis_alv_event
p_data_table TYPE table
USING p_tabname TYPE slis_tabname
endform. " REUSE_ALV_BLOCK_LIST_APPEND
04-29-2009 6:36 AM
HI,
What you have declared is right
>>> At runtime p_innnn copies the defination from the actual patametes passed in the PERFROM Statement
FORM rh_read_infty_data TABLES p_innnn TYPE table
p_object STRUCTURE hrobject.
ENDFORM.