<?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: Enter in Module Pool. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247570#M1720451</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;Case 2: Can't you specify a condition that only when the field value is initial then fetch the values from table else leave the values as it is on pressing enter? Thanks!&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;Kumud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2013 06:19:30 GMT</pubDate>
    <dc:creator>kumud</dc:creator>
    <dc:date>2013-01-29T06:19:30Z</dc:date>
    <item>
      <title>Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247566#M1720447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi, &lt;/P&gt;&lt;P&gt;My screen containing 7 input fields ( first 2 fields are mandatory). &lt;/P&gt;&lt;P&gt;case 1: After providing values to first 2 fields if I hit enter, &lt;BR /&gt;I am fetching entry from table and displaying other 5 field values in the screen respectively.-- working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case 2: If I am changing some value again in the screen for any one of the 5 fields and if I hit enter&lt;BR /&gt;(before saving) , its removing new value which I gave in screen and taking table (old value).&lt;BR /&gt;Since I have written code in PAI (for case 1) if ok_code = space to fetch enty from table and to display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When hitting enter for case 2, It should be as it is in the screen.&lt;/P&gt;&lt;P&gt;Since both cases to hit enter, Please let me know any grouping or box should be added for first 2 fields&lt;BR /&gt;or any other way to handle this.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 05:50:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247566#M1720447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-29T05:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247567#M1720448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; you can achieve by getting the cursor position when they hit enter.if the cursor is in first 2 fields when they press enter then do the case 1 and if the cursor is in any one of the 5 fields then do the case 2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below link explains how to get the cursor field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dbabf135c111d1829f0000e829fbfe/content.htm" title="http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dbabf135c111d1829f0000e829fbfe/content.htm"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dbabf135c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 06:07:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247567#M1720448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-29T06:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247568#M1720449</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;For your requirement for both the cases you have to write the code in Ok_code = space with condition.for first case check whether your remaining 5 fileds are empty if yse then you fetch the data from table and display .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you metion this condition your requirement will fullfill.If any problem reply me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 06:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247568#M1720449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-29T06:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247569#M1720450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's probably happening because the code to fetch data from the table is getting executed each time you change a field and press Enter. Try separating your fields in blocks and then use AT SELECTION-SCREEN ON BLOCK event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 06:10:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247569#M1720450</guid>
      <dc:creator>kakshat</dc:creator>
      <dc:date>2013-01-29T06:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247570#M1720451</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;Case 2: Can't you specify a condition that only when the field value is initial then fetch the values from table else leave the values as it is on pressing enter? Thanks!&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;Kumud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 06:19:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247570#M1720451</guid>
      <dc:creator>kumud</dc:creator>
      <dc:date>2013-01-29T06:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247571#M1720452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jack,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Copy your ok_code value to anothe zfield so that you value doesnot affect.&lt;/P&gt;&lt;P&gt;sy-Ucom = ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to keep your new value , write your logic like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case ok_code.&lt;/P&gt;&lt;P&gt;when 'Enter'.&lt;/P&gt;&lt;P&gt;update your values to the screen field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 06:21:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247571#M1720452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-29T06:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247572#M1720453</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;User may keep cursor in field 1 or 2 after changing values for other field...In this case cursor position changes&amp;nbsp; will fail.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;field value wont be initial in all cases ( user wont clear all values everytime )&lt;/P&gt;&lt;P&gt;Since all field is input enabled, first execution values will be there in screen.&amp;nbsp; &lt;BR /&gt;user will again run with different data&amp;nbsp; for first case to display other fields.so&lt;/P&gt;&lt;P&gt;we can't specify a condition that only when the field value is initial then fetch the values from table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my module pool program, both ok_code and sy-ucomm is space when hitting enter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 17:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247572#M1720453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-29T17:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247573#M1720454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add something like below to your logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. You can keep the logic of ok_code as the first condition in the PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then read the screen values using the FM DYNP_VALUES_READ and store them in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. After that select the values from the table(as you are doing) and store them in a local work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Compare the values of 5 fields you get in &lt;STRONG&gt;step 2 &lt;/STRONG&gt;and &lt;STRONG&gt;step 3&lt;/STRONG&gt;. If there is a difference in value of any of those 5 fields then update the values to the screen fields which you get in &lt;STRONG&gt;step 2&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here in &lt;STRONG&gt;step 2 &lt;/STRONG&gt;and &lt;STRONG&gt;step 4&lt;/STRONG&gt;, you need to take care that the values of 5 fields are initial or not(check if the user is executing for the first time or not). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1151/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 18:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247573#M1720454</guid>
      <dc:creator>former_member491621</dc:creator>
      <dc:date>2013-01-29T18:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Enter in Module Pool.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247574#M1720455</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;Try using a condition that compare the first two values with the same old values (which you have to store in some temporary variable) if they are equal then don't populate it again. Otherwise populate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF first_field = old_val_of_first_field AND second_field = old_val_of_second_field.&lt;/P&gt;&lt;P&gt;........dont populate values to other fields.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;........Populate new values to other fields.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 18:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enter-in-module-pool/m-p/9247574#M1720455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-29T18:46:31Z</dc:date>
    </item>
  </channel>
</rss>

