<?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 Passing Ok Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232746#M771190</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;I have text box in one screen. I am passing the Value to the text box through the Program. Then it should trigger the PAI according to the Value in the Text Box. For this purpose How can I pass the Ok_code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i pass the ok_code through the Program will it trigger the PAI or NOT ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;satya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jan 2008 11:01:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-04T11:01:52Z</dc:date>
    <item>
      <title>Passing Ok Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232746#M771190</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;I have text box in one screen. I am passing the Value to the text box through the Program. Then it should trigger the PAI according to the Value in the Text Box. For this purpose How can I pass the Ok_code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i pass the ok_code through the Program will it trigger the PAI or NOT ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;satya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:01:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232746#M771190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Ok Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232747#M771191</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;PAI triggers after user input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign a function code to the push button. then in program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'SAVE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wrk_text eq 'Something you want to give'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;code for save.&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;when 'CANCEL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;code for cancel&amp;gt; etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that way you can code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:11:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232747#M771191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Ok Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232748#M771192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hope this code helps u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Global variable to store OK code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code(4),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Temporary store the value of the OK code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;save_ok_code(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create code for the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;MODULE status_0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;MODULE user_command_0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0001 OUTPUT.&lt;/P&gt;&lt;P&gt;SET PF-STATUS '0001'.&lt;/P&gt;&lt;P&gt;SET TITLEBAR '001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Example of how deactivate a field on the screen&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ZCOSTAFSTM-ZAFSTEMNR is the name of the screen field we want to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;deactivate.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;CHECK screen-name = 'ZCOSTAFSTM-ZAFSTEMNR'.&lt;/P&gt;&lt;P&gt;screen-input = '0'.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MODULE user_command_0001 INPUT.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Here you can catch when user pushes a pushbutton*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Save the OK code in save_ok_code and clear it*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;save_ok_code = ok_code.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CLEAR ok_code.&lt;/STRONG&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;&lt;STRONG&gt;CASE save_ok_code.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHEN '0010'.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Afstemninger*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PERFORM my_list.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHEN '0020'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CALL TRANSACTION 'ZCO1'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHEN 'RETU'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LEAVE TO SCREEN '0000'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDCASE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDMODULE.&lt;/STRONG&gt;AT USER-COMMAND.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you can catch when the user psuh a button on the menu bar or presses a function key&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'OPRT'.&lt;/P&gt;&lt;P&gt;PERFORM something.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:11:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232748#M771192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Ok Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232749#M771193</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;Here there is no user Input . We have to trigger the PAI by sending the Enterkey value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Through program we have to press the enter key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is it possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232749#M771193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Ok Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232750#M771194</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;Plase try using the command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SET USER-COMMAND 'your user command'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: 'List'...  "Create a list &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET USER-COMMAND 'FUN'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processes the event AT USER-COMMAND immediately; the system field SY-UCOMM contains the function code FUN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ENTER key the default value is ' '. (space)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Renjith Michael on Jan 4, 2008 5:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-ok-code/m-p/3232750#M771194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:31:42Z</dc:date>
    </item>
  </channel>
</rss>

