Application Development 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: 

user command

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

rajeshkumar_kaveti
Participant
0 Kudos

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