Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the call between SAP ABAP programs

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to understand the call between SAP ABAP programs, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

First, synchronous call calls other ABAP programs synchronously from one program. There are two ways:

1. The calling program is interrupted, and when the called program is finished, the calling program continues to execute. For example, when CALL FUNCTION SUBMIT AND RETURNCALL TRANSACTION calls FM using CALL FUNCTION 'AAA', the corresponding FUNCTION GROUP is loaded into the internal session where the caller is located. When the FM is finished, the calling program is then executed. FUNCTION GROUP and its GLOBAL DATA are kept in the internal session until the caller finishes. When the caller calls the FM again, the corresponding FUNCTION GROUP will not be loaded again. The GLOBAL DATA of this FUNCTON GROUP is the same as when it was first called. When using SUBMIT AND RETURN or CALL TRANSACTION, a new internal session is actually inserted, and when the called program is finished, the newly inserted internal session will be deleted and continue to execute the calling program. You can use the leave program statement to end the program.

2, the calling program is terminated and the called program starts execution. For example, SUBMIT LEAVE TO TRANSACTION. After using the summary statement, the calling program is removed from the internal session, and the called program is loaded into the internal session. After using LEAVE TO TRANSACTION, all internal session in the current external session will be deleted and a new internal session will be generated, and the called tcode will be loaded into the new internal session. In particular, after using this statement, ABAP MEMORY will be initialized, meaning that you cannot pass a value to the called tcode through ABAP MEMORY.

Second, the asynchronous call of FUNCTION MODULE CALL FUNCTION 'AAA' STARTING NEW TASK PERFORMING ON END OF TASK EXPORTING. After using the above statement, AAA and the program that called it run in parallel. You can use the RECEIVE RESULTS FROM FUNCTION 'AAA' statement in to get the results of the FUNCTION run. It is worth noting that the processing type of FM in the form of STARTING NEW TASK must be REMOTE-CAPABLE MODULE.

Third, LOGICAL MEMORY a user session can have multiple external session, it is understandable that you have opened several SAP windows, there are several external session, generally set to 6. There can be more than one internal session in an external session (up to 20, think about why the LSIND of LIST cannot exceed 20). Generally speaking, a program is processed in an internal session. You can use ABAP MEMORY (EXPORT/IMPORT) and SAP MEMORY (GET/SET) to pass data between different programs. A user session has a SAP MEMORY, and all session in this user session can access SAP MEMORY, but SAP MEMORY is generally used to pass values between different external session internal session. Each external session contains an ABAP MEMORY, and internal session belonging to this external session can access the ABAP MEMORY,ABAP MEMORY suitable for passing values between different internal session of an external session. When external session terminates, its ABAP MEMORY is automatically released.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report