‎2008 Dec 18 5:05 AM
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.
‎2008 Dec 18 5:19 AM
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.
‎2008 Dec 18 5:19 AM
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.
‎2008 Dec 18 5:24 AM
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
‎2008 Dec 18 5:39 AM
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.
‎2008 Dec 18 5:46 AM
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
‎2008 Dec 18 5:47 AM
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.