2007 Jan 20 7:59 AM
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.
2007 Jan 20 8:12 AM
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
2007 Jan 20 8:17 AM
HI Vijay.
i dont know where i will clear .
please help me.
Regards,
Jay
2007 Jan 20 8:21 AM
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
2007 Jan 20 8:55 AM
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.
2007 Jan 20 8:19 AM
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
2007 Jan 20 8:41 AM
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.
2007 Jan 20 8:20 AM
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
2007 Jan 20 8:27 AM
2007 Jan 20 12:31 PM
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
2007 Jan 20 9:03 AM
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