Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Obsolete Language Elements →  Obsolete data and communication interfaces →  CPI-C Interface →  COMMUNICATION 

COMMUNICATION - comstep

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Obsolete Syntax

... {INIT DESTINATION dest}
  | ALLOCATE
  | ACCEPT
  | {SEND BUFFER buf}
  | {RECEIVE BUFFER buf DATAINFO dat STATUSINFO stat}
  | DEALLOCATE ... .

Alternatives

1. ... INIT DESTINATION dest

2. ... ALLOCATE

3. ... ACCEPT

4. ... SEND BUFFER buf

5. ... RECEIVE BUFFER buf DATAINFO dat STATUSINFO stat

6. ... DEALLOCATE

Effect

There are different alternatives for specifying comstep, each of which is responsible for a connection step.

Alternative 1

... INIT DESTINATION  dest

Effect

The connection between the programs initialized by specifying dest. A flat character-like data object of the length 8 is expected for dest and when executing the statement, the data object contains a value from the column SDEST of database table TXCOM.

On initialization, the system automatically executes an authorization check on the authorization object S_CPIC. The authorization can be checked before the connection is established using the function module AUTHORITY_CHECK_CPIC.

Alternative 2

... ALLOCATE

Effect

Establishes a connection to the partner identified in the previous addition DESTINATION. At the same time, a start request is passed to the partner, if it is a program.

Alternative 3

... ACCEPT

Effect

This addition can be used to accept the established connection in a called partner program. After authentication, the called program is in receive status.

Alternative 4

... SEND BUFFER buf

Effect

Sends data to the partner program. A data object can be specified for buf, for which all flat elementary types are permitted and the memory requirement of 32 KB cannot be exceeded. On execution of the statement COMMUNICATION, the content of buf is passed to the partner program.


Note

Information loss can occur if, for example, the communication partners have different number formats. This can be avoided by using only character-like types for transferring the data. Furthermore, the data is only completely transferred if the sending buffers and receiving buffers have the same structure and length.


Notes

  • A connection step opened with SEND must be followed by a connection step opened with RECEIVE.
  • Information loss, for example as a result of different number formats between the communication partners, is avoided if only character-type types are used for transferring the data. Furthermore, the data is only transferred completely if the sending and receiving buffers have the same structure and length.

Alternative 5

... RECEIVE BUFFER buf DATAINFO dat STATUSINFO stat

Effect

Receives data from the partner program. A data object can be specified for buf, for which all flat elementary types are permitted and the memory requirement of 32 KB cannot be exceeded. On execution of the statement COMMUNICATION, the content of buf is received by the partner program.

After the execution of the statement, the data object dat contains information about whether the data is sent completely and the content of the data object stat indicates whether the current program is in send or receive mode. Only byte-like data objects are allowed for dat and stat, the length should not be less than 4 bytes. The code for the values in dat and stat can be extracted from the include program RSCPICDF. Here, data objects with a descriptive name and start values are declared which can be compared with dat and stat.


Note

A connection step opened with RECEIVE must be followed by a connection step opened with SEND.

Alternative 6

... DEALLOCATE

Effect

The connection is terminated and all memory areas are released.