<?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: WebDynpro ALV refresh in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811316#M1468997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the Web Dynpro Code Wizard:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;*=&amp;gt;Set - As Table Operation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;*=&amp;gt;Select the node of the alv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/SPAN&gt;: lo_nd_alv_node &lt;SPAN style="color: #575757;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;TYPE REF TO&lt;/STRONG&gt;&lt;/SPAN&gt; if_wd_context_node,&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; lt_alv_node&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;TYPE&lt;/STRONG&gt;&lt;/SPAN&gt; wd_this-&amp;gt;elements_nd_reporte.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lo_nd_alv_node = wd_context-&amp;gt;get_child_node( name = wd_this-&amp;gt;wdctx_nd_reporte ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;*=&amp;gt; Add this line before to set &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;FREE&lt;/STRONG&gt;&lt;/SPAN&gt; lt_alv_node. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lo_nd_alv_node-&amp;gt;bind_table( new_items = lt_alv_node set_initial_elements = abap_true ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, saludos !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Apr 2015 19:03:36 GMT</pubDate>
    <dc:creator>adalid</dc:creator>
    <dc:date>2015-04-13T19:03:36Z</dc:date>
    <item>
      <title>WebDynpro ALV refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811311#M1468992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help with a method I can call from within my view methods, to reset the ALV to its initial state, with no selection indicated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem details:&lt;/P&gt;&lt;P&gt;We are on NW 7.0 EhP1. Have an ALV component in a webdynpro.  We have an action link to refresh the data in the list. However on refresh whatever record that was selected previously (i.e. highlighted by orange bar) remains highlighted. Even if we set lead selection to 1, the display still shows the old record selected. Now if the user chooses an action for the selected record, they get a different record than what appears to be selected! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we REALLY want is to COMPLETELY  refresh the table, having it look like when the user first accesses the view - no record appears to be selected (no orange bar at all).  ( the lead selection is actually at 1 and they will get that record if they choose 'edit selected' and that's ok.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have tried many things including calling the view's 'setup_ALV' method again, invalidating node before getting the data again, changing the lead selection index to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas? Has anyone else seen this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Margaret&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Apr 2010 13:16:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811311#M1468992</guid>
      <dc:creator>mh97</dc:creator>
      <dc:date>2010-04-02T13:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: WebDynpro ALV refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811312#M1468993</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;Why don't you try binding an empty table to the context node which is mapped to the data node of ALV. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 11:25:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811312#M1468993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-06T11:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: WebDynpro ALV refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811313#M1468994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Margaret,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how i refreshed my table, I declared an attribute in the attribute tab of view i have displayed the table,&lt;/P&gt;&lt;P&gt;and the attribute is of type dictionary tabletype then i have moved all the data that i initially selected&lt;/P&gt;&lt;P&gt;using the select query to this attribute say lt_sflight1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now here i have data on another internal table say lt_sflight1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after you have performed the related operations on table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get data back from lt_sflight1 as it contains the original data and bind them to the ALV table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are hadling with two view say MAIN and DISPLAY, after you select some fields in ALV&lt;/P&gt;&lt;P&gt;table on MAIN view for any operation and navigate to DISPLAY then when you go back &lt;/P&gt;&lt;P&gt;from DISPLAY to MAIN may be using BACK button then on MAIN view open event of inbound plug&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then write logic to get data from lt_sflight1 to ALV table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code for that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA lo_nd_sflight TYPE REF TO if_wd_context_node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA lo_el_sflight TYPE REF TO if_wd_context_element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: ls_sflight TYPE wd_this-&amp;gt;element_sflight,&lt;/P&gt;&lt;P&gt;       lt_sflight type table of wd_this-&amp;gt;element_sflight,&lt;/P&gt;&lt;P&gt;       lt_temp  TYPE wdr_context_element_set,&lt;/P&gt;&lt;P&gt;       wa_temp  TYPE REF TO if_wd_context_element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;navigate from &amp;lt;CONTEXT&amp;gt; to &amp;lt;SFLIGHT&amp;gt; via lead selection&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  lo_nd_sflight = wd_context-&amp;gt;get_child_node( name = wd_this-&amp;gt;wdctx_sflight ).&lt;/P&gt;&lt;P&gt;  lo_nd_sflight-&amp;gt;bind_table( wd_this-&amp;gt;lt_sflight1 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here lt_sflight1 containes the original data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and Best wishes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 04:57:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811313#M1468994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-13T04:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: WebDynpro ALV refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811314#M1468995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for letting this dangle for so long. I ended up submitting an OSS message because the expected solutions, such as offered above, did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer from SAP was first that we should upgrade to at least SP5. Since we were unable to do that, on request SAP did offer a workaround, and it satisfied our requirement.  Code such as the following needs to be added to each individual ALV application (lo_nd_overview is the context node for  the ALV table):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*---
