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

interactive ALV

Former Member
0 Likes
789

Hi experts,

i am developing a interactive alv, the requirement is that when i double click on the GRID output at vbeln the screen should jump to va02, and when i double click on matnr it should jump to mm02.

the code i usen is given below.

how can i use the coding in coloum.

FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM L_SELFIELD TYPE SLIS_SELFIELD.

CASE L_UCOMM.

WHEN '&IC1'.

CALL TRANSACTION 'VA02'.

ENDCASE.

ENDFORM.

8 REPLIES 8
Read only

Former Member
0 Likes
760

Hi,

Don't ask question repeatedly .

Read only

Former Member
0 Likes
760

Hi,

See ur previous question. U can find the answer.

Thanks.

Read only

Former Member
0 Likes
760

hi,

Try this way..

FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM L_SELFIELD TYPE SLIS_SELFIELD.
CASE L_UCOMM.
WHEN '&IC1'.
IF L_SELFIELD-fieldname EQ 'VBELN'.
* L_SELFIELD-value holds the value of sales order
CALL TRANSACTION 'VA02'.
ELSEIF L_SELFIELD-fieldname EQ 'MATNR.
* L_SELFIELD-value holds the value of Material number
CALL TRANSACTION 'MMO2'.
ENDCASE.
ENDFORM.

Read only

Former Member
0 Likes
760

Hi Raman,

Kindly check in SDN or SCN before posting any thread.

you can use following.

FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM L_SELFIELD TYPE SLIS_SELFIELD.

CASE L_UCOMM.

WHEN '&IC1'.

IF L_SELFIELD-FIELDNAME = 'VBELN'.

CALL TRANSACTION 'VA02'.

ELSEIF L_SELFIELD-FIELDNAME = 'MATNR'.

CALL TRANSACTION 'MM02'.

endif.

ENDCASE.

ENDFORM.

Regards,

Pratik Vora

Edited by: Pratik Vora on Jan 13, 2009 12:44 PM

Read only

Former Member
0 Likes
760

HI,

In the user_command,

check out

L_SELFIELD-TABINDEX

and L_SELFIELD-FIELDNAME.

Now if the L_SELFIELD-FIELDNAME is 'MATNR'. then call MM02

if L_SELFIELD-FIELDNAME is 'VBELN'. then call VA02.

Here MATNR and VBELN are the field names in your internal table declaration.

eg:

you need to use the set parameter id also before calling these transactions.

case L_SELFIELD-FIELDNAME.

when 'MATNR'.

call transaction 'MM02'.

when 'VBELN'.

call transaction 'VA02'.

endcase.

Regards,

Venkatesh

Read only

Former Member
0 Likes
760

Hi Raman,

You took the correct step, the requirement can be handled by USER_COMMAND section. The code is as follows:

FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM L_SELFIELD TYPE SLIS_SELFIELD.

CASE L_UCOMM.

WHEN '&IC1'.

IF rs_selfield-fieldname = 'VBELN'.

call transaction 'VA02'

elseif rs_selfield-fieldname = 'MATNR'.

call transaction 'MM02'.

endif.

ENDCASE.

ENDFORM.

This will sinmply take you to the transactions whenever you click on VBELN or MATNR.

If you some other requirement like passsing some values to the initial screen and let me know I will help you out.

Hope this will answer your requirement.

Cheers.

Abhi

Read only

Former Member
0 Likes
760

hi raman,

MULTIPLE REPEATED POST!!!VIOLATION OF RULES

[READ RULES|;

hope you will not do it again

thanks

Sachin

Read only

Former Member
0 Likes
760

solved