Description of SAP Interface Program (taste ABAP)

Source: Internet
Author: User
Tags rfc

Description of SAP Interface Program (taste ABAP)

SAP provides the Connection Library SAP jo3 for JAVA platform programs, thus connecting all JAVA programs to the SAP server for data transmission:

SAP also provides the. net platform program Connection Library sap nco for us, thus connecting the WINDOWS platform program with the SAP server data transmission:


SAP is connected to peripheral systems in two ways.
First, we often use the SAP server as the server and the peripheral interface program as the client. The client initiates a request and calls the RFC function on the SAP server to perform the required operations or queries.
This method is initiated by the client. The source is generated on the client, and the call frequency is also controlled by the client. This method is called the "Request Response" Mode in this project. That is, the client initiates a request and the server responds.
To use this method, enter the user and password used to log on to the SAP system on the client. Then the client automatically logs on to the SAP server and calls the RFC function. This method has many online code.

Method 2: there are few materials on the Internet. In some scenarios, the SAP server initiates a request. For example, after performing a shipping operation, you need to notify the peripheral system of this information immediately. The shipping operation itself does not know the user's time
Wait to do this. (The first method can also be used, but the client needs to keep polling the server. If the number of polling requests is too large, we may worry about system performance. If the number of polling requests is too small, we may not be able
The receiving operation information of the server is synchronized with that of the peripheral system. In this case, the SAP server is used as the client and the peripheral program as the server,
Wait for the request from the SAP server, and the peripheral program will always work like the server. This mode is called the contract release mode in this project.


How does SAP's middleware interface program implement this method?
In fact, SAP does not require the peripheral program to write a positive network server. Instead, it uses the client method to connect to the SAP server for a long time and then pushes data to the peripheral program based on the persistent connection.

Let's take a look at the parameter file written by the peripheral program in this way:


From the parameter file, we can see that, as the server side, the peripheral program will first use the parameter section in A01.JCO. CLIENT to establish a persistent connection with the SAP server, which is consistent with the first method.

After the connection is successful, you can view it in the SAP system using the SMGW transaction code:


The A01.JCO. SERVER parameter section is the required parameter for pushing data from the sap server to the peripheral program. "SAPJCO" is configured in sm59, which is used in the sap abap program as follows:


Before using the FUNCTION, you must create an empty FUNCTION "ZMM_IF_FM016" with only data declarations ".


The peripheral server program waits for SAP to push data through the empty FUNCTION "ZMM_IF_FM016.
TAB1, TAB2, and TAB3 are the data that SAP sends to the peripheral program. After processing, the peripheral program can RETURN the SAP server information through RETURN.



SAP's JCO and NCO libraries can both be downloaded from the http://service.sap.com/connectors, which provides detailed instructions and code examples.

This article only focuses on the second method. during development, we will understand how the peripheral program in the SAP interface works as the server method. Different from the normal network server, we will avoid unnecessary mistakes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.