10-13-2006 7:58 AM
Can I set 2 user command in my ALV list?
I am using reuse alv display, in that I have used 'user command'. but i need to call 2 standard transaction for 2 flds in the list.
Thanks
10-13-2006 8:07 AM
Hi,
You can do that in the same user command. If the routine for user command, you can check for the the field FIELDNAME in the parameter rs_selfield passed to the routine. This field will give the field name on which the user command happened. Based on that, you can call any of the transactions that is required.
Manoj
10-13-2006 8:09 AM
Hi,
In one user command you can call 2 transactions by checking the field selected. See the following code.
FORM dispaly_tran USING user_command LIKE sy-ucomm sobj TYPE slis_selfield.
CHECK NOT sobj-value IS INITIAL.
IF sobj-fieldname = 'BELNR'
SET PARAMETER ID 'BLN' FIELD sobj-value.
SET PARAMETER ID 'BUK' FIELD p_bukrs.
SET PARAMETER ID 'GJR' FIELD p_gjahr.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ELSEIF sobj-fieldname = 'EBELN'.
SET PARAMETER ID 'BES' FIELD sobj-value.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDFORM. " DISPALY_ORDER_FORM
Regards,
Rajesh