COMMUNICATION INTERFACE 4

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

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.

Output:

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.

RETURNCODE

The return parameter DATAINFO specifies whether data has been received and whether the receive 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 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
TRANSLATE FROM CODE PAGE '. . .' TO CODE PAGE '. . .'
This lets you convert between of different code pages. The contents of the field you specify is converted from the source code page representation to the target code representation.

You can display and/or maintain the codepages in R/3 using Transaction SPAD.

FOR RELATED POSTS SEE BELOW.

COMMUNICATION INTERFACE PART 6
COMMUNICATION INTERFACE PART 5
COMMUNICATION INTERFACE PART 3
COMMUNICATION INTERFACE PART 2
COMMUNICATION INTERFACE PART 1

No comments :

Post a Comment