<?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: ALV Grid Refresh Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335929#M1538793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may have to pass a value through the I_GRID_SETTINGS parameter of REUSE_ALV_GRID_DISPLAY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the bold face here for what you need to add:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: LC_GLAY TYPE LVC_S_GLAY.

LC_GLAY-EDT_CLL_CB = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_GRID_SETTINGS = lc_glay
IT_FIELDCAT = l_fialdcattab
TABLES
T_OUTTAB = t_itab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is necessary for sync'ing the iteb with the user's edits, but I'm not sure if it's related to refreshing the itab with your program's edits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ColtsFan on Oct 28, 2010 2:14 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ColtsFan on Oct 28, 2010 2:16 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Oct 2010 18:13:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-28T18:13:57Z</dc:date>
    <item>
      <title>ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335928#M1538792</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 am using the FM 'REUSE_ALV_GRID_DISPLAY' to display a report we have written. The report displays sales orders and when the user double-clicks on a line they are taken in VA02. I put in a change to have the report refresh after the user came back from VA02. I put in the code p_selfield-refresh = 'X' in the user_command section. This was working before and now it is not refreshing. I'm wondering if this has to do with a default layout we added after these changes were put in. I've done some google searches and I can find object-oriented code but my report is not setup that way so hopefully there is a solution for me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wendy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 17:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335928#M1538792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-28T17:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335929#M1538793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may have to pass a value through the I_GRID_SETTINGS parameter of REUSE_ALV_GRID_DISPLAY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the bold face here for what you need to add:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: LC_GLAY TYPE LVC_S_GLAY.

LC_GLAY-EDT_CLL_CB = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_GRID_SETTINGS = lc_glay
IT_FIELDCAT = l_fialdcattab
TABLES
T_OUTTAB = t_itab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is necessary for sync'ing the iteb with the user's edits, but I'm not sure if it's related to refreshing the itab with your program's edits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ColtsFan on Oct 28, 2010 2:14 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ColtsFan on Oct 28, 2010 2:16 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 18:13:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335929#M1538793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-28T18:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335930#M1538794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey! Thanks for the advice but it is still not displaying the changes that were made after accessing VA02.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 19:40:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335930#M1538794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-28T19:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335931#M1538795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wendy,&lt;/P&gt;&lt;P&gt;Guess you want to get updated records in alv output, after the user makes changes thru va02. In user exit of sales order if changes is saved, set a flag and export it. In the PAI, Import the flag and check if flag value is checked, If yes call all function modules that populate data on the screen again.&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;PAI&lt;/P&gt;&lt;P&gt;perform refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form refresh&lt;/P&gt;&lt;P&gt;perform read data from table&lt;/P&gt;&lt;P&gt;perform refresh alv display&lt;/P&gt;&lt;P&gt;end form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope It Helps.! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kalpana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 19:58:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335931#M1538795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-28T19:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335932#M1538796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if setting &lt;STRONG&gt;is_selfield-refresh = 'X'&lt;/STRONG&gt; in your USER_COMMAND form will solve it&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;      FORM USER_COMMAND                                             *&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;FORM user_command USING i_ucomm     TYPE syucomm&lt;/P&gt;&lt;P&gt;                        is_selfield TYPE slis_selfield.     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE i_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;NTE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*somewhere before u call the alv, you must set this     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;is_selfield-refresh = 'X'.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 20:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335932#M1538796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-28T20:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335933#M1538797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;are you sure that you update your internal table with new content after you did VA02 and before you call refresh of report.?&lt;/P&gt;&lt;P&gt;Bye Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 07:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335933#M1538797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-29T07:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335934#M1538798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you set refresh subfield (and row/col_stable subfields if sort fields are not changed), then you should update the internal table record in your user_command form. You need to reload the data from database, but there may be a delay between leaving VA02 and actual update of database, you may try to lock the sales order to insure update task release the lock. (DO/ENQUEUE_EVVBAKE with WAIT/ENDDO and when/if successful DEQUEUE_EVVBAKE, if not successful after some tries, put a warning/status message)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* init data
CLEAR: lv_error,
refresh lt_bdcmsg.

