cancel
Showing results for 
Search instead for 
Did you mean: 

The print button I created in the toolbar is not working properly.

yalcin_mete
Participant
0 Kudos
320

Hi Masters,

I created a "print button" in the toolbar. When I click the print button, the output screen appears, but since the program does not leave the ALV screen, the ALV screen appears on top of the output screen and for this reason I cannot see the output screen properly.

yalcin_mete_0-1726154849819.png


First Screen :

yalcin_mete_1-1726155083874.png


After selecting a line in ALV, I click the print button :

yalcin_mete_2-1726155177865.png


I select the output device, then I click the print preview(yazdırma öngörünümü) :

yalcin_mete_3-1726155287987.png


Actually, the output view appears on the screen, but the ALV does not leave the screen.

yalcin_mete_4-1726155468942.png



I tried "ALV refresh" but it did not work. How can I remove the ALV from the screen?



Thanks.

 

 

Sandra_Rossi
Active Contributor

For information, you can obfuscate easily with Greenshot (at getgreenshot.org) e.g.

Sandra_Rossi_0-1726165702940.png

 

Sandra_Rossi
Active Contributor
You display the ALV in CL_GUI_CONTAINER=>SCREEN0 (or equivalent), but you should avoid this in productive programs. Instead, create a Dynpro screen with a Custom control inside (to be instantiated with CL_GUI_CUSTOM_CONTAINER), and you display the ALV grid inside this container.
View Entire Topic
yalcin_mete
Participant
0 Kudos

Hi ,
I noticed that the problem can be solved by using "go_gr->set_visible( abap_false )" and "go_gr->set_visible( abap_true)" where relevant. Thanks.

Sandra_Rossi
Active Contributor
0 Kudos
Yes, it's one of the 2 solutions I have indicated.