Application Development 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: 

Leaving to another screen with ALV.

Former Member
0 Kudos

Hello,

I use CL_GUI_ALV_GRID - SET_TABLE_FOR_FIRST_DISPLAY to generate an ALV list from a selection screen.

Now, I have created a button that calls another screen.

the ALV is on screen 100 and the other one is on 200.

Now, when this button is pressed, the code says, leave to screen 200.

But, however, the ALV from screen 100 still stays there and I can't seem to find a way to get rid of it.

Can anyone help here, please!

Thanks!

1 ACCEPTED SOLUTION

tarangini_katta
Active Contributor
0 Kudos

Hi Marten,

IS u r second screen is '200Ä is again ALV or 'it is a list display please let me know.

Thanks

11 REPLIES 11

Former Member
0 Kudos

you can check in degub what eaxclty is happening?

Check newly added button is assigned a Function code and when you press that button, the code is wriiten to handle the button click in PAI of 100 screen.

0 Kudos

it is set to a function code and the title changes as I have set a new title in pbo 200.

soo, it's kinda like the 100 ALV stays there and screen 200 content is behind that.

The button that I've created is not on the list with ALV buttons, it's a different PF.

I'm confused.

If I call screen 200 as a pop-up, it comes up just perfect, so calling the screen shouldn't be the problem.

Thanks!

Former Member
0 Kudos

In PAI of 100,

write this,

ok_code = sy-ucomm.

CASE ok_code.

when 'click'.

call screen 200.

endcase.

Former Member
0 Kudos

Hi,

Check the attributes for the screen 100...

Next Screen should be 200.

OR

When a button is clicked, set the screen to 200 using statement:

SET SCREEN '200'.

Regards,

Shailaja

Former Member
0 Kudos

Hi ,

check the screen no is 200 or not.

check the button is having the same function code or not.

use the same functioncode as of button.

and in pai of 1st screen

write.

ok_code = sy-ucomm.

CASE ok_code.

when 'click'.

call screen 200.

endcase.

Regards

tarangini_katta
Active Contributor
0 Kudos

Hi Marten,

IS u r second screen is '200Ä is again ALV or 'it is a list display please let me know.

Thanks

0 Kudos

I've tried the suggested things, but the ALV stays there the new PF status shows up and the new titlebar comes up. and yes the new screen contains ALV as well, but before it didn't and it was still the same issue.

:S

Thanks!

0 Kudos

Try using method FREE from the same class.

Regards,

Shailaja

uwe_schieferstein
Active Contributor
0 Kudos

Hello Märten

You may have a look at my sample report ZUS_SDN_TWO_ALV_GRIDS_2SCR in thread

Regards

Uwe

0 Kudos

FREE helped me.

Thanks!

former_member800123
Discoverer
0 Kudos

Hi,

can you please mention how did you get rid of this problem using FREE .