cancel
Showing results for 
Search instead for 
Did you mean: 

Data is not getting refreshed

Former Member
0 Kudos

Hi Friends,

I am new to ABAP-Webdynpro, I have developed a sample webdynpro application by taking the help of SAP Help documentation. it is a Flight model application, in second window, i used supply function method to retrieve the data (By writing SELECT query). Now i am able to get data, but for the first time i am getting correct data, when goes back and selects another data but i am getting same data.

i.e first time

Flight Type is 'AA' in first window data is related to 'AA' in second window. Go back and look for another type

'AZ' in first window data is same as previous, not getting related data.

Can you help in this.

Regards,

Naveen

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

this coding will help you (action method in the 2nd view):

METHOD onactiongo_to_search_in .

DATA: datanode TYPE REF TO if_wd_context_node.

datanode = wd_context->get_child_node( name = 'FLIGHTS' ).

datanode->invalidate( ).

wd_this->fire_display_out_plg( ).

ENDMETHOD.

Former Member
0 Kudos

Hi,

Where are you writing the SELECT query code and bind table.

Code it in the INBOUND PLUG rather then the WDODIINIT of 2ns view.

Also clear the variables.

In the bebugging check the value for the flight number for the 2nd time.

Regards,

Lekha.

Former Member
0 Kudos

Hi,

Try clearing your node on the back button's action.

l_node = wD_context->get_child_node( 'NODENAME' ).
l_node->invalidate( ).

Regards,

Radhika.

Former Member
0 Kudos

I used the below code in supply function method.

DATA :DATANODE TYPE REF TO IF_WD_CONTEXT_NODE,

VALUE TYPE STRING,

FLIGHTTAB TYPE TABLE OF SFLIGHT.

DATANODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'DATA' ).

datanode->get_attribute( exporting name = 'CARRID' importing value = value ).

select * from sflight into table flighttab

where CARRID = value.

node->bind_elements( flighttab ).

i observed in debugging mode,i am getting correct data in internal table for the first time and when clicks on Back button, second time it is not going to the method where i written SELECT statement, so that i am getting same data.

Regards,

Naveen

Former Member
0 Kudos

Hi,

Where are you calling this supply function. Use it in the handlefrom inbound plug in 2nd view.

Regards,

Lekha.

Former Member
0 Kudos

thanx for ur quick reply.

i am calling this supply function in 2nd view. In this method i written a code.

Regards,

Naveen

Former Member
0 Kudos

Hi,

Are you calling it in WDDOINIT or in Inbound plug of 2nd view.

Regards,

Lekha.