‎2012 May 07 12:44 PM
Hi,
I am using WS_DELIVERY_UPDATE, but question relevant for any similar FM really.
Sometimes, this FM will fail deep inside its code and outputs a hard 'E'rror and kills the process.
Previously, for other FM's, I have used:
call function '...'
IMPORTING...
EXPORTING...
EXCEPTIONS
OTHERS = 99.
to capture these errors. But WS_DELIVERY_UPDATE does not have any EXCEPTIONS (just a PROT table).
Any way of catching the errors so I can log the data in a better way in my own code rather than just crashing out?
Thanks.
‎2012 May 07 1:02 PM
‎2012 May 07 1:02 PM
‎2012 May 07 1:20 PM
Bahh!!!
Thanks Arseni. Where was it documented? Couldn't find it.
I've always used OTHERS = 99 and that normally works.
ERROR_MESSAGE = 1 worked perfectly.
Thanks again.
‎2012 May 07 2:46 PM
Take a look here http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/frameset.htm
Calling Function Modules in ABAP
To call a function module, use the CALL FUNCTION statement:
CALL FUNCTION <module>
[EXPORTING f1 = a 1.... f n = a n]
[IMPORTING f1 = a 1.... f n = a n]
[CHANGING f1 = a 1.... f n = a n]
[TABLES f1 = a 1.... f n = a n]
[EXCEPTIONS e1 = r 1.... e n = r n [ERROR_MESSAGE = r E]
[OTHERS = ro]].
‎2012 May 07 1:13 PM
Hi ,
You can create Z FM 'ZWS_DELIVERY_UPDATE' by copying existing WS_DELIVERY_UPDATE nad then inside Exceptions tab you can add your own Exceptions via SE37.