* get lead selection index
data:
l_index type i.

l_index = lo_nd_overview-&amp;gt;get_lead_selection_index( ).

*---
* call refresh method of ALV

lo_nd_overview = wd_context-&amp;gt;get_child_node(
name = wd_this-&amp;gt;wdctx_overview ).

data:
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table,
lv_refresh_in TYPE if_salv_wd_table=&amp;gt;s_type_param_refresh_in.

lo_interfacecontroller = wd_this-&amp;gt;wd_cpifc_overview_alv( ).
lo_interfacecontroller-&amp;gt;refresh( in = lv_refresh_in ).

*---
* set lead selection index
if l_index gt 0.
lo_nd_overview-&amp;gt;set_lead_selection_index( -2 ).
lo_nd_overview-&amp;gt;set_lead_selection_index( l_index ).
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SP5 or above, this is NOT needed - SP5 corrects the issue globally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to each of you for your suggestions!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 13:18:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811314#M1468995</guid>
      <dc:creator>mh97</dc:creator>
      <dc:date>2010-05-14T13:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: WebDynpro ALV refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811315#M1468996</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;I know its answered thread but i found a simple solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the same issue to deselect all the records in the wedynpro ALV table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the simple solution--use in any event of webdynpro View where you want to refresh the table :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Node which is bound to ALV.&lt;/P&gt;&lt;P&gt;DATA lo_nd_employee TYPE REF TO if_wd_context_node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the childnode &lt;/P&gt;&lt;P&gt;lo_nd_employee = wd_context-&amp;gt;get_child_node( name = wd_this-&amp;gt;wdctx_employee ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To deselect or refresh the table without losing the records&lt;/P&gt;&lt;P&gt; lo_nd_employee-&amp;gt;clear_selection( ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple the table will be refreshed wihtout removing the records unllike INVALIDATE() method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpfull.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Aug 2010 10:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811315#M1468996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-26T10:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: WebDynpro ALV refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811316#M1468997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the Web Dynpro Code Wizard:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;*=&amp;gt;Set - As Table Operation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;*=&amp;gt;Select the node of the alv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/SPAN&gt;: lo_nd_alv_node &lt;SPAN style="color: #575757;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;TYPE REF TO&lt;/STRONG&gt;&lt;/SPAN&gt; if_wd_context_node,&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; lt_alv_node&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;TYPE&lt;/STRONG&gt;&lt;/SPAN&gt; wd_this-&amp;gt;elements_nd_reporte.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lo_nd_alv_node = wd_context-&amp;gt;get_child_node( name = wd_this-&amp;gt;wdctx_nd_reporte ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;*=&amp;gt; Add this line before to set &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;FREE&lt;/STRONG&gt;&lt;/SPAN&gt; lt_alv_node. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lo_nd_alv_node-&amp;gt;bind_table( new_items = lt_alv_node set_initial_elements = abap_true ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, saludos !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 19:03:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/webdynpro-alv-refresh/m-p/6811316#M1468997</guid>
      <dc:creator>adalid</dc:creator>
      <dc:date>2015-04-13T19:03:36Z</dc:date>
    </item>
  </channel>
</rss>

