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

How to Terminate or leave program at Calling program.

former_member196331
Active Contributor
0 Likes
1,284

I am facing one problem.

I am calling standard tcode : Now I am calling module pool program
Like Call transaction ztcode.
here user may press canecl button, Now i am Where i was written call transaction ,I came to here. Here my problem is now i want to exit from the program.
here two possible things.
If user press cancel i need to exit from the program from (Call transaction ) program.
else.
nothing, it will do what it's own work.How to get sy-ucomm at (Call transaction) program.
I tried import and export. Export passing sy-ucomm but at import it is not importing , I was written call transaction at Standard function module (enhancement point).

At module pool program
MOVE:ok_code TO t_syucomm.

EXPORT t_syucomm TO MEMORY ID sy-uname.
LEAVE PROGRAM.

At calling program
import t_syucomm to t_syucomm1 from MEMORY id sy-uname.

Nothing import at calling program.

Once i press cancel at module pool, Need to terminate from the module pool and calling program too.
Any information please update me.

I am facing one problem.

I am calling standard tcode : Now I am calling module pool program
Like Call transaction ztcode.
here user may press canecl button, Now i am Where i was written call transaction ,I came to here. Here my problem is now i want to exit from the program.
here two possible things.
If user press cancel i need to exit from the program from (Call transaction ) program.
else.
nothing, it will do what it's own work.How to get sy-ucomm at (Call transaction) program.
I tried import and export. Export passing sy-ucomm but at import it is not importing , I was written call transaction at Standard function module (enhancement point).

At module pool program
MOVE:ok_code TO t_syucomm.

EXPORT t_syucomm TO MEMORY ID sy-uname.
LEAVE PROGRAM.

At calling program
import t_syucomm to t_syucomm1 from MEMORY id sy-uname.

Nothing import at calling program.

Once i press cancel at module pool, Need to terminate from the module pool and calling program too.
Any information please update me.

3 REPLIES 3
Read only

roberto_forti
Contributor
1,060

Hi, Have you searched about ABAP Statements in the Screen Flow Logic?

Regards,

Read only

1,060

Leave program, Or Set screen 0 , leave to screen 0

Call screen '100'.leave list processing.

Is there any thing pending.

Read only

0 Likes
1,060

Hi Kali, following SAP information as well as try to test and debug it. however, is the best way to understand and solve it.