17.08.2013 Views

Data Interfaces

Data Interfaces

Data Interfaces

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Receiving <strong>Data</strong> (RECEIVE)<br />

ABAP/4 C<br />

l ...<br />

COMMUNICATION RECEIVE<br />

ID convid<br />

BUFFER input<br />

[ LENGTH req_length ]<br />

[ RECEIVED rec_length ]<br />

DATAINFO datainfo<br />

STATUSINFO statusinfo<br />

[ HOLD ]<br />

[ RETURNCODE rc ]<br />

...<br />

© SAP AG<br />

...<br />

CMRCV (<br />

convid,<br />

input,<br />

&requested_length,<br />

&received_length,<br />

&data_info,<br />

&status_info,<br />

&request_to_send_received,<br />

&rc );<br />

<strong>Data</strong> is received in the buffer input in accordance with the buffer length. After the call, rec_length<br />

contains the number of bytes placed in the buffer. The DATAINFO and STATUSINFO fields contain<br />

information about the call.<br />

If a RECEIVE occurs in send mode, the right to send is transferred to the receiving program, together<br />

with any existing user data in the network buffer. The sending program then assumes RECEIVE mode.<br />

You must assign appropriate types and lengths to variables:<br />

ABAP/4: C:<br />

CONVID C 8 convid<br />

PCONVERSATION_ID<br />

INPUT C max. 30,000 input PCPIC_CHAR<br />

DATAINFO X 4 data_info PDATA_RECEIVED<br />

STATUSINFO X 4 status_info PSTATUS_RECEIVED<br />

REQ_LENGTH P requested_length CPIC_INT (max.<br />

30,000)<br />

REC_LENGTH X 4 received_length CPIC_INT<br />

RC X 2 rc CM_RETCODE<br />

request_to_send_received<br />

PREQUEST_TO_SEND_RECEIVED<br />

If the HOLD parameter is set, the current work process is kept (no roll-out, roll-in).<br />

...

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!