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: 

ALV USER Command

Former Member
0 Kudos
132

Hi Friends ,

I am doing one ALV Report.. Every thing working fine...Iam Using ALV user command...when I am double click on Material document number ..its going for MB03 transaction also.. Now the Issue is......

I want give double click option for Material document as well as Purchase order number also.. Iam using the function code &IC1 for first user command..

If I am going for second EBELN double click..

what is the function code..

please suggest me..

regards,

sampath

4 REPLIES 4

alpesh_saparia3
Active Contributor
0 Kudos
86

In your ALV Display function module pass the some value like "USER_COMMAND" in paramtere "I_CALLBACK_USER_COMMAND" and create Form routine with same name like "FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield. Endform".

There you can identfy the field selected and depending on that you can call the corresponding transaction.

-Alpesh

Former Member
0 Kudos
86

Hi,

Enable hotspot for both the fields.

So based on the field user selecting you can call different transaction.

Reward if helpful.

Former Member
0 Kudos
86

Hi,

The user command will be same for both ... based on the field selection you have to navigate to Material document or purchase order.

form user_command USING p_ucomm LIKE sy-ucomm

p_selfield TYPE slis_selfield.

if p_selfield-field = material docuemnt field.

dispaly the material docuemnt.

else.

display the purchase order.

endif.

endform.

Satya.

null

Former Member
0 Kudos
86
 FORM user_command USING p_ucomm like sy-ucomm
                        p_selfield type slis_selfield.

CASE p_ucomm.
   WHEN  '&IC1'.
     IF p_selfield-fieldname = material_document.
      ..........
     ELSE IF p_selfield-fieldname =  'EBELN'.
     .......
     ENDIF.
ENDCASE.
ENDFORM

is it right?

Message was edited by:

Pasquale Isolato