1. COMMUNICATION INIT DESTINATION dest ID id.
2. COMMUNICATION ALLOCATE ID id.
3. COMMUNICATION ACCEPT ID id.
4. COMMUNICATION SEND ID id BUFFER f.
5. COMMUNICATION RECEIVE ID id
...BUFFER f
...DATAINFO d
...STATUSINFO s.
6. COMMUNICATION DEALLOCATE ID id.
The COMMUNICATION statement allows you to develop applications
which perform direct program-to-program communication. The basis for
this is CPI-C (Common Programming Interface - Coummunication),
defined by IBM within the context of SAA standards as a
standardized communications interface.
The COMMUNICATION statement provides the essential parameters
for implementing simple communication. Its starter set covers the
following functionality:
Establishing a connection
Accepting a communication
Sending data
Receiving data
Closing a connection
The other essential part of such a communication is an ABAP/4
program containing a FORM routine which is executed when the
connection has been established. This program may be in an R/3
System or an R/2> System.
Here, you should be aware that the application programs themselves
declare a protocol. In particular, logon to the partner SAP System must
be performed in the calling program. The partner programs must also
manage different character sets, e.g. ASCII - EBCDIC themselves.
A facility known as the Remote Function Call ( RFC ) has now been
developed to save users from having to deal with these problems.
External programs (e.g. a program written in C on a
UNIX workstation) can also be used as partner programs. For
this purpose, SAP provides a platform-specific development library. For
more detailed information about communication in the SAP System, you
can refer to the manual
SAP Communication: Programming
Further information about communication can be found in any of the
following literature:
IBM SAA
Common Programming Interface
Communication Reference
SC 26-4399
X/Open Developers' Specification CPI-C
X/Open Company Ltd.
ISBN 1 872630 02 2