Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with the passing parameter to a subroutine

Former Member
0 Likes
660

Hi guys,

I have this subroutine below, I wnat to pass 2 table table1 and table2 and p_tabname for the first table is alv_sku for the second is alv_resource also p_events for the first table is i_events and i_events1 for teh second...

How am i going to put it in my perform statement... Thanks a lot!

FORM create_alv_list TABLES t_table STRUCTURE zzalvsku

USING p_tabname TYPE SLIS_TABNAME

p_events TYPE SLIS_T_EVENT.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

it_fieldcat = i_fieldcat[]

is_layout = i_layout

i_tabname = p_tabname

it_events = p_events

TABLES

t_outtab = t_table.

ENDFORM.

1 ACCEPTED SOLUTION
Read only

venkat_o
Active Contributor
0 Likes
634

Hi Mark, Check the below one .You dont need to specify structure at FORM ..part as it inherits the properties from PERFORM.


PERFORM create_alv_list TABLES t_table
                        USING alv_sku
                              i_events.

PERFORM create_alv_list TABLES t_table
                        USING alv_resource
                              i_events1.

*&---------------------------------------------------------------------*
*&      Form  create_alv_list
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->T_TABLE    text
*      -->P_TABNAME  text
*      -->P_EVENTS   text
*----------------------------------------------------------------------*
FORM create_alv_list TABLES t_table
                     USING p_tabname
                           p_events.

  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      it_fieldcat = i_fieldcat[] "You dont need to specify [] here
      is_layout   = i_layout
      i_tabname   = p_tabname
      it_events   = p_events
    TABLES
      t_outtab    = t_table.
ENDFORM.                    "create_alv_list
Regards, Venkat.O

Hi guys,

I have this subroutine below, I wnat to pass 2 table table1 and table2 and p_tabname for the first table is alv_sku for the second is alv_resource also p_events for the first table is i_events and i_events1 for teh second...

How am i going to put it in my perform statement... Thanks a lot!

FORM create_alv_list TABLES t_table STRUCTURE zzalvsku

USING p_tabname TYPE SLIS_TABNAME

p_events TYPE SLIS_T_EVENT.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

it_fieldcat = i_fieldcat[]

is_layout = i_layout

i_tabname = p_tabname

it_events = p_events

TABLES

t_outtab = t_table.

ENDFORM.

2 REPLIES 2
Read only

Former Member
0 Likes
634

Hi Mark,

check this

 PERFORM create_alv_list TABLES t_table
                         USING alv_sku 
                               i_events.

PERFORM create_alv_list TABLES t_table
                        USING alv_resource 
                              i_events1.

reward if helpful

raam

Read only

venkat_o
Active Contributor
0 Likes
635

Hi Mark, Check the below one .You dont need to specify structure at FORM ..part as it inherits the properties from PERFORM.


PERFORM create_alv_list TABLES t_table
                        USING alv_sku
                              i_events.

PERFORM create_alv_list TABLES t_table
                        USING alv_resource
                              i_events1.

*&---------------------------------------------------------------------*
*&      Form  create_alv_list
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->T_TABLE    text
*      -->P_TABNAME  text
*      -->P_EVENTS   text
*----------------------------------------------------------------------*
FORM create_alv_list TABLES t_table
                     USING p_tabname
                           p_events.

  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      it_fieldcat = i_fieldcat[] "You dont need to specify [] here
      is_layout   = i_layout
      i_tabname   = p_tabname
      it_events   = p_events
    TABLES
      t_outtab    = t_table.
ENDFORM.                    "create_alv_list
Regards, Venkat.O