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: 

Doubt in Sy-ucomm

Former Member
0 Kudos

Hi all.

I need to clear sy-ucomm in my code.

i have 2 screens.

1) first screen selection screen 1000.it has 2 application bar like pb_create and pb_display.

2)i have done some grouping for depending upon create and display

3)it working properly but if i double click on any input fields of display screen ,Dislpay grouping changed to create grouping .iam using flags for creation of groping.and i have cleared as my requirement,

4)i can see sy-ucom as pb_create in debug mode when i was double clicked in display mode.

5)iam confusing how sy-ucomm changed in display mode to create mode sy-ucomm when i pressed double click.

6)I think so i need to clear sy-ucomm.is nt it?

please help me how i solve my problem?

Thanks.

Jay.

10 REPLIES 10

Former Member
0 Kudos

Hi,

Yes everytime you need to clear the OK_CODE or sy-ucomm for next processing.

SAVE_OK = OK_CODE

CLEAR OK_CODE.

Hope this helps

Cheers

VJ

0 Kudos

HI Vijay.

i dont know where i will clear .

please help me.

Regards,

Jay

0 Kudos

Where ever you are capturing the sy-ucomm values or OK_CODE values immiediately after capturing the values of sy-ucomm. Move the value into a local variable and clear the sy-ucomm variable.

Hope this is clear.

Cheers

0 Kudos

HI Vijay.

this my code.tell me where i will clear

(Selection screen)

AT SELECTION-SCREEN.

CASE sy-ucomm.

WHEN 'PB_CREATE'.

CALL SCREEN 101.

WHEN 'PB_DISPLAY'.

CALL SCREEN 101.

Endcase.

(Dialogue Screen)

&----


*& Module STATUS_101 OUTPUT

&----


  • text

----


MODULE status_101 OUTPUT.

IF sy-ucomm = 'PB_CREATE'.

l_flag1 = 1.

l_flag2 = 2.

ELSEIF sy-ucomm = 'PB_DISPLAY'.

l_flag3 = 1.

ENDIF.

****************grouping for Create*******************

IF l_flag1 = 1.

LOOP AT SCREEN.

IF screen-group1 = 'GR1'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

*****************grouping for Display********************

IF l_flag3 = 1.

LOOP AT SCREEN.

IF screen-group2 = 'GR2'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Former Member
0 Kudos

for selection-screen you can catch the user command by sscrfields-ucomm.

tables : sscrfields.

SELECTION-SCREEN PUSHBUTTON /10(20) CHARLY USER-COMMAND ABCD.

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'ABCD'.

...

ENDIF.

try to make code at selection-screen event. and then also it is not working then let us know.

regards

shiba dutta

0 Kudos

Hi Shiba.

I can get perfect sy-ucomm when i enterd Display mode,but if i press double click ,,display validation automatical changed to create calidation if i check sy-ucomm now it showing create is sy-ucomm.

I got some perfect answer from you ,please help me i hope you can clear this problem

thanks.

Jay.

Former Member
0 Kudos

hi,

yes , you have to clear the sy-ucomm.

declare LIK this.

data ok_code like sy-ucomm.

then in PAO.

CLEAR OK_CODE.

OK_CODE = SY-UCOMM.

regards,

ganesh

Note - Please mark all the helpful answers

Message was edited by:

ganesh ram

Former Member
0 Kudos

hi jay,

in PAO.

CLEAR OK_CODE.

OK_CODE = SY-UCOMM.

regards,

siva

0 Kudos

Hi,

first CLEAR OK_CODE and immediately after assign a value does not make sense.

OK_CODE = SY-UCOMM.

CLEAR SY-UCOMM.

looks better.

Regards,

Clemens

Former Member
0 Kudos

then as every body are telling have you tried like that

data : v_ucom like sy-ucomm.

at selection-screen.

v_ucom = sy-ucomm.

clear sy-ucomm.

case v_ucom.

when ';;;'.

endcase.

regards

shiba dutta