Skip to Content
1

Back to a Z report after a call transaction.

Dec 08, 2017 at 03:40 PM

163

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded

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

0
Former Member
Andrés López

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.

2
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Volker Binder Dec 11, 2017 at 02:14 PM
2

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


wkk8l.png (3.4 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Yes, I'm wondering how OP calls the other report exactly.

0
avatar image
Former Member Dec 08, 2017 at 06:34 PM
1

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'.
Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

Hi,

Try with 'SUBMIT VIA JOB' statement.

0
Former Member
Always Learner

Hi there,

Can you please explain a little more how to do it?.

Thanks.

A. López

0

Why "VIA JOB" ? (which means run a program in background i.e. no display)

1
Bartosz Siminski Dec 12, 2017 at 06:30 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded