on 05-23-2008 8:17 AM
How to retrive Return Code(SY- SUBRC) from function module called in java.
Below is example where i would like to retrive the Exceptions from 1..5
-
CALL FUNCTION 'ZZ_SAVE_TEXT'
EXPORTING
RUECK = pass number
TABLES
T_LINES = pass user enter text
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hi
The exception can be caught from Java by mentioning the exception as export parameter in the RFC Function module .
Local Interface:
*" IMPORTING
*" VALUE(JOB_ID) TYPE HROBJID
*" VALUE(JOB_TYPE) TYPE ZZ_CHAR2
*" EXPORTING
*" *VALUE(SUBRC) TYPE SYSUBRC*
Thanks
Ritushree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get any information from the function module, you must specify it in any of the export parameters. So please pass the value through the export parameter and then you will get this value in Java.
Best Regards,
Vipin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.