2009 Apr 14 4:22 PM
Hi,
When i try to execute my report (F8) and it goes to output screen perfectly.
Then if i hit back button(F3) it comes to selection screen that's also fine.
after then if i hit back button(F3) then it goes to output screen again.
actually it has to go to the SE38 - program screen
..........
My GUI logic:
&----
*& Include ZSD_GUILOGIC
&----
&----
*& Module init_0100 OUTPUT
&----
text
----
MODULE init_0100 OUTPUT.
call method cl_gui_cfw=>dispatch.
create the report object
if my_report is initial.
CREATE OBJECT MY_REPORT
EXPORTING
SO_VKORG = so_vkorg[]
SO_VTWEG = so_vtweg[]
SO_DATE = so_date[].
endif.
IF my_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT my_CUSTOM_CONTAINER
EXPORTING
CONTAINER_NAME = _CONTAINER.
CREATE OBJECT my_GRID1
EXPORTING
I_PARENT = my_CUSTOM_CONTAINER.
int_tab = my_report->RETURN_RESULT( ).
CALL METHOD my_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
is_variant = my_layout
i_save = 'A'
i_default = 'X'
I_STRUCTURE_NAME = structure
CHANGING
IT_OUTTAB = int_tab[].
else.
container actually exists.
int_tab = my_report->RETURN_RESULT( ).
MY_grid1->refresh_table_display( ).
endif.
ENDMODULE. " init_0100 OUTPUT
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
to react on oi_custom_events:
CASE OK_CODE.
WHEN 'EXIT'.
PERFORM EXIT_PROGRAM.
when 'BACK'.
clear: my_report, my_CUSTOM_CONTAINER, my_grid1, int_tab.
leave
CALL SELECTION-SCREEN 1000.
WHEN 'REFRESH'.
int_tab = my_report->RETURN_RESULT( ).
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR OK_CODE.
ENDMODULE. " USER_COMMAND_0100 INPUT
&----
*& Form EXIT_PROGRAM
&----
text
----
--> p1 text
<-- p2 text
----
FORM EXIT_PROGRAM .
LEAVE PROGRAM.
ENDFORM. " EXIT_PROGRAM
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN0100'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
2009 Apr 14 4:36 PM
Hi,
Use the following:
WHEN 'BACK'.
SET SCREEN 0. LEAVE SCREEN.
Regards,
Deepak.
2009 Apr 14 4:28 PM
Hi,
Instead of CALL SELECTION-SCREEN 1000.
Use LEAVE TO SCREEN 0.
Thanks
Naren
2009 Apr 14 4:37 PM
2009 Apr 14 4:42 PM
Hi Naren,
when i try to do ur way, after the output of report (after double times F8). it directly goes back to SE38 screen.
from the output of the report screen ...actually i want the screen has to go back to user input screen when i press BACK button(F3) one time.
again if i press back button(f3) , then it goes back to SE38 screen.
Thanks
Prabaharan
Edited by: Prabaharan Rangasamy on Apr 14, 2009 5:46 PM
2009 Apr 14 4:52 PM
Hi,
In the screen attribute make the Next screen as 0 instead of 0100.
(Double click on the screen 100 and in attribute tab Next screen as 0)
and
MODULE USER_COMMAND_0100 INPUT.
to react on oi_custom_events:
CASE OK_CODE.
when 'BACK'.
LEAVE TO SCREEN 0.
2009 Apr 14 4:36 PM
Hi,
Use the following:
WHEN 'BACK'.
SET SCREEN 0. LEAVE SCREEN.
Regards,
Deepak.
2009 Apr 14 4:47 PM
Hi,
How are you calling the screen 0100..?
DO this...
START-OF-SELECTION.
CALL SCREEN '0100'. " This will display the OO ALV.*In the user command code...make sure you have this..
MODULE USER_COMMAND_0100 INPUT.
* to react on oi_custom_events:
CASE OK_CODE.
when 'BACK'.
LEAVE TO SCREEN 0.Hope this helps.
Thanks
Naren
2009 Apr 14 4:54 PM
HI,
Thanks for ur replies.
I am calling selection screen 100 like this.
REPORT ZSD_.
INCLUDE ZSD__TOP.
INCLUDE ZSD_LCL000.
INCLUDE ZSD_GUILOGIC.
initialization.
move 'IEQ000' to so_vrsio.
append so_vrsio.
move 'IEQ' to so_date.
so_date-low = sy-datum.
so_date-high = sy-datum.
append so_date.
start-of-selection.
set the layout
perform prepare_layout changing my_layout.
Thanks
Praba
set the structure
structure = 'ZSD_LEVEL0'.
call the processing screen 0100
set screen '0100'.
2009 Apr 14 4:57 PM
HI Naren,
I have user command code like that.
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
to react on oi_custom_events:
CASE OK_CODE.
WHEN 'EXIT'.
PERFORM EXIT_PROGRAM.
when 'BACK'.
clear: my_report, my_CUSTOM_CONTAINER, my_grid1, int_tab.
LEAVE TO SCREEN 0.
.
CALL SELECTION-SCREEN 1000.
WHEN 'REFRESH'.
int_tab = my_report->RETURN_RESULT( ).
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR OK_CODE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Thanks
Praba
Edited by: Prabaharan Rangasamy on Apr 14, 2009 5:57 PM
2009 Apr 14 4:55 PM
Hi,
Instead of set screen '0100'...
Give CALL SCREEN '0100'
Thanks
Naren
2009 Apr 14 5:00 PM
2009 Apr 14 11:02 PM