Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Back to a Z report after a call transaction.

andlopezgo
Discoverer

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 REPLIES 10

former_member221827
Active Participant

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'.

0 Kudos

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 Kudos

Hi,

Try with 'SUBMIT VIA JOB' statement.

0 Kudos

Hi there,

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

Thanks.

A. López

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

former_member226519
Active Contributor

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

0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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

former_member221827
Active Participant

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.