Purpose
Communication statements of the CPI-C Starter Set are implemented in the ABAP programming language. They are suitable for setting up simple communication.
This allows an ABAP program to actively set up a connection to one or more external application programs in order to send data directly to these programs.
Conversely, an external program can set up a connection to an SAP System and send a start request for an ABAP program. A correct logon to the SAP System is necessary for this type of connection setup.
The ABAP statements are initiated by the key word COMMUNICATION. The key word is followed by a function statement, which determines the communication operation to be performed. The function statement is followed by further parameters.
Features
CPI-C calls and their meaning
CPI-C Call in C |
CPI-C Call in ABAP |
Explanation | |
CMINIT |
COMMUNICATION INIT |
Initialize connection | |
CMALLC |
COMMUNICATION ALLOCATE |
Set up connection | |
CMACCP |
COMMUNICATION ACCEPT |
Accept connection | |
CMSEND |
COMMUNICATION SEND |
Send Data | |
CMRCV |
COMMUNICATION RECEIVE |
Receive data | |
CMDEAL |
COMMUNICATION DEALLOCATE |
Close the connection | |

As of R/2 Release 5.0 and in R/3, the parameter RETURNCODE <rc> is supported as an option. With this, you receive a return value.
If you want to perform a detailed problem analysis, you should also analyze the entries in the system log and the system-specific traces.
See also:
Agreements Between Sender and RecipientCPI-C Implementation in ABAP