<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: screens in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655802#M291094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OK_CODE is the screen variable where the system store the functional code assigned to command done by user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every buttom in the screen and in the bar has an own functional code, so it can decide what the program has to do when the user press a certain buttom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actions to be done are manage in PAI process, where PAI means PROCESS AFTER INPUT, so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The user press a buttom, the functional code of the buttom is stored in OK_CODE and in PAI the program decides what to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND.&lt;/P&gt;&lt;P&gt;CASE OK_CODE.&lt;/P&gt;&lt;P&gt;WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;....................&lt;/P&gt;&lt;P&gt;WHEN 'NEXT'.&lt;/P&gt;&lt;P&gt;...................&lt;/P&gt;&lt;P&gt;WHEN ........&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The functional code is assigned when the buttom is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Oct 2006 09:51:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-20T09:51:09Z</dc:date>
    <item>
      <title>screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655797#M291089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;  What is ok_code used for and what is it exactly...can anybody explain me please...iam going thru sap help.sap.com..&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;vijaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 09:34:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655797#M291089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T09:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655798#M291090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/sy-ucomm-and-ok-code-in-dialog-program.htm" target="test_blank"&gt;http://www.sap-img.com/abap/sy-ucomm-and-ok-code-in-dialog-program.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 09:41:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655798#M291090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T09:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655799#M291091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK_CODE is a 4 digit function code assigned to any control that you put on screen interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user chooses a pushbutton or a checkbox, the PAI event is triggered. The function code of the pushbutton is assigned to the screen field OK_CODE, which is then passed onto the ABAP field with the same name. The module USER_COMMAND, which is associated with PAI event, is then processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly, the contents of the OK_CODE field are copied to the auxiliary variable SAVE_OK code, and OK_CODE is initialized. You should always do this, since it ensures that the screen field OK_CODE has always been initialized before the PBO event and can therefore not unintentionally contain an incorrect value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have any further queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to mark helpful answers!&lt;/P&gt;&lt;P&gt;Gaurav Parmar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 09:43:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655799#M291091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T09:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655800#M291092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gaurav&lt;/P&gt;&lt;P&gt;   Thanks for ur helpful answer...but can i use my own fct code r do i have to definetly use only OK_CODE..for exam if i have ok button i can give my fct code as ok...&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;vijaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 09:45:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655800#M291092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T09:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655801#M291093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not neccassary u can use both okcode or sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 09:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655801#M291093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T09:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655802#M291094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OK_CODE is the screen variable where the system store the functional code assigned to command done by user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every buttom in the screen and in the bar has an own functional code, so it can decide what the program has to do when the user press a certain buttom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actions to be done are manage in PAI process, where PAI means PROCESS AFTER INPUT, so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The user press a buttom, the functional code of the buttom is stored in OK_CODE and in PAI the program decides what to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND.&lt;/P&gt;&lt;P&gt;CASE OK_CODE.&lt;/P&gt;&lt;P&gt;WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;....................&lt;/P&gt;&lt;P&gt;WHEN 'NEXT'.&lt;/P&gt;&lt;P&gt;...................&lt;/P&gt;&lt;P&gt;WHEN ........&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The functional code is assigned when the buttom is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 09:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655802#M291094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T09:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655803#M291095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have your own function code as long as it is of 4 digit length. Whenever you put any control over the screen, you must put 4 digit function code in the properties screen for that particular control. Now it can be first four leter 'VIJA', 'DURG' or any 4 characters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please dont forget to mark the helpful answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gaurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 09:51:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655803#M291095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T09:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655804#M291096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;You are confusing two things. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK_CODE is just a variable which is used to store the 'Function code' which is associated for example to a button. You can have your own Function codes and when the button is clicked or some user action occurs ( which is by user interaction ) then in PAI you check something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case ok_code.&lt;/P&gt;&lt;P&gt;when &amp;lt;fct_code1&amp;gt;.&lt;/P&gt;&lt;P&gt;when &amp;lt;fct_code2&amp;gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you want to use someother variable in place of ok_code then you can simply assign the value of 'SY-UCOMM' in some other field and instead of having a 'case OK_CODE' you can have for example 'case MY_CODE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Oct 2006 18:35:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655804#M291096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-21T18:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: screens</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655805#M291097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code is just a variable...real job is done by sy-ucomm&lt;/P&gt;&lt;P&gt;it is capturing the user command eg: any push buttons click......for eg: you will be declaring &lt;/P&gt;&lt;P&gt;data : ok_code type sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on your requirement you can change variables,pop up messages anything you want to happen on click of a button or other actions &lt;/P&gt;&lt;P&gt;by checking the sy-ucomm...&lt;/P&gt;&lt;P&gt;instead of clearing sy-ucomm ,one can find the trend of moving value of moving sy-ucomm to ok_code and clearing it since one does not want to mess with standard....&lt;/P&gt;&lt;P&gt;thats what i think you are rectifying right now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nb:ok_code is a tech name ,you could name it anything as    long as it is of type sy-ucomm&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Oct 2006 11:21:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screens/m-p/1655805#M291097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-22T11:21:47Z</dc:date>
    </item>
  </channel>
</rss>

