COMMUNICATION ACCEPT: Accept connection 
Use
COMMUNICATION ACCEPT accepts the requested connection. Initializations are performed internally and an ID for the conversation is returned.
Integration
COMMUNICATION ACCEPT is only permitted within an ABAP FORM routine and can only be called once. After the function call, the program is in receive status.
Activities
Syntax
COMMUNICATION ACCEPT ID <conv_id> [ RETURNCODE <rc> ]
Parameter Values
<conv_id>
ConversationID (output, type C(8))To identify the conversation, an ID is returned. This ID must be specified in all subsequent communications statements for this conversation.
<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_STATE_CHECK |
|

DATA: CONV_ID(8) TYPE C,
DEST(8) TYPE C VALUE 'PARTNER',
RC LIKE SY-SUBRC.
FORM TEST
COMMUNICATION ACCEPT ID CONV_ID
RETURNCODE RC.
IF RC <> CM_OK....
:
ENDFORM.