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

ALV Navigation

Former Member
0 Likes
607

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
553

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

4 REPLIES 4
Read only

MarcinPciak
Active Contributor
0 Likes
553

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

Read only

Former Member
0 Likes
553

Hi ,

after the call of function module call write

leave to screen 0.

Regards

Nilesh

Read only

Former Member
0 Likes
554

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

Read only

Former Member
0 Likes
553

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