Variant 6
COMMUNICATION DEALLOCATE ID id.
Addition
As for variant 1
Effect
Severs connection and releases all resources.
Example
TYPES: CONVERSATION_ID(8) TYPE C,
DESTINATION(8) TYPE C,
RETURN_CODE LIKE SY-SUBRC,
C_INFO(4) TYPE X.
DATA: CONVID TYPE CONVERSATION_ID,
CPIC_RC TYPE RETURN_CODE,
DEST TYPE DESTINATION VALUE 'C00'.
DATA: RECORD(80) TYPE C,
LENG TYPE I VALUE 20.
INCLUDE RSCPICDF.
COMMUNICATION INIT DESTINATION DEST
ID CONVID
RETURNCODE CPIC_RC.
IF CPIC_RC NE CM_OK.
WRITE: / 'COMMUNICATION INIT, RC = ', CPIC_RC.
EXIT.
ENDIF.
COMMUNICATION ALLOCATE ID CONVID
RETURNCODE CPIC_RC.
IF CPIC_RC NE CM_OK.
WRITE: / 'COMMUNICATION ALLOCATE, RC = ', CPIC_RC.
EXIT.
ENDIF.
RECORD = 'The quick brown fox jumps over the lazy dog'.
COMMUNICATION SEND ID CONVID
BUFFER RECORD
LENGTH LENG
RETURNCODE CPIC_RC.
IF CPIC_RC NE CM_OK.
WRITE: / 'COMMUNICATION SEND, RC = ', CPIC_RC.
EXIT.
ENDIF.
COMMUNICATION DEALLOCATE ID CONVID
RETURNCODE CPIC_RC.
IF CPIC_RC NE CM_OK.
WRITE: / 'COMMUNICATION DEALLOCATE, RC = ', CPIC_RC.
EXIT.
ENDIF.
RELATED POST
SYNTAX FOR COMMUNICATION PART FOUR IN SAP ABAP
MySAP environment security solutions
No comments :
Post a Comment