Application Development and Automation 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: 
Read only

aborting the pgm execution

Former Member
0 Likes
869

Hi all,

I am calling a report pgm from module pool pgm. like this:

in PAI of screen 0001.

if sy-ucomm eq 'INL'.

call transaction 'XYZ'.

endif.

transaction XYZ is assigned to report pgm.

when i press particular button on module pool screen report gets called. But when I try to execute the report it is coming back to module pool screen.

what can be done to avoid this?

Regards

Saurabh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
821

Insteda of assigning the report program with a tcode and calling that tcode using call transaction, you can use the

"leave to list processing" syntax.

Regards,

Ravi

7 REPLIES 7
Read only

Former Member
0 Likes
822

Insteda of assigning the report program with a tcode and calling that tcode using call transaction, you can use the

"leave to list processing" syntax.

Regards,

Ravi

Read only

hymavathi_oruganti
Active Contributor
0 Likes
821

for calling a report from a module pool there are two options

1. leave to list processing

LEAVE LIST PROCESSING returns back

2. submit <report> [and return]

and return option will return back

Read only

Former Member
0 Likes
821

hi saurabh,

try

LEAVE TO { {TRANSACTION tcod} | {CURRENT TRANSACTION} }.

Addition:

... AND SKIP FIRST SCREEN

Effect

Ends current processing and starts the (new) transaction tcod. All previous internal sessions are deleted from the stack and one new internal session is opened for the program of the transaction that was called. When this session has finished, the system returns to the next higher area menu.

If you specify CURRENT TRANSACTION (as of Release 6.20), the current transaction is called with exactly the same transaction code it was called with using CALL TRANSACTION or LEAVE TO TRANSACTION. With the exception of parameter or variant transactions, this is the transaction code that is also in the system field sy-tcode.. In the case of parameter or variant transactions, it is their transaction code, while sy-tcode contains the name of the implicitly-called dialog transaction.

or simply u can call a report with LEAVE TO LIST-PROCESSING.

hope this helps,

priya.

Read only

Former Member
0 Likes
821

Hii

YOu can go to list processing from a module pool program using "leave to list processing" statement.

If you want to call a report, then you can use a submit report statement.


SUBMIT rm07mlbd
with s_datum in r_datum
WITH s_LGORT in r_LGORT
WITH WERKS = '1000'
EXPORTING LIST TO MEMORY AND RETURN.

hope this helps

Thanks & regards

Naresh

Read only

Former Member
0 Likes
821

Hai Saurabh

use Leave to screen '0'.

Thanks & Regards

Sreenivasulu P

Read only

Former Member
0 Likes
821

Guys Found the solution...

use subit <pgm name> and return.

Thanks to all of u..

Saurabh.

Read only

Former Member
0 Likes
821

tx