The COMMUNICATION RECEIVE statement causes the transmission of the send buffer along with the send permission, and waits for data.


ID Conversation ID
Length Use this parameter to specify which part of the specified receive buffer should be used. Optional; if you do not specify a length, the system uses the whole receive buffer. The field must have type P.

HOLD This addition (without a field) causes the work process to be stopped (no roll- out/roll-in) while it waits from the RECEIVE.
You would use this, for example, when using RECEIVE within a SELECT loop.


BUFFER Receiving buffer (contains data received)
RECEIVED Number of character received This field must have the type X4.
DATAINFO Information on whether the receive buffer was large enough for the incoming SEND packet. This field must have the type X4.
STATUSINFO Information on the sender authorization. This field must have the type X4.

buffer (or section of the buffer) was large enough to receive the entire SEND packet.

DATAINFO can have the following values:

CM_NO_DATA_RECEIVED --> No data received
CM_COMPLETE_DATA_RECEIVED --> Data received and RECEIVE buffer is large enough
CM_INCOMPLETE_DATA_RECEIVED --> Data received but RECEIVE buffer to small to receive entire SEND packet. (In this case, the remaining segments must be transmitted as long as there are other RECEIVEs to be received, until DATAINFO has the value CM_COMPLETE_DATA_RECEIVED.)

The return parameter DATAINFO specifies whether data has been received and whether the receive The return parameter STATUSINFO indicates whether send permission has also been received. STATUSINFO may take the following values:

CM_NO_STATUS_RECEIVED --> No send permission received
CM_SEND_RECEIVED --> send permission received

You use this call to close the CPI-C connection. Any data in the local buffer that has not yet been sent is transmitted first.

The connection should always be closed by the program with send permission, otherwise, any data that has not yet been received is lost.

Data conversion is necessary when two systems that use different character sets communicate with each other.

To convert the character sets, you use the ABAP command

No comments :

Post a Comment