ABAP – List of all available icons

SAPTo display all available icons in SAP ABAP just enter TCode SE38 and execute either program SHOWICON or RSTXICON. In the output report you can see their image representation together with corresponding code interpretation Continue reading

SAP – Create new material status

SAPX-Plant material status means that the material can be procured or blocked or not blocked, etc. After you create the status in customizing you can go into its configuration details and setup the the response for everything the material can be related to (Purchasing, BOM’s, Routing/recipe, etc.) using message type either error (type B) or warning (type A). Continue reading

ABAP – Resumable exceptions

SAPResume 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

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

SAPIf 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

SAPIn 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

SAPI 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

SAPIt’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

SAPThere 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

SAPDue 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