2008 Nov 20 11:09 AM
Can any one please explain the meaning of OK code and what is its significance
2008 Nov 20 11:11 AM
ok code is to capture the sy-ucomm value. U can use sy-ucomm for the same purpose.
Search in SDN. U will get mutiplae threads reg: this
2008 Nov 20 11:12 AM
Hello,
OK Code stores the action/command of the user.
You can search the SCN for the same. Lot of threads which can help you think practically for question.
Thanks,
Jayant
2008 Nov 20 11:20 AM
Hi, this is variable and captures the system field sy-ucomm.
which is the action that you performed.
like enter, save, choose, back, find etc.
to distinguish the user actions and correspondingly writing the code we use the ok code inturn the sy-ucomm.
hope this small explanation is useful to you.
for detailed notes as our other freinds mentioned please go through the documenations or search for it.
in its minute details the above is mentioned.
regards
Ramchander Rao.K
2008 Nov 20 11:27 AM
Hi
OK Code is used to capture the function that the user has last executed.
Generally we will define OK Code using DATA OK_CODE LIKE SY-UCOMM.
You could use other name as well but the standard practice is to use OK_code.
Cheers,
Hakim
2008 Nov 20 11:30 AM
Hi,
OK_CODE has special significance in module pool programming. It needs to be specified in screen elements tab in se51 for a module pool. If specified in screen elements and in abap code with data statement. OK_CODE will contain the value of SY-UCOMM automatically.
Many a time need arises that we need to clear SY-UCOMM. But it is not recommended to clear system variables. So we can clear OK_CODE instead of SY-UCOMM and in coding we can place conditions on OK_CODE rather than using SY-UCOMM.
Regards,
Amit
2008 Nov 20 11:35 AM
Hi
<<Text cut and pasted from here http://www.sap-img.com/abap/sy-ucomm-and-ok-code-in-dialog-program.htm >>
Edited by: Matt on Nov 20, 2008 1:01 PM
2008 Nov 20 12:02 PM