2009 Sep 16 10:02 AM
Hi All,
I have a generic query like suppose if an exception occured in RFC call to a function module..is there is any specific way to handle the exception???
Thanks in advance.
Joe
Hi All,
I have a generic query like suppose if an exception occured in RFC call to a function module..is there is any specific way to handle the exception???
Thanks in advance.
Joe
2009 Sep 16 10:22 AM
Hello Joe,
This is how we handle MESSAGE in RFC enabled FMs.
DATA:
L_V_RFC_MESS TYPE CHAR72.
CALL FUNCTION <RFC Func. Name>
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.
CLEAR: L_V_SIZE, L_V_LEN.
WRITE: / TEXT-M00, SY-SUBRC.
CASE SY-SUBRC.
WHEN 0.
WRITE: / TEXT-M01.
WHEN 1.
WRITE: / TEXT-M02,
/ L_V_RFC_MESS.
WHEN 2.
WRITE: / TEXT-M03,
/ L_V_RFC_MESS.
WHEN 3.
WRITE: / TEXT-M04.
WHEN 6.
WRITE: / TEXT-M05.
ENDCASE.Hope i am clear.
BR,
Suhas
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |