Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Subscreen ALV reload

Former Member
0 Likes
811

Hi,

I got a dynpro which contains a subscreen. The dynpro is called after a selection screen. In the dynpro, I add a couple of lines to the alv-table and refresh it - works fine.

Problem is if i leave the dynpro with the back button (leave to screen 0) and enter it again, the old alv-table is displayed, even the internal table in the background is empty?!

Does anyone know why this happens? Do I have to delete the alv instance in a certain way? A clear doesn't work here.

Thanks in advance!

Regards,

Tobi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
700

Hi,

Debug the program. When data is displayed in the subscreen, it stayed there and not cleared. Write code that when back button is press, clear the data in the subscreen fields also.

Regards,

Dhanunjaya Reddy

Hi,

I got a dynpro which contains a subscreen. The dynpro is called after a selection screen. In the dynpro, I add a couple of lines to the alv-table and refresh it - works fine.

Problem is if i leave the dynpro with the back button (leave to screen 0) and enter it again, the old alv-table is displayed, even the internal table in the background is empty?!

Does anyone know why this happens? Do I have to delete the alv instance in a certain way? A clear doesn't work here.

Thanks in advance!

Regards,

Tobi

5 REPLIES 5
Read only

Former Member
0 Likes
701

Hi,

Debug the program. When data is displayed in the subscreen, it stayed there and not cleared. Write code that when back button is press, clear the data in the subscreen fields also.

Regards,

Dhanunjaya Reddy

Read only

0 Likes
700

Thanks for the answer.

When I hit the back button, I clear all relevant data of course (internal table for the alv, reference to the alv...) but with no effect, the old data is still displayed when I reload the alv.

Read only

0 Likes
700

Hi,

Clearing reference variable is not enough here, as corresponding proxy object still resides in frontend. You need to free that object before clearing alv ref.


r_alv->free( ).
clear r_alv.

Now each time you enter that screen recreate alv. New object will replace old one .

Regards

Marcin

Read only

0 Likes
700

Hi Marcin,

once again a very helpful answer from you!

Thanks a lot!

Regards,

Tobias

Read only

0 Likes
700

Hi Tobias,

I am glad, I could help you:) thanks

Marcin