‎2009 May 21 12:36 PM
hi,
I have some problem with screen programming.
In my program
1) i m displaying selection screen
2) after executing it one ALV grid is displayed on (below )same selection screen only.
3) On that alv grid there is one button after clicking on that one list is displayed.
Now what i want is after clicking on back button on that list i want to display the previous selection screen with that alv grid.
regards,
Kirti
‎2009 May 21 12:44 PM
Hi,
Create two subscreens for grid and list.
You can write the flow logic in PAI.
You can call the screens as you wish.
Regards
‎2009 May 21 12:51 PM
Hi,
write this code..
after clicking back
PROCESS AFTER INPUT.
* Module Screen Exit and Cancel Operation
MODULE exit_screen AT EXIT-COMMAND.
MODULE exit_screen INPUT.
CASE ok_code.
WHEN 'BACK'.
LEAVE TO SCREEN 1020. "write you screen number what ever you want or write the screen which is having alv report
WHEN 'EXIT' or 'CANCEL'.
* Leave the program or /n
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " EXIT_SCREEN_ INPUT
or
"call the belwo function module instead of creating subscreen.
"it will showe you the report in alv format in the POP_UP once you close the window or
" click back the old scree will apeear
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
i_title = "sub screen"
i_selection = 'X'
i_screen_start_column = 5
i_screen_start_line = 5
i_screen_end_column = 70
i_screen_end_line = 20
i_tabname = 'T_BATCH' "table name
it_fieldcat = gt_fieldcat_drd[] "field catalog
IMPORTING
es_selfield = gc_selfield
TABLES
t_outtab = t_batch "outptu table
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
Prabhudas
Edited by: Prabhu Das on May 21, 2009 5:22 PM
‎2009 May 21 2:07 PM
HI Kirti,
just use Leave to screen <Screen No> in pai of the list screen.
Ex.
case sy-ucomm.
WHEN 'BACK'
LEAVE TO SCREEN 107.
endcase.
hope this will work..
‎2009 May 22 12:22 PM
Hi..
Specify the screen number as 0.
case sy-ucomm.
WHEN 'BACK'
LEAVE TO SCREEN 0.
endcase.
‎2009 May 27 6:33 AM
‎2009 May 27 10:18 AM
in the code, see this line
when 'back'.
leave to screen 0.
here 0 means the nitial out-put screen, and other number means the screen number which u want to go when clicked on back button.