<?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: problem with ok_code from generate tablecontrol in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675167#M885071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Rafe,

You have to write code like this in the PAI  by writing MODULE.

&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_1000  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_1000 input.
case ok_code.
  when 'SAVE'.   "Write save related code here
  when 'CHANGE'. "Change related.
endcase.
endmodule.&lt;/CODE&gt;&lt;/PRE&gt;

You have to differentiate for each function code.

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Apr 2008 08:40:23 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2008-04-21T08:40:23Z</dc:date>
    <item>
      <title>problem with ok_code from generate tablecontrol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675165#M885069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've generated two tablecontrols with the wizard in one dynpro and when i scroll or interact with that table the last ok_code is executed.&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;i push the save button and data is saved, then i scroll down the tablecontrol and it saves again. or when i toggle display/change and then scroll the tablecontrol it toggles display/change again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i don't know what to do... but it just shouldnt do that when you scroll the table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx in advance, rafe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 07:59:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675165#M885069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T07:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: problem with ok_code from generate tablecontrol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675166#M885070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to create a extra variabl for ok_code,&lt;/P&gt;&lt;P&gt;ie, in top include&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;save_ok type sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in PAI where u write the CASE statements for function codes, write like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie, In PAI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;save_ok = ok_code.&lt;/P&gt;&lt;P&gt;clear ok_code.&lt;/P&gt;&lt;P&gt;case save_ok.&lt;/P&gt;&lt;P&gt;when 'SAVE'.&lt;/P&gt;&lt;P&gt;your conditions..etc.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 08:39:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675166#M885070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T08:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: problem with ok_code from generate tablecontrol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675167#M885071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Rafe,

You have to write code like this in the PAI  by writing MODULE.

&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_1000  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_1000 input.
case ok_code.
  when 'SAVE'.   "Write save related code here
  when 'CHANGE'. "Change related.
endcase.
endmodule.&lt;/CODE&gt;&lt;/PRE&gt;

You have to differentiate for each function code.

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 08:40:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675167#M885071</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-04-21T08:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: problem with ok_code from generate tablecontrol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675168#M885072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i made it just like that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MODULE user_command_0110 INPUT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0110 INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;    WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;      PERFORM clear_fields.&lt;/P&gt;&lt;P&gt;      CALL SCREEN 0100.&lt;/P&gt;&lt;P&gt;    WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;    WHEN 'UNLOCK'.&lt;/P&gt;&lt;P&gt;      PERFORM unlock_entry.&lt;/P&gt;&lt;P&gt;    WHEN 'SAVE'.&lt;/P&gt;&lt;P&gt;      PERFORM save_entry.&lt;/P&gt;&lt;P&gt;    WHEN 'DELETE'.&lt;/P&gt;&lt;P&gt;      PERFORM delete_entry.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;ENDMODULE.                    "user_command_0110 INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i interact with the tablecontrol there is a pai event where the ok_code is the same than the previous action (save, delete etc.) like i described it before...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 08:51:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675168#M885072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T08:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem with ok_code from generate tablecontrol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675169#M885073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do one thing,just before you scroll,put /h and enter a break point..then scroll...see what is the sy-ucomm captured..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is any of your custom sy-ucomms it means you have not cleared it properly..so in the code do the needful clearing....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check and revert back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 11:11:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675169#M885073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T11:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem with ok_code from generate tablecontrol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675170#M885074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;clear sy-ucomm solved the problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think u helped me most... so you will be rewarded with 10pt &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 13:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-ok-code-from-generate-tablecontrol/m-p/3675170#M885074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T13:42:06Z</dc:date>
    </item>
  </channel>
</rss>

