Calls between SAP ABAP program

More public concern number: SAP Technical 

I can focus on my public number: SAP Technical

A synchronous call synchronous call from a program other ABAP programs, there are 2 ways:
1, the caller was interrupted, when the calling program is finished, the caller continues. Such as: CALL FUNCTION <function> SUBMIT < program> AND RETURNCALL TRANSACTION <tcode> using CALL FUNCTION 'AAA' FM calls when the corresponding FUNCTION GROUP is loaded into the internal session where the calling program. When FM is finished, then the calling program. FUNCTION GROUP GLOBAL DATA and it would have been saved in the internal session until the end of the calling program. When caller call this FM again, it does not load the appropriate FUNCTION GROUP again. When the content of FUNCTON GROUP GLOBAL DATA and the first call it the same. Use SUBMIT <program> AND RETURN or CALL TRANSACTION <tcode> when actually inserted a new internal session, when the called program is finished, the newly inserted internal session will be deleted, continue with the caller. You can use the leave program statement to end the program. 


2, the caller is finished, the called program started. Such as:. SUBMIT <program> LEAVE TO TRANSACTION <tcode> After using the SUBMIT statement, calling the program has been deleted from the internal session is located, called program is loaded into the internal session. After using LEAVE TO TRANSACTION <tcode>, all current internal session external session in will be deleted, and produces a new internal session, to be called tcode will be loaded into the internal session of the new. In particular, note that after using this statement, ABAP MEMORY will be initialized, meaning that you can not pass through the ABAP MEMORY tcode value to be called. 


After two, FUNCTION MODULE asynchronous call CALL FUNCTION 'AAA' STARTING NEW TASK <taskname> PERFORMING <subroutine> ON END OF TASK EXPORTING ..... Using the above statements, AAA, and the program will call its run in parallel. FUNCTION operation results may be obtained using RECEIVE RESULTS FROM FUNCTION 'AAA' statement <subroutine> in. It is worth noting that, with the STARTING NEW TASK forms processing type FM must if the REMOTE-CAPABLE MODULE.

 Three, LOGICAL MEMORY a user session can have multiple external session, you can understand SAP opened a few windows, there are several external session, usually set to 6. An external session where you can have multiple internal session (up to 20, think about why the LIST of LSIND not exceed 20). A program in a general internal session is in process. Data can be transferred between different procedures ABAP MEMORY (EXPORT / IMPORT) and SAP MEMORY (GET / SET). A user session has a SAP MEMORY, the user session where all the session can access SAP MEMORY, but SAP MEMORY generally used for internal session pass values ​​between different external session. Each external session contains a ABAP MEMORY, belong to the external session can access the internal session ABAP MEMORY, ABAP MEMORY internal session for a different external session pass value. When the external session is terminated automatically will release its ABAP MEMORY.
 

Published 686 original articles · won praise 106 · views 920 000 +

Guess you like

Origin blog.csdn.net/SAPmatinal/article/details/103984993