‎2007 Feb 24 12:26 AM
Hi ,
Iam woking on a ALV report where I have provided check boxes for user to select deslect sales orders .
when user first selects and deselects records and click back button it is coming to the screen with check boxes selected and then to my selection screen.
I tried using leave to screen 1000. but when i click on that back buton its not leaving the program where as going ALV out put.
tried using leave program. But user needs to come to selection screen after clicking back insted os leaving the program.
Very urgent Please help.
‎2007 Feb 24 12:30 AM
try using leave to screen 0.
and submit ABAP_PROGRAM_NAME. it will take user to the selection screen.
hope this will help
Ashwani
‎2007 Feb 24 4:42 AM
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
SET SCREEN '0'
OR
LEAVE PROGRAM.
WHEN 'EXIT' OR 'CANC'.
PERFORM exit_program.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. USER_COMMAND_9000 INPUTHope this helps.
‎2007 Feb 24 6:22 AM
If the BACK button is in the toolbar of ALV container then proceed as follows
Assume u r code is as below
CLASS c1 DEFINITION.
PUBLIC SECTION.
METHODS:
toolbar FOR EVENT toolbar OF cl_gui_alv_grid IMPORTING e_object
e_interactive,
user_command FOR EVENT user_command OF cl_gui_alv_grid IMPORTING
e_ucomm.
ENDCLASS.
CLASS c1 IMPLEMENTATION.
METHOD toolbar.
DATA: ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
MOVE 'BACK' TO ls_toolbar-function.
MOVE 'BACK' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
METHOD user_command.
<b> CASE e_ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
</b> ENDMETHOD.
If the BACK button is outside the container then proceed as follows
<b>MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT</b>