‎2009 Aug 15 11:43 AM
Hi All,
I have developed an ALV Report which contains a selection screen. After executing the report the selection screen is appearing and based upon the values entered it is displaying the ALV report. when i clicked back button, instead of navigating to selection screen a blank screen is appearing and then again i need to click back button which then displays selection screen. My question is how to suppress the blank screen.
Regards
Faisal
‎2009 Aug 15 3:01 PM
Hi Abdul,
when u r calling the screen containing ALV report, check the PAI part of the same screen and do following.
capture sy-ucomm for back button,under that case that case write set screen '0' and leave screen.
MODULE USER_COMMAND_0100 INPUT.
data lv_ucomm type sy-ucomm.
lv_ucomm = sy-ucomm.
CASE lv_ucomm.
WHEN 'CANCEL' OR 'EXIT'.
LEAVE PROGRAM.
when 'BACK'.
set screen '0'.
leave screen.
ENDCASE.
ENDMODULE.
Hope this helps,
Regards,
Akash Rana
‎2009 Aug 15 12:49 PM
You should not be getting this blank screen. Ensure you are following this logic
"in PBO
MODULE pbo OUTPUT.
"here you create container and ALV and display it
ENDMODULE.
"in PAI
MODULE pau INPUT.
if sy-ucomm = 'BACK'. "BACK is function code for back button
LEAVE TO SCREEN 0. "this should take you back to selectionn screen
endif.
ENDMODULE.
Regards
Marcin
‎2009 Aug 15 1:56 PM
Hi ,
after the call of function module call write
leave to screen 0.
Regards
Nilesh
‎2009 Aug 15 3:01 PM
Hi Abdul,
when u r calling the screen containing ALV report, check the PAI part of the same screen and do following.
capture sy-ucomm for back button,under that case that case write set screen '0' and leave screen.
MODULE USER_COMMAND_0100 INPUT.
data lv_ucomm type sy-ucomm.
lv_ucomm = sy-ucomm.
CASE lv_ucomm.
WHEN 'CANCEL' OR 'EXIT'.
LEAVE PROGRAM.
when 'BACK'.
set screen '0'.
leave screen.
ENDCASE.
ENDMODULE.
Hope this helps,
Regards,
Akash Rana
‎2009 Aug 17 7:35 AM
Hi Faisal,
I assume u have used the FM 'RESUSE_ALV_GRID_DISPLAY' to display ur ALV. In this, if u haven't specified ur own GUI, the ALV should work fine with the standard GUI ie. return without the blank screen.
But if u have specified ur own GUI status, (using statement SET PF-STATUS ... ) , then make sure that u have handle ur exit functions in the report. As mentioned above, u may use LEAVE TO SCREEN 0 or just LEAVE SCREEN.
Hope it helps ...
Regards...Jaison