SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exit out of a program called by Std program

ricky_shaw
Contributor
0 Likes
548

Hi Experts,

I have a Z* appl form (tcode EFRM) whihc has some subroutines & is called by a std print Func Module(FM).

This Z* appl form gets called multiple times.

I need to terminate/halt this completely moving fwd based on a flagged condition as below:

If gv_flag = 'X'

exit.

endif.

I tried putting exit / return statements in various places. The program control is exiting out of the processing block

but again in nested calls the application form is getting called.

How can i handle this?

1 ACCEPTED SOLUTION
Read only

srinivasankh
Contributor
393

Hi Ricky,

Within Application Form if you want to terminate (or cancel) the current print job one of the better way is to use macros provided by SAP.

You can try any of the below depending on your scenario along with required parameters:

mac_print_cancel

mac_msg_putx

Thanks,

Srini

View solution in original post

1 REPLY 1
Read only

srinivasankh
Contributor
394

Hi Ricky,

Within Application Form if you want to terminate (or cancel) the current print job one of the better way is to use macros provided by SAP.

You can try any of the below depending on your scenario along with required parameters:

mac_print_cancel

mac_msg_putx

Thanks,

Srini