SAP_ABAP_Interview_About the three processing types of Function Module functions

Regarding the technical point of Function Module, the following questions will generally be examined during the interview process:

1 Update mode of function processing type

        Generally, questions will be asked about asynchronous and transactions (logical unit LUW), the debugging method of asynchronous functions, and the execution process of SM13 monitoring update functions (V1 and V2 modes).

2 Parameters of the function

         When object parameters are passed in, they cannot be changed in the method body. When values ​​are passed in, they can be changed in the method body. Only values ​​can be transferred in remote and update modes.

3 Commonly used types of RFC and usage scenarios

Synchronous RFC, Asynchronous RFC, Transaction RFC, Queue RFC, Parallel RFC 

synchronous RFC, synchronous RFC

asynchronous RFC, asynchronous RFC, multiple concurrent calls

Transactional RFC, transactional RFC, multiple concurrent calls, multiple calls for LUW group processing

Queue RFC, queue(d) RFC, multiple concurrent calls, multiple calls for LUW group processing, ensuring the processing order of the transmitted data

Parallel RFC, Parallel RFC, multiple concurrent calls, can handle multiple asynchronous RFCs at the same time

4 RFC function processing of big data

        Some interviewers will ask if you have experience in processing big data. In other words, if you throw 20,000 orders from a third-party system at one time, how will the SAP RFC function handle it?

Using parallel RFC + asynchronous RFC, the so-called interview creates a rocket, and after joining the job, you don't need to get too entangled with the implementation details, just click there!


5 SAP Function Module, Introduction

5.1 SAP Function Module has three processing types, namely: regular, remote and update mode. The regular update mode is the most commonly used. The code logic in the method body is generally to write query logic. The second is 'remote mode', which is remote update. The usage scenario of the mode is generally to call external systems and connect through the jco package (such as: connection with WMS, MES systems); the third is the 'update mode'.

5.2 SAP Function Module, the debugging modes of the three processing types are also different. When debugging in 'regular mode', internal breakpoints are set, and in 'remote mode', remote breakpoints are set, but the debugging account needs to be specified, that is, the third system debugs SAP When debugging the account in the system connection pool, you must turn on the update debugging mode and use SM13 to monitor the update process. If the update fails, a record will be left in SM13. Go in and read the log to troubleshoot the problem.

5.3 illustrate the importance of the Update Module mode through a real case. When the author was working in a battery factory, they developed a WMS system using ABAP language, in which they designed some custom tables, including master-slave relationships, connection relationships, etc. etc. When updating, transactions in update mode are rarely used to submit updates. Instead, ordinary functions are used to process updates. The final problem is that the data of several custom tables is dirty-read, causing errors from time to time. As a newcomer, I should be blamed for this. Through analysis, I put Log before and after the custom table in more than 50 places, and stored it in the form of json String. By analyzing the logs at similar times, I found out possible dirty reads. The location of the data and then modifications.


5.4 Update mode experiment

5.4.1 After Modify 1 and Modify 2 are executed, submit LUW.

5.4.2 Submit data update and generate data in the bottom table

5.4.3 TEST function, synchronous update case

 

5. 4.5 TEST function, asynchronous update added IN UPDATE TASK, asynchronous function debugging

 

5.4.6 SM13 monitors the execution process of V1 mode

 

 


5.4.7 Experimental conclusion: Asynchronous processing case submitted in a transaction:

Guess you like

Origin blog.csdn.net/java_zhong1990/article/details/134546016