10-12-2007 4:37 AM
Hi all,
any one knows how can I retrieve all of the possible values of user activities which stored in sy-ucomm? (i.e. '&IC1' stands for click.)
regards,
samson
10-12-2007 4:41 AM
HI,
u want to know the function codes of standard screen menu.
then goto that screen and select in the menu as SYSTEM->STATUS.
then one new window will appear to u in that double click on the field value of GUI_STATUS.it will take u to the menu painter.there u can see the function codes of all the buttons,menu items in of that particular screen.
sy-ucomm will have the current user command.suppose if u press any button or menu item the function of that will be moved to sy-ucomm(this is a system variable.).
rgds,
bharat.
10-12-2007 4:44 AM
Hi Samson,
usually we design the screen in screen painter[SE51] and menu in menupainter[SE41].
At the time of Designing we can create our Push Buttons and then assign our own Function Codes.
So when the user clicks the particular Push button, Then the assigned Function code will be stored in SY-UCOMM.
So at runtime only we get the function codes.
Write the code like,
DATA : OK_CODE LIKE SY-UCOMM.
CASE OK_CODE
WHEN 'PUBLISH'. " This is the Function Code.
CALL SCREEN 9011.
WHEN 'BOOKD'.
CALL SCREEN 9012.
ENDCASE.
Thanks,
Reward If Helpful.
10-12-2007 4:45 AM
Hi Samson, there is no other way to know all the sy-ucomms other than from the GUI Status.
The GUI Status will be giving the sy-ucomms pertaining to that particular screen only. But if you want to know all the possible sy-ucomms its not possible.
Hope this clarifies you.
Regards
Gopi
10-12-2007 4:48 AM
hi
good
check this
sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using <pfstatus>
ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program.
ok_code acts just as a temporary variable that stores the value of sy-ucomm.
When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
reward point if helpfu.,
thanks
mrutyun^
10-12-2007 4:51 AM
Hi Samson,
Try this.
DATA : OK_CODE LIKE SY-UCOMM.
CASE OK_CODE
WHEN 'CLICK'.
CALL SCREEN 700.
WHEN 'SAVE'.
CALL SCREEN 800.
WHEN 'BACK'.
processing logic
ENDCASE.
Reward if useful.
Regards,
Chitra
10-12-2007 5:01 AM
10-12-2007 5:28 AM
Hi Samson..
To get the list of SY-UCOMM values for ALV list (or Normal List) .
Create a GUI Status in Tcode SE41.
Inside the GUI Status : Select the Menu path.
EXTRAS -> ADJUST TEMPLATE -> STATUS TYPE AS ALV LIST .
COPY.
Then all the Standard Function codes (i.e SY-UCOMM values) are copied to the GUI Status. You can add the new items.
REWARD IF HELPFUL.
10-12-2007 5:30 AM
Hi
The values in the SY-UCOMM are filled based on the customer action. Each element of the screen has a function code
attached to it and when the user clicks on the element SY-UCOMM is populated
with the function code assigned to it. So the best place to find all the possible
values is to go to the GUI status of the screen and findout the function codes.
<b>reward if usefull</b>
10-12-2007 6:50 AM
hi,
to get the values of sy-ucomm
you can write the sy-ucomm value and check the value or u can set a brea point
overthere to know the value.
regards,
soumya.