‎2007 Apr 30 6:01 PM
I am writing a coding inside the userexit. The call customer function has 'exception' parameters like below:
EXCEPTIONS
IDOC_ERROR = 1
DO_NOT_PROCESS_IDOC = 2
OTHERS = 3.
Now, I want to raise the exception to '1' depending on some conditions. How do I do that? I used to just get the import parameters from the funciton module but never raised exceptiosn before.
please advice.
Thanks
‎2007 Apr 30 6:05 PM
Hi,
Please try this.
...
IF <your field check> NE <your condition>
RAISE IDOC_ERROR.
ENDIF.
OR
SY-SUBRC = '1'.
...
Regards,
Ferry Lianto
‎2007 Apr 30 6:02 PM
Hi
I hope the Function Module will take care for this.
Regards,
Sreeram
‎2007 Apr 30 6:03 PM
‎2007 Apr 30 6:04 PM
after executing the function module it returns sy-subrc value. based on sy-subrc u can write ur exception in ur user exit as message.
‎2007 Apr 30 6:05 PM
at the particular condition code for
RAISE IDOC_ERROR or
raise DO_NOT_PROCESS_IDOC .
for eg,
if sy-subrc = 2.
RAISE IDOC_ERROR
endif.
‎2007 Apr 30 6:05 PM
Hi,
Please try this.
...
IF <your field check> NE <your condition>
RAISE IDOC_ERROR.
ENDIF.
OR
SY-SUBRC = '1'.
...
Regards,
Ferry Lianto
‎2007 Apr 30 6:22 PM
Hi,
IF <condition> .
Raise IDOC_ERROR.
ENDIF.
The IDOC_ERROR must declare in FM Exception tab.
Regards,
Bhaskar