COMMUNICATION ALLOCATE: Set up connection 

Use

COMMUNICATION ALLOCATE builds a conversation with the partner defined in the statement COMMUNICATION INIT. A session to the partner system is built and a start request for the partner program (for example, X1SA) is sent.

Activities

Syntax

COMMUNICATION ALLOCATE ID <conv_id>

[ RETURNCODE <rc> ]

Parameter Values

<conv_id>

Conversation ID (input, type C(8))

<rc>

Return code (output, type X(2))
Alternatively, you can check the value directly via SY-SUBRC.

Return Codes

Value

Explanation

CM_OK

 

CM_ALLOCATE_FAILURE_NO_RETRY

Resource or configuration problem (UTM: Also system log message 781)

CM_ALLOCATE_FAILURE_RETRY

Temporary problem (for example,: partner is not active)

CM_PROGRAM_PARAMETER_CHECK

Invalid conversation ID

CM_PROGRAM_STATE_CHECK

COMMUNICATION INIT call was not made

DATA: CONV_ID(8) TYPE C,

DEST(8) TYPE C VALUE 'PARTNER',

RC LIKE SY-SUBRC.

COMMUNICATION INIT ID CONV_ID

DESTINATION DEST

RETURNCODE RC.

:

COMMUNICATION ALLOCATE ID CONV_ID

RETURNCODE RC.

IF RC <> CM_OK....