12-08-2017 3:40 PM
Hi there,
I'm working on a Z report that passes values to a standard report skipping the selection screen of the standard report, this is working fine. The problem is if, from the standard report (outcome of the Z report) I press the back button, it takes me to the selection screen of the standard report, not back to the Z report, so I have to press back button again to go from the selection screen of the standard report, back to the Z one.
Does anybody know, how can I fix this?.
Thanks in advance for your help.
A. López
12-08-2017 6:34 PM
I believe it's possible to do a call transation <tcode> using <bdc_table>. In the BDC provide the steps to get past the initial screen, then at the end append another dynbegin step followed by an exit like below:
"first lines for doing w/e in the tcode to get past the selection screen
APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.
<bdc>-program = '<program_name>'.
<bdc>-dynpro = '0001'.
<bdc>-dynbegin = 'X'.
<bdc>-fnam = ''.
<bdc>-fval = ''.
APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.
<bdc>-program = ''.
<bdc>-dynpro = ''.
<bdc>-dynbegin = ''.
<bdc>-fnam = 'BDC_OKCODE'.
<bdc>-fval = p_okcode.
"Extra steps in the bdc for when you return to the selection screen to exit
APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.
<bdc>-program = '<program_name>'.
<bdc>-dynpro = '0001'.
<bdc>-dynbegin = 'X'.
<bdc>-fnam = ''.
<bdc>-fval = ''.
APPEND INITIAL LINE TO lt_bdc_data ASSIGNING <bdc>.
<bdc>-program = ''.
<bdc>-dynpro = ''.
<bdc>-dynbegin = ''.
<bdc>-fnam = 'BDC_OKCODE'.
<bdc>-fval = '=EXIT'.
12-11-2017 8:44 AM
Hi Cris,
First of all, thanks for your answer.
Do you know or anyone knows by any chance, a solution without using BDC?.
I would like to avoid BDC usage.
Thanks,
A. López
12-11-2017 9:28 AM
12-11-2017 12:53 PM
Hi there,
Can you please explain a little more how to do it?.
Thanks.
A. López
12-11-2017 9:29 PM
Why "VIA JOB" ? (which means run a program in background i.e. no display)
12-11-2017 2:14 PM
I don't get the point.
I have written a simple report that calls a standard report with variant, displays the list of standard report and returns to my Z report selection screen:
p_repid and p_vari are parameters of my Z report
12-11-2017 5:48 PM
12-12-2017 6:30 AM
Hi Andres,
This may be caused by Process After Input block and a custom procedure that uses:
SET SCREEN <num>.
LEAVE TO SCREEN <num>.
CALL SCREEN <num>.
Call the same transaction once more and enter /h in the command field, hit enter and click on the back button. Then look for above statements. Maybe there is some screen predefined in code that is different than 0 and that's the reason.
01-03-2018 9:39 AM
Thanks to all for your help.
Finally someone help me modifying the code submitted by Volker.
Again, thanks for all your help.
Kind regards,
Andrés López
01-03-2018 2:04 PM
I would recommend marking Volker's answer as correct and submitting what you found to be the correct answer after modification to help others searching in the future.