Entering content frameABAP Programs Locate the document in its SAP Library structure

Any ABAP programs with type 1, M, or F that have their own screens can be called externally in their own internal session and with their own SAP LUW.


This graphic is explained in the accompanying text

Executable Programs

You can call executable programs directly using the statement

SUBMIT <prog> ... [AND RETURN].

If you omit the AND RETURN addition, the system terminates the calling program and calls the new executable program <prog>. The internal session of the calling program is replaced by the internal session of the new program. When the new program has finished, control returns to the point from which the calling program was started.

If you use the AND RETURN addition, the executable program <prog> is started in a new session. The internal session of the calling program is returned, and control returns to the calling program after the new program has finished.

All Programs with Screens

You can assign a transaction code to any screen of a program. Normally, you assign a transaction code to a single screen in a module pool (type M program). This then allows you to start the program using one of the statements

LEAVE TO TRANSACTION <tcode> ...

or

CALL TRANSACTION <tcode> ...

The program starts by processing the screen that you specified when you defined the transaction code. This is called the initial screen.

If you use LEAVE TO TRANSACTION, the calling program terminates, and its internal session is replaced by the internal session of the new program. When the new program has finished, control returns to the point from which the calling program was started.

If you use CALL TRANSACTION, the calling program is started in a new internal session, and the internal session of the calling program is retained. When the new program has finished, control returns to the point from which the calling program was started.

Leaving a Called Program

To leave a program that you have called, use the ABAP statement

LEAVE PROGRAM.

 

 

 

Leaving content frame