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 ALV

Former Member
0 Likes
640

Hi,

I got output in ALV Grid.My requirement is if we double click on any cell of output,Transaction should go to SE37.

I have written the following code snippet.

FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM

LS_SELFIELD TYPE SLIS_SELFIELD.

CASE R_UCOMM.

WHEN 'Fcode of that cell'.

call Transaction 'SE37'.

endcase.

User_command is passed to F.M 'REUSE_ALV_GRID_DISPLAY'.

ENDFORM.

But it is not working.

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
611

in ALV FM pass

 i_callback_user_command = 'USER_COMMAND'


FORM user_command USING user_command LIKE sy-ucomm cursor TYPE slis_selfield.

IF cursor-fieldname EQ '<ALVFIELDNAME_HERE>'.
READ TABLE <FINALITAB HERE> INTO <WORK AREA HERE> INDEX cursor-tabindex.
IF sy-subrc EQ 0.
  SET PARAMETER ID 'LIB' FIELD <WA-FIEDLDNAME>. 
  CALL TRANSACTION 'SE37' AND SKIP FIRST SCREEN.    
ENDIF.


ENDFORM.
5 REPLIES 5
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
612

in ALV FM pass

 i_callback_user_command = 'USER_COMMAND'


FORM user_command USING user_command LIKE sy-ucomm cursor TYPE slis_selfield.

IF cursor-fieldname EQ '<ALVFIELDNAME_HERE>'.
READ TABLE <FINALITAB HERE> INTO <WORK AREA HERE> INDEX cursor-tabindex.
IF sy-subrc EQ 0.
  SET PARAMETER ID 'LIB' FIELD <WA-FIEDLDNAME>. 
  CALL TRANSACTION 'SE37' AND SKIP FIRST SCREEN.    
ENDIF.


ENDFORM.
Read only

Former Member
0 Likes
611

Hi,

User command event gets triggered for any Push button click which is assiciated with a Function code.

When you double click it is not associated to any FCODE.

There is a different event DOUBLE_CLICK. You need to register this EVENT in your ALV.

If you are using REUSE FM, pass this event name and subroutine (Perform which will handle this event) in IT_EVENTS table.

write the code inside the perform which is passed to this table.

Regards,

Lakshmi

Read only

Former Member
0 Likes
611

Hi,

FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM

LS_SELFIELD TYPE SLIS_SELFIELD.

CASE R_UCOMM.

WHEN 'Fcode of that cell'.<--- What u write here for double click ALV Have standard Function code ,Find ant standard ALV Program ,goto Pf-Status,In Function Keys u found For Double click ,use that one for double click.....

call Transaction 'SE37'.

endcase.

Read only

Former Member
0 Likes
611

Hi,

Use hide and try. (Eg: HIDE : vbak-vbeln). Hide the field on which you are performing action to go SE37.

Hope it works.

Regards,

Pavan

Read only

Former Member
0 Likes
611

Hi

FORM set_pf_status1 USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'DISPALY' EXCLUDING rt_extab.

ENDFORM.

FORM at_user_command1 USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN 'DISP'........----->see whether you r giving the function code properly

call transaction 'SE37'.

ENDCASE.