Showing posts with label real-time. Show all posts
Showing posts with label real-time. Show all posts

Friday, July 23, 2021

Checking status of cube behavior – BW4HANA

For overview on this topic and BW classic related specific information see following post: Checking status of cube behavior – BW classic.

In BW4/HANA based system there is no information about real-time behavior persistently stored in database like is in BW classic. Instead, the behavior (whether it is loading/staging or planning mode) is evaluated on the fly while user request the change of the behavior. For example if user triggers the behavior change system checks what real-time behavior is set currently and subsequently is changes it to opposite one.

Behavior change in t-code RSMNG:


Behavior change in BW Cockpit:


Information on aDSO behavior in RSMNG t-code is available by clicking on Information button in its toolbar.


The current mode is seems NOT stored persistently in database. Unlike of classic BW -> see: Checking status of cube behavior. Instead it is determined during runtime by ABAP class CL_RSD_RSAWBN_PLCUBE.

For an aDSO objects it is available in table called RSOADSO (Datastore Object) and field is PLANNING_MODE. Just give the aDSO tech name into ADSONM field and A value to OBJVERS field. This is a straightforward way to determine the real-time behavior of the aDSO. However, this table just stores the settings of the aDSO as can be setup in BW Modelling tools. See details here: Flavors of aDSO object





Below are other produceres how to determine the same:


1) Query table RSPMPROCESS with selection:

PROCESS_TYPE                = PLAN

PROCESS_ID                    = */CPMB/ARI* //your planning enabled aDSO object

 

Then sort a result set via field PROCESS_TSN and check value of PROCESS_STATUS field. If it is Y means PLANNIG request is active in the aDSO thus whole aDSO is in PLANNIG mode. If the PROCESS_STATUS field has value G (Finished) means there is no open yellow planning request in the aDSO thus it is in LOADING mode. Logic that handles flipping of aDSO mealtime behavior is coded in ABAP class: IF_RSPLS_ADSO_API~SET_PLANNING_MODE (CL_RSPLS_ADSO_API).



2) If above-mentioned procedure does not work, you may try this one. Enter the table  RSPMPROCESS with following selection

 

PROCESS_TYPE                    = PLAN

UNIQUE_TARGET_DATA        = */CPMB/ARI* //your planning enabled aDSO object

 

Then sort a result set via field PROCESS_TSN in descending way and check value of PROCESS_STATUS field. If the value is Y means the aDSO is in planning mode with active planning request.



Monday, March 30, 2020

Writing data into cube in delta mode

If there is a need to write data from ABAP code (e.g. from some UI technology like WebDynpro) there are a function modules like RSDRI_CUBE_WRITE_PACKAGE and RSDRI_CUBE_WRITE_PACKAGE_RFC to support that. The FMs are writing so called planning requests “Request w/o InfoPackage (APO Request)” means that particular cube needs to be set to transactional (real time) status.

It is not very well known fact that these function modules support also writing data in delta mode. By specifying input parameter called I_DELTA (to TRUE value), the system first calculates delta as difference between the data that is already present in the cube and data that is to be written into the cube. All characteristic tuples are evaluated of data set.

There are two prerequisites that must be fulfilled by the cube while using the delta function:

1. It works for cubes that contain cumulative key figures only and the cube is not a non-cumulative cube.

2. The delta feature must be permitted explicitly in the cube. It can be set on in the t-code in RSDCUBE. The flag “Delta Load Allowed with RSDRI” is stored in table RSDCUBE-DELTA_LOAD.

Thursday, February 20, 2020

Conversion of basic cube into transactional (real time) one

 Once you create a basic cube in t-code RSA1 there is nothing within that t-code that would enable BW developer to change the cube to transactional (real time) one. However, there is an ABAP report, which supports such a conversion. It is called SAP_CONVERT_NORMAL_TRANS Conversion: Normal <--> Transactional InfoCube. The report also support backward conversion from transactional to basic (normal).


Here is brief overview of the report UI and its output:




Tuesday, February 18, 2020

Cube load failure call subroutine FILL_SID_CACHE

Some loads to BW cubes may fail with below error that is related to subroutine FILL_SID_CACHE.

An exception with the type CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was neither handled locally, nor declared in a RAISING
The attempt to call the subroutine FILL_SID_CACHE in the program &PROGRAM& failed due to a type error involving parameter number
An exception with the type CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was neither handled locally, nor declared in a RAISING
Error while updating to target XXXX_XXX (type INFOCUBE)
Data package 1 / 17.02.2020 20:40:29 / Status 'Processed with Errors'



There is SAP note 1972401, which describes this error.  Regeneration of data loads to the cube of the program happened automatically but call of the form routine went to the older version of the program. Therefore, it failed. Issue is most likely caused two possible reason. One can be buffering problem. Second can be that a loading process was already connected to the old version of the generated program.
As workaround, one can try to reactivate the corresponding DTP or involved TRFN and repeat the load. If it does not help use program RSDD_RSTMPLWIDTP_GEN_ALL with both check box ticked off for the BW cube that is affected.


More information:
1972401 - DTP failed due to Exception CX_SY_DYN_CALL_ILLEGAL_TYPE
2172882 - DTP execution failed with CX_SY_DYN_CALL_ILLEGAL_TYPE and FILL_SID_CACHE

Wednesday, July 10, 2019

Checking status of cube behavior

Real-time cubes in SAP BW means that it is a planning cube where the planning functions can be implemented. This in short means a user’s can enter/modify data. It is possible then to copy, change and do a many different calculations with the data (e.g. distributions based on reference data or forecast functions).
The Real-time cubes can be therefore set into two modes (or called behaviors). Load behavior where the cube can be loaded via regular BW’s transformation or plan (or called real-time) behavior in which the cube can be saving planning data entered by users.

The change or the switch of the two modes can be done either manually:




Or same activity as done manually via RSA1 -> Modeling -> right click on cube -> Planning-Specific Properties -> Change Real-Time Load Behavior can be done programmatically.

Following FM can be used to check the real-time / load behavior and to set it:
RSM_LOADALWD_GET
RSM_LOADALWD_SET       

In addition, there is an ABAP report SAP_CONVERT_NORMAL_TRANS can be used for the same. Similarly, there is a process that can be put into process chain for that.

Table RSMDATASTATE (Status of the data in the Infocubes) and its field LOADALWD (Allow loading for real-time data targets) stores the information into which behavior the cube currently is set to. If the field LOADALWD is set to X it is in loading mode, if it is set to blank in planning mode.

For information on this topic relevant for BW4/HANA see this post: Checking status of cube behavior – BW4HANA