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.

Initializing Connections (INIT)<br />

ABAP/4 C<br />

... ...<br />

COMMUNICATION INIT INIT<br />

DESTINATION dest dest<br />

ID ID convid convid<br />

[ [ RETURNCODE rc rc ] ]<br />

... ...<br />

© SAP AG<br />

...<br />

CMINIT (<br />

convid,<br />

dest,<br />

&rc );<br />

...<br />

The program setting up the CPI-C connection must first execute an INIT call. This uses a symbolic<br />

address to access the side information file (which contains the connection and communication<br />

parameters).<br />

symbolic_dest: Symbolic name (entry in the side information table)<br />

conversation_id: This value is returned by the routine and must be specified in all subsequent CPI-<br />

C calls<br />

for this connection.<br />

return_code: Error code: (0 (CM_OK) --> routine executed without error).<br />

The variables are defined in the include RSCPICDF for ABAP/4, and in the file "cpic.h" for C.<br />

ABAP/4: DEST C 8 C: dest PCPIC_CHAR<br />

CONVID C 8 convid PCONVERSATION_ID<br />

RC X 2 rc CM_RETCODE<br />

(Examples: ABAP/4: --> DATA: DEST(8) TYPE C.<br />

C: --> PCPIC_CHAR dest = (PCPIC_CHAR)0;)<br />

For C data types, you should note the following:<br />

& --> is an address operator and returns a pointer to an object<br />

* --> is a reference operator and returns the address of an object<br />

Legend: Italics --> denote a variable<br />

Underlined characters --> input variable which must be specified during the call<br />

[ ... ] --> optional specification

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

Saved successfully!

Ooh no, something went wrong!