I believe our previous test on SELECT SINGLE vs FOR ALL ENTRIES did not surprise many of you because I see a tendency towards FOR ALL ENTRIES in programs I encounter. In previous scenario, we were able to access the search table with primary key but this may not be the case every time. Let’s see what happens […]
Category: Best practices
Experiment on performance: SELECT SINGLE vs FOR ALL ENTRIES
When all business requirements are met in a development, customer complaints always come down to performance. “Can’t this run any faster?” we always hear. Performance, in a technical point of view, is a broader concept that not just includes execution time, but also optimal use of system resources like memory and network load. But powerful […]
Obligatory selection screen parameters
Almost every ABAP developer comes to a point where they require obligatory parameters along with user command logic in their selection screens. As you might already know, that’s a problem. Because obligatory parameters demand input on every action of user and interfere with user command logic, which results in a broken selection screen. Let’s see […]
ERROR_MESSAGE: Predefined exception for function modules and methods
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 […]