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

sy-ucomm

Former Member
0 Likes
1,515

Hi,

i have a program that will go to a transaction code MM02 when a button is click...But when i double click on the material number the value of the sy-ucomm is equal to the MM02, and will go to the transaction MM02 which is wrong...

How can i change the value of sy-ucomm to DISPLAY?

regards,

mae

1 ACCEPTED SOLUTION
Read only

former_member195698
Active Contributor
0 Likes
1,365

What exactly is your requirement?

You want to Click on the Material number and goto the transaction in Display mode ?

call the Transaction MM03 instead of MM02.

or

The value of SY-UCOMM when you double click on the material number in your report is coming as MM02 ?

Change the value of sy-ucomm in your GUI Status.

Regards,

Abhishek

Hi,

i have a program that will go to a transaction code MM02 when a button is click...But when i double click on the material number the value of the sy-ucomm is equal to the MM02, and will go to the transaction MM02 which is wrong...

How can i change the value of sy-ucomm to DISPLAY?

regards,

mae

7 REPLIES 7
Read only

Former Member
0 Likes
1,365

Hi,

post your user command code.

rgs

Read only

0 Likes
1,365

hi,

here's my user command code:

the problem is when i double click on the material number the it will go to the transaction MM02..which is wrong...the correct one is when you double click on the values in the table nothing will happen...

AT USER-COMMAND.

CASE sy-ucomm.

WHEN c_mm03.

g_matnr = sy-lisel+2(8).

SET PARAMETER ID c_mat FIELD g_matnr.

IF g_matnr IS INITIAL.

MESSAGE e021 WITH text-024.

ELSE.

CALL TRANSACTION c_mm03 AND SKIP FIRST SCREEN. "#EC CI_CALLTA

IF sy-subrc EQ 0.

*standar sy-subrc check

ENDIF.

ENDIF.

WHEN c_mm02.

g_matnr = sy-lisel+2(8).

SET PARAMETER ID c_mat FIELD g_matnr.

IF g_matnr IS INITIAL.

MESSAGE e021 WITH text-024.

ELSE.

CALL TRANSACTION c_mm02 AND SKIP FIRST SCREEN. "#EC CI_CALLTA

IF sy-subrc EQ 0.

PERFORM f_print_selection_screen.

WAIT UP TO 2 SECONDS.

SUBMIT z2mak32075_mrp_alignment WITH SELECTION-TABLE i_select AND RETURN."#EC *

ENDIF.

ENDIF.

WHEN c_cs03.

g_matnr = sy-lisel+2(8).

SET PARAMETER ID: c_mat FIELD g_matnr,

c_bom FIELD p_stlan,

c_wrk FIELD p_werks.

IF g_matnr IS INITIAL.

MESSAGE e021 WITH text-024.

ELSE.

CALL TRANSACTION c_cs03 AND SKIP FIRST SCREEN. "#EC CI_CALLTA

IF sy-subrc EQ 0.

*standar sy-subrc check

ENDIF.

ENDIF.

WHEN 'BACK' .

LEAVE SCREEN.

WHEN OTHERS.

LEAVE SCREEN.

ENDCASE.

Read only

former_member195698
Active Contributor
0 Likes
1,366

What exactly is your requirement?

You want to Click on the Material number and goto the transaction in Display mode ?

call the Transaction MM03 instead of MM02.

or

The value of SY-UCOMM when you double click on the material number in your report is coming as MM02 ?

Change the value of sy-ucomm in your GUI Status.

Regards,

Abhishek

Read only

0 Likes
1,365

hi,

when i click on a particular material number and click on the button "change material" it will go to the transaction code MMO2...But when i double click it nothing will happen...

The problem is when i double click on the material number it will go to the transaction code MM02 which is wrong...

can you help me with this?

thank you....

regards,

mae

Read only

0 Likes
1,365

Check the User Command assigned to the Function Key F2. It should not be MM02.

Regards,

Abhishek

Read only

0 Likes
1,365

hi Mae,

For Double Click to work, u have ti implement AT LINE SELECTION EVENT.

I hope u have just implemented AT USER COMMAND Event.

Do like this.

AT LINE-SELECTION .

SET PARAMETER ID 'MAT' FIELD w_matnr.

CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN .

While displaying the internal table contents, use HIDE command to pass values for AT LINE SELECTION Event.

check this link:

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/frameset.htm

Reward me if useful........

Harimanjesh AN

Read only

0 Likes
1,365

Hi Mae,

Try this:

There is an atribute in tab Display in the layout of your dynpro that you have to check. The atribute is: Responds to double-click

Regards.

FC