‎2021 Feb 10 11:53 AM
I have tried to look for options on SDN but couldn't find any solution for this issue. We are using a standard FM and it's giving us ASSERT error. We are able to find the issue and correct it but for better management of errors ,we want to raise an error whenever a record is going in that issue but FM currently is going in dump, So is there any way we can catch the error e.g. by catching exceptions , so that we could display proper error for that record ?.
Thanks,
Vimal
‎2021 Feb 11 5:07 PM
No. Sorry. If you control the calling of the FM/BAPI, make that check yourself before the call...
Or is there something wrong or inconsistent with your data? ASSERTS are often used for situations that shouldn't occur... But of course that might not be the case here and if you have found the reason then you would know...
‎2021 Feb 10 11:56 AM
‎2021 Feb 10 12:07 PM
‎2021 Feb 10 1:00 PM
perhaps do you have to use ERROR_MESSAGE exception in list of exceptions of function module... (I don't remenber if ASSERT error is managed as standard error message)
Try it.
‎2021 Feb 10 1:10 PM
ASSERT means that the developer wants the program to short dump because the condition should never happen or because the program is called with wrong parameters and that should never happen. You should first investigate why this ASSERT condition is false.
‎2021 Feb 10 4:23 PM
Yes, we have explored and found the issue but we want standard FM to return an error message for same rather than dumping on ASSERT statement. If that's not possible we have to put extra line of code for validation.
‎2021 Feb 11 5:07 PM
No. Sorry. If you control the calling of the FM/BAPI, make that check yourself before the call...
Or is there something wrong or inconsistent with your data? ASSERTS are often used for situations that shouldn't occur... But of course that might not be the case here and if you have found the reason then you would know...