<?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: Checking data in ALV grid before first display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256415#M1631620</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;you can try to call the ALV method "set_delta_cells" (which is unfortunately commented with "for internal use only"), and then call the "check_changed_data" method, which should trigger the "handle_data_changed" for each marked cell. But I don't know if this would work before the first display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Carsten Grafflage on Oct 17, 2011 10:08 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Oct 2011 08:07:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-17T08:07:35Z</dc:date>
    <item>
      <title>Checking data in ALV grid before first display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256412#M1631617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the logic described in SAPs demo program BCALV_EDIT_03 to maintain and check data in an editable ALV Grid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally to checking the data when it's changed within the grid I want to perform all the checks on the complete data (all rows, all fields) BEFORE the data is displayed for the first time in the grid. In case of errors the grid should come up already the error message popup and highlited fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Background to that request is that the data is uploaded from a file and could be corrupted there. The ALV then is used as final check for user before data is actually posted to the SAP tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any smart method to use the already implemented checking to be performed before first display of the data or some other idea???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Ulrich Meier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 12:46:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256412#M1631617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-13T12:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Checking data in ALV grid before first display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256413#M1631618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the below code to show the error log popup after the display...or check if you can call the handle_data_changed method with er_data_changed with all the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA LO_DATA_CHANGED TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.

  CREATE OBJECT LO_DATA_CHANGED
    EXPORTING
      I_CALLING_ALV = GO_GRID.
  
  DATA LT_FIELDCAT_LVC TYPE LVC_T_FCAT.

  CALL METHOD GO_GRID-&amp;gt;GET_FRONTEND_FIELDCATALOG
    IMPORTING
      ET_FIELDCATALOG = LT_FIELDCAT_LVC.

  LO_DATA_CHANGED-&amp;gt;MT_FIELDCATALOG[] = LT_FIELDCAT_LVC.

  LOOP AT GT_OUTPUT_DATA INTO GS_OUTPUT_DATA.
    LV_TABIX = SY-TABIX.
* Check for errors...if errors found, 
    CALL METHOD LO_DATA_CHANGED-&amp;gt;ADD_PROTOCOL_ENTRY
      EXPORTING
        I_MSGID     = LV_MSGID
        I_MSGNO     = LV_MSGNO
        I_MSGV1     = LV_FIELD_TEXT
        I_MSGV2     = PV_CUST
        I_MSGTY     = GC_VALUE_E
        I_FIELDNAME = 'FIELD'
        I_ROW_ID    = LV_TABIX.
    LV_ERRORS = 'X'.  
  ENDLOOP.

  IF LV_ERRORS is initial.
    CALL METHOD LO_DATA_CHANGED-&amp;gt;REFRESH_PROTOCOL.
  else.  
    CALL METHOD LO_DATA_CHANGED-&amp;gt;DISPLAY_PROTOCOL.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 21:43:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256413#M1631618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-13T21:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Checking data in ALV grid before first display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256414#M1631619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going to try to call the handle_data_change method directly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forund some useful information here &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4134044"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is to populate er_data_changed correctly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ulrich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 11:39:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256414#M1631619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-14T11:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Checking data in ALV grid before first display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256415#M1631620</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;you can try to call the ALV method "set_delta_cells" (which is unfortunately commented with "for internal use only"), and then call the "check_changed_data" method, which should trigger the "handle_data_changed" for each marked cell. But I don't know if this would work before the first display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Carsten Grafflage on Oct 17, 2011 10:08 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2011 08:07:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256415#M1631620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-17T08:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Checking data in ALV grid before first display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256416#M1631621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Carsten!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was final hint I needed. After some trial and error I found that additionally to your suggestion I need to call method refresh_table_display before calling set_delta_cells. Then data_change event was triggered even before first visual display of the ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ulrich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2011 13:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-data-in-alv-grid-before-first-display/m-p/8256416#M1631621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-26T13:32:52Z</dc:date>
    </item>
  </channel>
</rss>

