No matter how many times mentioned before (thanks to Rahul Gopinath, Amit Behera, Srinivas Dummu and Mike), I still see sy-subrc check after a function module call without exceptions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
CALL FUNCTION 'RV_INVOICE_CREATE' EXPORTING vbsk_i = vbsk_i TABLES xkomfk = xkomfk xkomv = xkomv xthead = xthead xvbfs = xvbfs xvbpa = xvbpa xvbrk = xvbrk xvbrp = xvbrp xvbss = xvbss. IF sy-subrc <> 0. * Error handling ENDIF. |
This is so wrong. According to ABAP keyword documentation: If no exception is raised, a call sets sy-subrc to 0. So in the above example, sy-subrc will always be equal to […]