Saturday, September 24, 2022

DELETE_FACTS t-code to delete from BW InfoProvider

Normally in case a deletion of data is to be performed it is possibel to be done via RSA1 t-code or in case of BW/4 in its web environment (SAP BW∕4HANA Cockpit). If this task is supposed to be automated, it is possible to leverage deletion process in process chains. However, there is also a dedicated t-code for deleting of data from the fact table of BW’s InfoProviders. It is called DELETE_FACTS t-code. It is associated with ABAP program RSDRD_DELETE_FACTS. The program/t-code is also available in BW/4 based BW systems.

On its input screen, there is one mandatory parameter – Data Target that the BW InfoProvider on top the deletion is performed. Following that input field there are three radio buttons. Each of them controls mode of the program.

In case it is set to “Direct Deletion” the program asks for deletion criteria and deletion itself is performed as a next. The deletion criteria is just a filter that is setup by a user and is used for deletion. Only data that are returned by the filter criteria are deleted.

Next radio button is called “Generate Selection Program”. It generates either GP program for the InfoProv deletion. The generated program contains selection screen that serves as deletion criteria. User can input the filter in here. Once the deletion criteria are provided the deletion can be performed.

Finally, there is third radio button called “Generate Deletion Program”. The report is generated on the fly and the deletion criteria are static only available when the GP is generated. Thus no usage of ABAP program variants in this case.

Instead the GP program a real program name can be given in another option field of the selection screen – called “Name of report”.

The deletion itself is performed in a very interesting way. BW system copies the data are not supposed to be deleted (selection criteria reversed) to temporary DB table. The temp table is a copy of real InoProvider DB table. Next is that the system deletes the original (infoprov) table completely. Not just the data in the table but whole table is dropped. Finally, as a last step the system renames the temp table to original table. Reason why it is doing like that is a performance. You can read more details about this approach in a SAP Note listed below.

More information:

2918552 - [BW Central KBA] Selective Deletion

Friday, September 23, 2022

Switching output from plain list to ALV and vice versa

Many SAP’s NetWeaver based systems t-codes or programs are giving its output in form of a list. The list can be either in form of paint text formatted into columns and row or ALV list. An ALV is abbreviation of aAp List Viewer and it is popular from of outputting a results. Among many ALV advantages is easy column manipulation, data filtering, sub/total calculation, drilldowns etc.

However it may happen that the report that you are used to use is not coming as an ALV layout. Instead, the plain list is showed. Most likely this is caused that a user parameter called SALV_SWITCH_TO_LIST (Switch Grid -> List) is set to value X via t-code SU3 (Maintain User Profile).

In case of t-code SM66 if the param is set the output look like:

In other case if the param is not set the result of the same t-clod looks like: 


More information:



Thursday, September 22, 2022

Setup of t-code RSMNG

T-code RSMNG is useful replacement of former administration part of RSA1. It comes handy also in case you do not prefer web environment (SAP BW∕4HANA Cockpit) based administration of BW/4 bases systems. However, after some time of using it I realized it has its drawbacks. Most annoying thing for me is its performance. This comes to picture in cases when I do administration of an aDSO object that has large (tens of thousands) number of data load requests.

In such case, it takes time (several minutes) to get into the administration screen. The RSMNG t-code has following two filter options that have an influence on how many request are displayed on the admin screen.

Filter by Time – options like Today, Yesterday and Today, In the Past Week, This Month and Last Month, This Year and Last Year, Free Data and No Time Restriction are available here to choose from. This screen is more less the same as on Process Chain’s log selection screen.

Filter by Status – OK, Error, Running and Deleted are data load request status to choose from.

In case you used filter by time and set it to No Time Restriction position of a radio button on object that has very few data load request - all is fine. However if you meanwhile jump into another aDSO that has a lot of the data load requests you will be waiting till all of them are read and the screen is finally displayed. Therefore, this is the bummer.

There is a database table that stores the setup of the RSMNG t-code. The table name is RSDSO_MNG_DYNSET (ADSO manage: dynamic user settings). The table is managed by Function Module RSDSO_MNG_SET_PARAM. The FM itself is called from RSMNG framework build in ABAP class CL_RSAWBN_AWB. I find myself in a position to change the table entries in case I realize my settings are set e.g. to No Time Restriction and I run to the very large aDSO.

The settings of the table are stored per a user. Means each user (column UNAME) running the RSMNG t-code has its own settings. This is actually causing this issue that if I set time filter to No Time Restriction value it is valid for all the aDSOs I used in the t-code. To avoid situations like this it would be better if table could store the RSMNG settings on particular aDSO (or IO objects as that can be managed here too) level. However, at this time BW/4 2.0 SP06 it is not supported.

There are different tables that stores the RSMNG setup data per infoprovider:

RSDSO_MNG_DYNSET – for aDSOs

RSDMD_MNG_DYNSET – for InfoObjects

RSBOH_MNG_DYNSET – for Open Hubs


In a below pictures you can see how is the table columns mapping done against the particular filter settings of the RSMNG.




Friday, September 16, 2022

Listcube does not show any data

While using a t-code LISTCUBE sometime following odd situation can occur. The t-code does not show any data at all despite the data is present in a BW objects that the LISTCUBE runs on top of. That can be very strange and confusing situation. Instead of any data only below message is present:

No messages exist Message no. R7896



Explanation is very simple. As an ALV technology is used to present the data there needs to be a list of columns that are supposed to be displayed in an output screen passed to the function module (e.g. REUSE_ALV_GRID_DISPLAY) call - that does the display operation itself. This list of columns is called a field catalog (e.g. param IT_FIELDCAT in the FM call). The Field catalog contains all the fields to be displayed with their descriptions. Similarly, there is another structure that needs to be passed to the FM during its call - IS_LAYOUT. That one has the list layout specifications. If some of these information (field catalog or the layout) is missing the ALV does not know what columns (fields) are supposed to be displayed. Thus, no information is displayed after all.

What caused it? As the ALV supports saving the output layout (field catalog) for later use it could happen that, someone stored his/her layout while worked with BW info provider ABC and market it as global and default while working in the LISTCUBE. Once another user use the LISTCUBE against info provider XYZ that has a different structure (different IOs) the global default layout was sent to ALV. As none of the fields that were retrieved from info provider XYZ are matching the field catalog prepared based on the info provider ABC nothing can be displayed. 


How can this be fixed? While in the LISTCUBE output screen there in its menu the layout management screen is available. It can be found in menu Settings -> Layout -> Layout Management:


Here just default layout needs to be deleted: 



More information:

Usage of t-code LISTCUBE

DTP reads different data than LISTCUBE


Tuesday, September 13, 2022

SAPSprint - print service

SAPSprint or so called a print service is a program for printing. It replaces older program SAPlpd as in print server on WINDOWS operating system. It is a part of SAP GUI for Windows installation. Usually it is available in folder "x:\Program Files\SAP\SAPSPrint\sapsprint.exe" - SAPSprint itself and "c:\Program Files\SAP\SAPSPrint\SAPSprintOptEdit.exe" – Print Option Editor.

What it does is to a transfer data for remote print output using WINDOWS operating system as host spool system so called spooler. SAP application server (with a spool work process) acts as a spool system. As the spooler and the spool system are running on different computers there is a need to have an external application (SAPSprint) to transfers the output requests from the SAP spool server to the Microsoft Windows spooler.

The SAPSprint can be a subject to security vulnerabilities. This it is advisable to monitor SAP Notes related to this software on component on regular basis and apply fixes if they are available.

 

More information:

Online docu

Support site component: BC-CCM-PRN (Print and Output Management)

1704243 - Frontend Print Options Editor

Monday, September 5, 2022

Remodeling tools RSMONITOR and RSMRT

RSMONITOR (ABAP prg RSCNV_MONITOR) - Generic Monitor

RSMRT (ABAP prg RSCNV_DESIGN) - Metadata Remodeling Toolbox

These two t-codes mentioned above are part of a BW remodeling framework. The remodeling is an operation during which an object (InfoObject) in BW InfoProvider (that contains data) structure are being changed. Imagine in BW Modeling Tools of SAP HANA Studio a change can be either some InfoObject is added or removed from the InfoProvider. After the change like this is performed the BW system checks whether the provider can be activated immediately or it has to be remodeled first. If the provider can’t be activated (most likely as there is a data in there) the remodeling request is created. There can be a several operations of adding/removing IOs upon the InfoProvider added into the request. By the InfoProvider here what is meant is aDSO object as that is main data storage object in BW/4HANA based BW systems.

Then the remodeling request can be triggered in t-code RSMONITOR. There is a possibility to restart, reset, monitor the request, to review its log etc.



If case the aDSO object is already moved in other subsequent systems (e.g. test, production) to the development system then a transport of the remodeled aDSO is needed. BW checks whether remodeling is needed in those systems and the required remodeling request is created in the target system. Needless to say that since BW/4HANA whole remodeling stuff is to be done in BW/4HANA Cockpit.

Similarly, to aDSO objects there are old good InfoObjects present in BW/4HANA systems. Sometimes there is a need to remodel those too. E.g. to add/remove its attributes, changing data types etc. However, the remodeling tool here is different. The IOs are remodeled in t-code RSMRT.



The two t-codes I briefly mentioned in this blog post are starting to appear in BW since version BW 7.4 and above.

More information:

Remodeling a Data Store Object

Remodeling InfoObjects and Fields