* Read record
READ TABLE gt_data INTO old_data
  INDEX rs_selfield-tabindex.
CHECK sy-subrc EQ 0.

* Call VA02
SET PARAMETER ID 'AUN' FIELD old_data-vbeln.
CALL transaction 'VA02' AND SKIP FIRST SCREEN
  MESSAGES into lt_bdcmsg.

* Call successful ?
LOOP AT lt_bdcmsgcoll INTO ls_bdcmsg WHERE msgtyp = 'E' OR msgtyp = 'S'.
  MESSAGE message ID ls_bdcmsg-msgid TYPE ls_bdcmsg-msgtyp
    NUMBER ls_bdcmsg-msgnr WITH ls_bdcmsg-msgv1. " 2 3 4
  IF ls_bdcmsg-msgtyp EQ 'E'.
    lv_error = 'X'.
    EXIT.
  ENDIF.
ENDLOOP.
CHECK lv_error IS INITIAL.

* Is update ended
DO 10 TIMES.
  CALL FUNCTION 'ENQUEUE_EVVBAKE'
       EXPORTING
            vbeln          = old_data-vbeln
            _wait          = 'X'
       EXCEPTIONS
            foreign_lock   = 1
            system_failure = 1
            OTHERS         = 1.
  IF sy-subrc EQ 0.
    CALL FUNCTION 'DEQUEUE_EVVBAKE'
         EXPORTING
              vbeln  = old_data-vbeln
         EXCEPTIONS
              OTHERS = 0.
    EXIT.
  ENDIF.
ENDDO.
* Reload
new_data = old_data.
SELECT SINGLE * FROM vbak INTO CORRESPONDING FIELDS OF new_data
  WHERE vbeln = l_sdata-vbeln. " more coding for other fields
* Update internal table
IF new_data NE old_data.
  MODIFY gt_data FROM new_data.
  rs_selfield-refresh = 'X'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 08:01:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335934#M1538798</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-10-29T08:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335935#M1538799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I you don't want to check the update, you could set the commit to local &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* init data
CLEAR: lv_error,
refresh lt_bdcmsg.

* Call va02
SET PARAMETER ID 'AUN' FIELD old_data-vbeln.
CALL transaction 'VA02' AND SKIP FIRST SCREEN
  UPDATE 'L'
  MESSAGES INTO lt_bdcmsg.

* Reload
new_data = old_data.
SELECT SINGLE * FROM vbak INTO CORRESPONDING FIELDS OF new_data
  WHERE vbeln = l_sdata-vbeln. " more coding for other fields
* Update internal table
IF new_data NE old_data.
  MODIFY gt_data FROM new_data.
  rs_selfield-refresh = 'X'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 11:57:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335935#M1538799</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-10-29T11:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335936#M1538800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wendy,&lt;/P&gt;&lt;P&gt;I have the exact requirement as yours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please share how you managed to refresh the data and then the ALV grid? Where did you write the code for it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 04:27:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335936#M1538800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-03T04:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Grid Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335937#M1538801</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;Well, first I called the FM 'REUSE_ALV_GRID_DISPLAY' setting the i_callback_user_command to 'USER_COMMAND'. Here is my code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_callback_program      = p_repid&lt;/P&gt;&lt;P&gt;        i_callback_top_of_page  = 'TOP_OF_PAGE'&lt;/P&gt;&lt;P&gt;        i_default               = 'X'&lt;/P&gt;&lt;P&gt;        is_variant              = wa_variant_2&lt;/P&gt;&lt;P&gt;        it_fieldcat             = p_fieldcat[]&lt;/P&gt;&lt;P&gt;        i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;        i_save                  = 'A'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        t_outtab                = p_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have the FORM USER_COMMAND. To refresh after the user comes back from going into VA02 I set p_selfield-refresh to 'X' so the FM will know it needs to refresh and then I have to also refresh the output table so the changes the user made will display in the ALV grid. For me, I delete the line the user clicked on out of my output table and then go back and run the processes that previously filled in my output table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need any additional information just let me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wendy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 12:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-refresh-issue/m-p/7335937#M1538801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-03T12:10:43Z</dc:date>
    </item>
  </channel>
</rss>

