COMMUNICATION INIT: Initialization 

Use

The statement COMMUNICATION INIT initializes a connection. You must specify a symbolic name to identify the partner.

Integration

The statement COMMUNICATION INIT must always be followed by the statement COMMUNICATION ALLOCATE.

Activities

Syntax

COMMUNICATION INIT ID <conv_id>
DESTINATION <dest>
[ RETURNCODE <rc> ]

Parameter Values

<conv_id>

Conversation ID (output, type C(8))

An ID is returned to identify the conversation. You must specify the this ID in all subsequent communications statements for this conversation.

<dest>

Conversation ID (output, type C(8)

This name must also be in the side information file.

<rc>

Return code (output, type X(2))

Alternatively, you can check the value directly via SY-SUBRC.

Return Codes

Value

Explanation

CM_OK

 

CM_PROGRAM_PARAMETER_CHECK

Entry in side info table incorrect

CM_PRODUCT_SPECIFIC_ERROR

  • LU is not defined
  • SAP transaction is in long-running status
  • (UTM, additional system log message 818)
  • No further ID available

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.

IF RC <> CM_OK....