<?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: set_new_ok_code affects alv grid methods. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-new-ok-code-affects-alv-grid-methods/m-p/7319037#M1536624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System event: A system event is triggered before any automatic field checks (for example,&lt;/P&gt;&lt;P&gt;required fields) have taken place on the screen, and before any field transport. The PAI and&lt;/P&gt;&lt;P&gt;PBO events are not triggered. Consequently, you cannot access any values that the user&lt;/P&gt;&lt;P&gt;has just changed on the screen. Furthermore, there is no field transport back to the screen&lt;/P&gt;&lt;P&gt;after the event, so values that you have changed in the event handling are not updated on&lt;/P&gt;&lt;P&gt;the screen.&lt;/P&gt;&lt;P&gt;The handler method that you defined for the event is called automatically by the system.&lt;/P&gt;&lt;P&gt;However, you can use the method set_new_ok_code [Page 49] to set a new value for&lt;/P&gt;&lt;P&gt;the OK_CODE field. This then triggers the PAI and PBO modules, and you can evaluate&lt;/P&gt;&lt;P&gt;the contents of the OK_CODE field as normal in a PAI module.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Application event: This event is processed in the PAI event. Consequently, all field checks&lt;/P&gt;&lt;P&gt;and field transport has taken place. If you want the event handler method to be called at a&lt;/P&gt;&lt;P&gt;particular point in your application program, you must process the event using the static&lt;/P&gt;&lt;P&gt;method CL_GUI_CFW=&amp;gt;DISPATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u need to use CL_GUI_CFW=&amp;gt;DISPATCH before calling get_current_cell and get_selected_rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amitava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Sep 2010 05:06:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-28T05:06:20Z</dc:date>
    <item>
      <title>set_new_ok_code affects alv grid methods.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-new-ok-code-affects-alv-grid-methods/m-p/7319036#M1536623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an unusual issue. I have a toolbar custom ok_code to determine selected row in alv grid and update corresponding fields below with the chosen data. Methods like get_current_cell and get_selected_rows works until I do a cl_gui_cfw=&amp;gt;set_new_ok_code. I call that command to fire the PAI after updating screen fields. After that get_current_cell only returns row 1 and the get_selected_rows returns empty tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the FM set table for first display. Is there a setting I am missing?&lt;/P&gt;&lt;P&gt;It almost seems like it loses its cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can provide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 03:08:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-new-ok-code-affects-alv-grid-methods/m-p/7319036#M1536623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-28T03:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: set_new_ok_code affects alv grid methods.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-new-ok-code-affects-alv-grid-methods/m-p/7319037#M1536624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System event: A system event is triggered before any automatic field checks (for example,&lt;/P&gt;&lt;P&gt;required fields) have taken place on the screen, and before any field transport. The PAI and&lt;/P&gt;&lt;P&gt;PBO events are not triggered. Consequently, you cannot access any values that the user&lt;/P&gt;&lt;P&gt;has just changed on the screen. Furthermore, there is no field transport back to the screen&lt;/P&gt;&lt;P&gt;after the event, so values that you have changed in the event handling are not updated on&lt;/P&gt;&lt;P&gt;the screen.&lt;/P&gt;&lt;P&gt;The handler method that you defined for the event is called automatically by the system.&lt;/P&gt;&lt;P&gt;However, you can use the method set_new_ok_code [Page 49] to set a new value for&lt;/P&gt;&lt;P&gt;the OK_CODE field. This then triggers the PAI and PBO modules, and you can evaluate&lt;/P&gt;&lt;P&gt;the contents of the OK_CODE field as normal in a PAI module.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Application event: This event is processed in the PAI event. Consequently, all field checks&lt;/P&gt;&lt;P&gt;and field transport has taken place. If you want the event handler method to be called at a&lt;/P&gt;&lt;P&gt;particular point in your application program, you must process the event using the static&lt;/P&gt;&lt;P&gt;method CL_GUI_CFW=&amp;gt;DISPATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u need to use CL_GUI_CFW=&amp;gt;DISPATCH before calling get_current_cell and get_selected_rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amitava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 05:06:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-new-ok-code-affects-alv-grid-methods/m-p/7319037#M1536624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-28T05:06:20Z</dc:date>
    </item>
  </channel>
</rss>

