‎2006 Jun 30 9:54 AM
Hello experts,
Please help me on my dillema. I have 2 reports, zreport1 and zreport2. Now, zreport1 submits
values via selection-screen to zreport2. Now here is the problem, when I press 'BACK' on the
selection-screen of zreport2(rememeber we used submit statement via selection-screen on zreport1)
instead of going back to the selection-screen of zreport1 it goes to the source code of zreport1 which
is wrong. And there are 2 selection-screens on zreport1 depending on the user if he is controller or not.
So what I need to do here is that whenever I press 'BACK' either I'm adding or modifying or displaying records
it should go back to whatever screen I called in zreport1.
Here's a diagram.
************
ZREPORT1**
if v_controller = 'X'
display selection-screen 1500
else
display selection-screen 500
endif.
if user wants to add records, submit values from zreport1 to zreport2
and return via selection-screen.
*same goes for edit option.
if user wants to display, get all records then display in ALV.
************
ZREPORT2**
So lets assume user decides not to add records and decides to go back. so he presses
the BACK button in selection-screen of zreport2. Now here's the nasty part, instead of going back to either
selection-screen 500 or 1500 in zreport1, it goes to the source code of zreport1!. I hope I explained it clearly.
Again, thanks a lot guys for your help!
‎2006 Jun 30 10:01 AM
Hi,
Try this
START-OF-SELECTION.
*----------Sumbit Report-------*
Sumit Report......AND RETURN
*----------Check Condition & back to select screen-------*
IF condition.
MESSAGE s207(zusm_gen) DISPLAY LIKE lc_e .
EXIT.
ENDIF.
Set something in the memmory.
this can be used to check the completion of the report.
if the 2nd report executed porperly then u further execute the code.
If u dont have any thing to execute after sumbit report
then u can do is.
START-OF-SELECTION.
*----------Sumbit Report-------*
Sumit Report......AND RETURN
MESSAGE s207(zusm_gen) DISPLAY LIKE 'S' .
EXIT.
Message was edited by: Manoj Gupta
‎2006 Jun 30 10:42 AM
Hi,
Feel Free to ask Further Question.
I think ur problem will be solved.
Reward Points & close the thread if solved.
Regards
contact @
manoj.baijnath@wipro.com.
‎2006 Jun 30 2:01 PM
Hi guys,
I still need help on this.Again, thank you and take care!
‎2006 Jun 30 2:48 PM
Hi,
Try something this way. I am comparing sy-ucomm for BACK button fuction code and calling the First Screen.
REPORT abc.
SELECTION-SCREEN BEGIN OF SCREEN 500 .
PARAMETER c AS CHECKBOX.
SELECTION-SCREEN END OF SCREEN 500 .
SELECTION-SCREEN BEGIN OF SCREEN 100 .
PARAMETERS mara TYPE mara-matnr .
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN BEGIN OF SCREEN 200 .
PARAMETERS p_werks TYPE marc-werks .
SELECTION-SCREEN END OF SCREEN 200.
CALL SELECTION-SCREEN 500.
IF c EQ 'X'.
CALL SELECTION-SCREEN 100.
IF sy-ucomm EQ 'CBAC'. "Function code for BACK
CALL SELECTION-SCREEN 500.
ENDIF.
ELSE.
CALL SELECTION-SCREEN 200.
IF sy-ucomm EQ 'CBAC'. "Function code for BACK
CALL SELECTION-SCREEN 500.
ENDIF.
ENDIF.
Regards,
Arun Sambargi.