SAP provides us with the Java Platform Program's connection library SAP JCO3, which connects all Java programs with the SAP Server data transfer:
SAP also provides us with a connection library for the. NET Platform program SAP NCO, which connects the Windows platform program with the SAP Server data transfer:
SAP is connected to a peripheral system, and the program is implemented in two ways.
The first: We use the SAP server as a server-side server, and the peripheral interface program as client clients. Client initiates a request to invoke an RFC function in the SAP server to implement the desired operation or query.
This method is initiated by the client, the source is generated at the client, and the frequency of the call is also client controlled. This is called "Request Response" mode in this project. That is, the client initiates the request and the server responds.
The client program uses this method and requires the user to populate the SAP system with a password on the client. The client program then automatically log in to the SAP server and invoke the RFC function. There is a lot of code online for that way.
The second way: online data is small, there are some scenarios is the SAP server unsolicited request, such as a receipt operation, immediately need to inform the peripheral system. and the receipt operation itself, we do not know what the user when
Waiting to do this thing. (If the first method, but also can be implemented, but requires the client to constantly poll the server, if the number of polling too many times, we may worry about system performance, if not many polling times, may not
Immediately do the server with the peripheral system receipt Operation information synchronization) This time, the SAP server needs to be client-side, the peripheral program as the server end server. Why do you say that because the peripheral program needs to run all the time,
Waiting for a request from the SAP server, the perimeter is working like a server. This model is referred to as the "contract release" model in this project.
How is SAP's middleware interface program implemented in this way?
In fact, SAP does not require the peripheral program to write a true network server, but rather, first using the client way, long connect to the SAP server, and then based on this long connection, the RFC program to push the data to the peripheral program.
Let's take a look at the parameter file for the way the perimeter program is written:
As can be seen from the parameter file, the peripheral program, as the server side, first uses the Parameters section in A01.JCO.CLIENT to make a long connection to the SAP server, which is the same as the first method.
Once the connection is successful, you can view it in the SAP system using the SMGW transaction code:
A01. JCO. The server Parameters section is the SAP server to push the data to the peripheral program needs to use parameters, configured in Sm59 "Sapjco", in the SAP ABAP program is used:
Before use, there is also a data declaration of the empty function "zmm_if_fm016".
The peripheral server program waits for SAP to push data through this empty function "zmm_if_fm016".
TAB1,TAB2,TAB3 is the data that SAP gives to the peripheral program, and after the peripheral program is processed, it can return the SAP server information via return.
SAP's JCO and NCO libraries are available inhttp://service.sap.com/connectors Download To, SAP provides detailed instructions, and code examples.
This article is just the second way, the development of understanding the SAP interface in the peripheral program as a server, different from the real network server, to avoid unnecessary misunderstanding.
Description of the SAP Interface program mode (Taste of ABAP)