cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic ALV refreshing

Former Member
0 Kudos

Hi,

I have an issue with my ALV Grid.

I use a classical ALV treem from where I make a call to a screen which displays an ALV GRID ( OOPs ) .

The ALV is displayed, based on the selection made by the user in the ALV tree. The tree contains various say DB Table names , My purpose is to display the contents of the table inside an ALV Grid, based on which DB table name is chosen by the user.

This is my problem.

Every time I make a selection on the tree which subsequently call the ALV, I get the same ALV GRID. The data isnt getting refreshed.

I have used statements like FREE obj_grid, obj->refresh() , etc..but doesnt seem to work.

I have tried using SET_TABLE_FOR_FIRST_DISPLAY and also REFRESH_TABLE_DISPLAY... but nothign seems to work..

Can you please help?

Regards,

Nikhil Gopalan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Nikhil - the ALV will be the same ALV (columns) but different data, depend on user input in the ALV tree?

if yes then you just need to bind_table to the ALV node every time the user click another option in the ALV tree.

if you want to clear your node before getting the node values the same node that you are going to bind the table you can do:

using the wizard (read option) read your context node

after data you can invalidate your node like:

lo_nd_your_context_node->invalidate( ). this will initial your node

then after invalidate your node get the new values:

and once you get the context node just bind the table again.

lo_nd_your_context_node->bind_table( your_itab ).

hope this help!

Jason PV

Former Member
0 Kudos

Dear Jason,

Thanks for your answer. unfortunately, the issue is not with the tree..I am everytime calling the ALV using the 'Set_table_for_first_display' because the ALV columns and data are different. But during every call, I get the same ALV that I loaded initially. Though the parameters to the F.M 'Set_table_for_first_display' are always passed afresh everytime, the o/p doesnt reflect it.

Can you please help?

Thanks and Regards,

Nikhil

Former Member
0 Kudos

Where are writing the code for ALV? Is it in WDDOINIT?

If so, try to do the coding in WDDOMODIFYVIEW method.

Former Member
0 Kudos

hmm..no this is just an se38 report....

Former Member
0 Kudos

Please Elaborate how you are calling this report in WD.