Delete overlapping requests DataStore Object using ABAP

Do you want to snapshot on a daily basis but only want to keep one request per calendar week? The attached ABAP makes this possible! You can use it the start routine of a transformation.

The logic uses the current calendar week (based on the system date) to retrieve a list of requests which are loaded in the same calendar week. This list is then sorted descending based on the loading date. Then one by one the loads are being removed from the DataStore Object (DSO), leaving only the current request active. When this load is executed on a daily basis only one request per calendar week will remain in the DSO.

Loop over table columns dynamically

In case of data cleanse activities there could be a necessity to loop over columns. Doing this dynamically will enable you to easily verify each column without writing to much ABAP code, as the code is valid for all columns.

Since everybody knows how to loop over rows but not over columns I began my quest of finding the most proper solution. I stumbled across this blog explaining me how to achieve this with just a couple lines of ABAP. The ABAP uses a standard SAP class cl_abap_typedescr to retrieve data.

Be sure to have a good look at this class since it has more nifty methods available which might get in handy during your developments in SAP BW.

Object classes for CDHDR and CDPOS tables

The CDHDR and CDPOS table contains information related to changes of a specific entity. Using these tables you can track how many times the value of an entity has changed and especially to which value. Because the CDHDR and CDPOS tables contains alot of data it is advisable to restrict the table during data extraction.
Object classes for CDHDR and CDPOS tables
Using a restriction on OBJECTCLASS you have the ability to only select those records related to a specific SAP entity for e.g. Sales Orders (VERKBELEG), Purchase Orders (EINKBELEG) or Handling Units (HANDL_UNIT). To determine which filter must be setup the table TCDOBT can be used. This table stores all object classes available in the system.

PRPS-USR06 decimal notation problem

After enhancing the datasource 0WBS_ELEMT_ATTR with the two additional user fields  USR06 (UF value 1 WBS) and USE06 (UF unit value 1 WBS) I encountered some strange behaviour.

This began when I extracted data from the ECC source system and I saw that the notation of the user value (after DSO activation) was different from the value filled in by the end user. SAP note 1646349 summarizes this problem. It states that the USR06 and USR07 fields of the PRPS table are always stored with 3 decimals places.
SAP Knowledge Base Article - 1646349 - Decimal Shift in User Currency Fields
For this problem I have developed some lines of ABAP code. The logic uses the TCURX table to calculate how many places decimal must shift for each user value known in the RESULT_PACKAGE. Use this ABAP code inside a transformation to get the same user value as maintained in ECC.

Hidden InfoPackage monitor issue

This week I encountered an issue with the SAP GUI. When accessing the data load monitor of an InfoPackage I noticed that the request window wasn’t visible anymore. Luckily some of the SAP GUI specific settings are stored in SAP tables. This includes the width of the InfoPackage window.
Hidden InfoPackage monitor issue
The table which stores the InfoPackage monitor setting is called RSRADIOMON. For every known user a record is stored. As shown in the picture below the column THREEWIDTH is set to 29 which is resulting in a very small window. By changing the THREEWIDTH to a higher value (for e.g. 290) the InfoPackage monitor will be displayed in normal proportions again.
Data browser table RSRADIOMON entries