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

Interactive ALV Problem

Former Member
0 Likes
602

Hi,

I am using ALV Grid display function module to display data. I have set the parameter 'I_CALLBACK_USER_COMMAND to 'User_Command' in the FM.

Now i am defining as->

Form User_Command Using R_Ucomm like SY-UCOMM.

CASE R_Ucomm.

WHEN 'RET' (Fn code for button)

LEAVE TO LIST-PROCESSING.

ENDCASE.

The program creates a dump with the error:

'The subroutine USER_COMMAND has 1 formal parameters while it is called with more than two actual parameters.

Plz help to solve the issue.

5 REPLIES 5
Read only

Former Member
0 Likes
539

Hi

See the example code

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = i_repid

i_callback_user_command = 'USER_COMMAND'

it_fieldcat = header

is_layout = gt_layout

i_callback_top_of_page = 'TOP-OF-PAGE1'

i_grid_title = text-t35

it_sort = gt_sort[]

i_default = 'X'

i_save = 'U'

is_variant = gt_variant

it_events = gt_events

TABLES

t_outtab = ITAB.

clear itab.

----


  • FORM USER_COMMAND

----


FORM USER_COMMAND USING u_ucomm LIKE sy-ucomm

us_selfield TYPE slis_selfield."#EC CALLED

CASE u_ucomm.

when '&IC1'.

if us_selfield-fieldname = 'BELNR'.

  • read table ITAB index us_selfield-tabindex.

  • set parameter id 'PER' field ITAB-PERNR.

set parameter id 'BLN' field us_selfield-value.

set parameter id 'GJR' field itab-gjahr.

set parameter id 'BUK' field itab-bukrs.

call transaction 'FB03' and skip first screen.

endif.

ENDCASE.

ENDFORM. " USER_COMMAND_PERNR

Regards

Pavan

Read only

Former Member
0 Likes
539

the form name must be 'USER_COMMAND' in the Fun. module. It is a case sensitive.

and routine for this is:

FORM user_command USING r_ucomm LIKE sy-ucomm

lv_selfield TYPE slis_selfield.

endform.

Read only

Former Member
0 Likes
539

Hi

See the example code

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = i_repid

i_callback_user_command = 'USER_COMMAND'

it_fieldcat = header

is_layout = gt_layout

i_callback_top_of_page = 'TOP-OF-PAGE1'

i_grid_title = text-t35

it_sort = gt_sort[]

i_default = 'X'

i_save = 'U'

is_variant = gt_variant

it_events = gt_events

TABLES

t_outtab = ITAB.

clear itab.

----


  • FORM USER_COMMAND

----


FORM USER_COMMAND USING u_ucomm LIKE sy-ucomm

us_selfield TYPE slis_selfield."#EC CALLED

CASE u_ucomm.

when '&IC1'.

if us_selfield-fieldname = 'BELNR'.

  • read table ITAB index us_selfield-tabindex.

  • set parameter id 'PER' field ITAB-PERNR.

set parameter id 'BLN' field us_selfield-value.

set parameter id 'GJR' field itab-gjahr.

set parameter id 'BUK' field itab-bukrs.

call transaction 'FB03' and skip first screen.

endif.

ENDCASE.

ENDFORM. " USER_COMMAND_PERNR

Regards

Pavan

Read only

0 Likes
539

why are you posting the same thing again and again

Read only

matt
Active Contributor
0 Likes
539

I've asked the moderators to investigate that question. I wonder if someone has got hold of his id?