cancel
Showing results for 
Search instead for 
Did you mean: 

Clear ALV Data

Former Member
0 Kudos

Hi All,

I am very new to Webdynpro (ABAP) and have run into an issue, I have a main screen from which I am calling the ALV report screen. First time data coming fine, but when I go back and change the selection parameters and then execute the report again I am still getting the old data. If I run the same report, for the first time with the new parameters then also the data comes fine. Basically the issue seems to be clearing the Context node which provides data to the alv.

If I use the invalidate() on the outbound plug of alv report, it clears the data but doesn't bring the data next time.

Kindly let me know how should I do this, if you can provide some code that will be great.

Your immediate help will be greatly appreciated and rewarded.

Thanks,

Barjinder Singh.

Accepted Solutions (1)

Accepted Solutions (1)

arjun_thakur
Active Contributor
0 Kudos

Hi Barjinder,

This problem can be resolved by using invalidate( ) method. You should use the invalidate code in the ONACTIONBACK method of the back button before firing the outbound plug to navigate to first view. The code would be like:

lo_nd_nodename->invalidate( ).

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Hi Arjun,

Thanks for the quick response, I have tried that, it works and clear all the nodes. But now if I make any new selection and run the report(without existing the application), the report shows no data. Any work around to this.

Thank You,

Barjinder Singh.

arjun_thakur
Active Contributor
0 Kudos

Barjinder,

I think you are having a search button on your first view thru which you navigate to next view. I need to know where have you written the code to fill in values in the node which is then binded to your ALV table. Have you written that code the ONACTION method of Search button??

Regards

Arjun

Former Member
0 Kudos

Arjun,

I have in a core ABAP FM to process the data, and then I have made a service call and have got the data to my Webdynpro. To get the data I am using ONACTIONTRANS method to fire the outbound plug from the main view to the Report view. In the init method of the report view I am calling the FM and getting its data into the context.

Now when I have to go to the main view again to get the new selection parameters I am firing an outbound plug from Report View to the inbound plug of the main view.

Hope it help, let me know if you need more information.

Thanks,

Barjinder Singh.

Former Member
0 Kudos

Hi Barjinder,

"In the init method of the report view I am calling the FM and getting its data into the context."

the problem is right here....

The WDDOINIT method runs only once....when you run your application....just move this FM call into your action button code....which your press to fire the plug to your result button...

so something like this:

your action method() for the button

your FM call to get data

than fire the plug to the result view....

end of your action method....

that is all...

take care...

J.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

after using invalidate method it clears all the values. so after clearing once again you have to call the processing logic that is filling of data for given search criteria