Resume code execution after an exception has been thrown can be very useful in several different scenarios (i.e. processing multiple materials and you want to process all but skip only those where there’s an error) This can be solved quite easily using resumable exceptions Continue reading
Author Archives: Spider
ALV tutorial 11 – Edit & Save changes
In this tutorial I’ll show how to enable only the specific cells of a grid to be editable. Continue reading
Dynpro – How to disable functions instead of hiding them in a screen
If you need to manipulate with a screen dynamically, sometimes you need to enable/disable some functions/buttons in the toolbar. Standard exclusion of function when setting PF-STATUS will by default hide the excluded functions. But what if you want to display them, but just in disabled state ? Continue reading
ALV – Dynpro controlled by a global class
In this article I’ll present an approach how to handle a screen with a global ABAP class. The idea is simple – we will create a class which will listen to PAI and PBO events raised by the screen. All data processing and screen element manipulation is done in the class code. Let’s check out how exactly it is done Continue reading
ABAP – cool program discovering all user exits for a TCode
I believe all of you were searching for a list of available user exits that are triggered after a specific transaction code is executed. Here I’d like to present simple program, that will discover and display exactly that – list of available user exits for given TCode. Continue reading
ABAP – append a component to ITAB dynamically
It’s not a trivial thing to add new field into already existing itab during run time, but there is a way how to modify the ITAB strucuture. You can add, remove or modify order of the components (fields) in the itab. Continue reading
ALV – Keep selection and scroll position after ALV refresh
There is an issue with ALV grid that if you refresh the grid being in edit mode using method REFRESH_TABLE_DISPLAY (in case you use CL_GUI_ALV_GRID) after you have changed some data, it may happen the cursor and/or scroll goes to the first (top left) cell of the grid. It might be a little confusing for user, but you can avoid this issue by using the following methods (and attached piece of code) Continue reading
ABAP – Fill BAPI structures from SAP table structures dynamically
Due to fact that BAPI structures uses different field names than standard SAP tables I used to apply a trick I’m going to present in this article – map BAPI fileds to SAP fields in a Z-table and fill BAPI structures dynamically during runtime Continue reading
Test driven development in ABAP – Unit test classes
This article provides info about creation an ABAP unit test class that might significantly reduce the future maintenance cost at the testing level. The flow is simple – you design your functional tests in advance and then you create your code. You can run the test class repeatedly to tell you which tests still didn’t pass. Continue reading
SAPScript Export & Import
Due to fact that SAPScripts do NOT offer the version management functionality it’s good idea to store each final (production) version of your SAPScript as a file exported to your PC or to some version management system (i.e. Subversion). Continue reading