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 in SET parameter id for MB23

Former Member
0 Likes
1,107

Hi All.

I created ALV by using function module REUSE_ALV_GRID_DISPLAY.

I have to navigate the screen from report to MB23 whenever user click on field RSNUM .i found SET ID as RES by F1 help of that field.

My problem is screen is not navigate to MB23.i kept break-point in side of FORM but FORM itself is not triggering while click on field RSNUM from report.

Code as follows.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = v_alv_repid

i_callback_user_command = 'USER_COMMAND'

is_layout = layout

it_fieldcat = it_fieldcat

TABLES

t_outtab = it_report1[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

FORM user_command USING ucomm TYPE sy-ucomm

selfield TYPE slis_selfield.

BREAK-POINT.

CASE ucomm.

WHEN '&IC1'.

IF selfield-fieldname = 'RSNUM'.

SET PARAMETER ID 'RES' FIELD selfield-value.

CALL TRANSACTION 'MB23' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM.

Could you help me resolve this problem.

Regards.

Jay

Edited by: Jay J on Oct 28, 2009 4:51 PM

Hi All.

I created ALV by using function module REUSE_ALV_GRID_DISPLAY.

I have to navigate the screen from report to MB23 whenever user click on field RSNUM .i found SET ID as RES by F1 help of that field.

My problem is screen is not navigate to MB23.i kept break-point in side of FORM but FORM itself is not triggering while click on field RSNUM from report.

Code as follows.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = v_alv_repid

i_callback_user_command = 'USER_COMMAND'

is_layout = layout

it_fieldcat = it_fieldcat

TABLES

t_outtab = it_report1[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

FORM user_command USING ucomm TYPE sy-ucomm

selfield TYPE slis_selfield.

BREAK-POINT.

CASE ucomm.

WHEN '&IC1'.

IF selfield-fieldname = 'RSNUM'.

SET PARAMETER ID 'RES' FIELD selfield-value.

CALL TRANSACTION 'MB23' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM.

Could you help me resolve this problem.

Regards.

Jay

Edited by: Jay J on Oct 28, 2009 4:51 PM

4 REPLIES 4
Read only

Former Member
0 Likes
858

Hi Jay,

After executing the alv report, write /H in the command field and then try to double click the field and see where the debugger takes you.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

  • Check function code

CASE r_ucomm.

WHEN '&IC1'.

call transaction,

endcase.

This code should work fine.

Thanks

Ramya

Read only

former_member191735
Active Contributor
0 Likes
858

Try this

  • prepare call transaction FD33 via hotspot or double-click

events-name = 'USER_COMMAND'.

events-form = 'USER_COMMAND'.

append events to tab_events.

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = sy-repid

is_layout = layout

it_fieldcat = fieldcat

it_events = tab_events

tables

t_outtab = outtab.

form user_command using us_ucomm like sy-ucomm

us_selfield type slis_selfield.

you can now use case on us_ucomm the put a break point and see what will be the value of US_UCOMM...

Make sure that your field has hyperlink or hotspot (the field whatever you want to use to click)

If you use double click option.... Please see this standard SAP report RFBUEB00. sorry there may be a better demo program but i have recently visited this program

check line 184 for perform grid_display.

There you can follow other things i mean what need to pass and all

Read only

Former Member
0 Likes
858

HI All.

I got solution myself.

I got problem Beasue program defination in FM .I hard coded my program name its working fine.

Thanks for All.

Regards.

jay

Read only

0 Likes
858

Soooooooooo....

Be clear when you post a question.