‎2009 Mar 24 2:59 PM
Hello,
I've a program with call to RFC destination 'XI' , i want to know if it is possible catch exceptions when in the other system (XI) a fault occurs, for example, the database table in which I want to insert the data is not created. Now, if this happens a dump occurs
thanks very much,
‎2009 Mar 24 3:13 PM
Hello,
You can try this way with your RFC function module:
CALL FUNCTION 'RFC_WRITE_FILE'
DESTINATION FP_P_DEST
EXPORTING
FILE = L_V_NAME
FORMAT = L_C_BIN
SIZE = L_V_SIZE
LANGUAGE = SY-LANGU
IMPORTING
SIZE = L_V_SIZE
TABLES
FILEDATA = L_IT_FILE
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE L_V_RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE L_V_RFC_MESS
ILLEGALNAME = 3
OTHERS = 6.
CASE SY-SUBRC.
WHEN 0.
WHEN 1.
WHEN 2.
WHEN 3.
WHEN 6.
ENDCASE.
The SY-SUBRC value can be captured this way. Hope this helps.
BR,
Suhas
Edited by: Suhas Saha on Mar 24, 2009 4:14 PM
‎2009 Mar 24 3:13 PM
Hello,
You can try this way with your RFC function module:
CALL FUNCTION 'RFC_WRITE_FILE'
DESTINATION FP_P_DEST
EXPORTING
FILE = L_V_NAME
FORMAT = L_C_BIN
SIZE = L_V_SIZE
LANGUAGE = SY-LANGU
IMPORTING
SIZE = L_V_SIZE
TABLES
FILEDATA = L_IT_FILE
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE L_V_RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE L_V_RFC_MESS
ILLEGALNAME = 3
OTHERS = 6.
CASE SY-SUBRC.
WHEN 0.
WHEN 1.
WHEN 2.
WHEN 3.
WHEN 6.
ENDCASE.
The SY-SUBRC value can be captured this way. Hope this helps.
BR,
Suhas
Edited by: Suhas Saha on Mar 24, 2009 4:14 PM