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.

Wednesday, March 18, 2020

DTP reads different data than LISTCUBE

I came across a situation when DTP I created was pulling different data set comparing to t-code LISTCUBE. I wanted to validate data that the DTP was pulling as source for my custom ABAP login in BW transformation. To do this I opened t-code LISTCUBE and entered a same selection as my DTP’s filter was using. To my surprise, I got different data sets in the DTP and in the LISTCUBE. I started to debug the load and found out even more odd thing. In one of master data characteristics used in the source of the DTP, the data was not populated in none of the records pulled by the DTP. Whereas in the LISTCUBE the same characteristics the data was populated.

First thing that I tried was to run some tests for the affected characteristics in t-code RSRV. In particular, it was test called “Compare size of P tables/Q tables with X tables/Y tables” which can be found under All Elementary Tests -> Master Data. Error that was detected by this test was following:

15:00:06 o'clock on 17.03.2020: Start test run for user XXX
Compare sizes of P or Q and X or Y tables for characteristic RZZZ
Characteristic RZZZ: Consistency check between P and X, Q and Y tables
Characteristic RZZZ: Tables /BIC/PRZZZ, /BIC/XRZZZ are not consistent: 50.004 deviation(s)
15:00:06 on 17.03.2020: Test run for user XXX completed


From the error, it was obvious that I have inconsistencies between P (Master Data Table) and X (Attribute SID Table) table of master data characteristics (RZZZ). In fact, in the P table, there were records but there were no records in X table of the characteristics. I tried to use “Correct Error” function available in the RSTV t-code however; it was not possible to repair the error.  

Second thing I tired was ABAP program RSDMD_CHECKPRG_ALL. There are couple of tests available in this program. Most of them are available as well in the RSRV. As this program has also REPAIR function, I tried to apply it. 


However, I was again unsuccessful with it. The program when it ran on foreground dumped and while running on background there was following error:   

Message text                                                                                            
Error in BW:
Characteristic RZZZ: Checking all SID values in the X and Y table
Characteristic RZZZ: Checking table /BIC/XRZZZ
Characteristic RZZZ: Checking consistency between tables /BIC/XRZZZ and /BIC/PRZZZ
Characteristic RZZZ: Errors found during this test
Characteristic RZZZ: 1.403.304 values from table /BIC/PRZZZ do not exist in table /BIC/XRZZZ
Characteristic RZZZ: Following data records have errors (max 50 displayed):
             Characteristic RZZZ: Checking SID values for characteristic/attribute RZZZ


Question remained. How to fill X table - attribute SID table of the IO? In the t-code RSD1 – Characteristics maintenance there is one option. It is available via menu Extras ->Database Table -> Fill Attribute SID Table. While running this the X table was populated and tests in the RSRV or in the RSDMD_CHECKPRG_ALL report were positive w/o any issues. The functionality “Fill Attribute SID Table” available in RSD1 is also available via FM RSDRX_FILL_INITIAL_XYTABLE. Once all corrected my DTP was puling same data set as the LISTCUBE and data values in specific characteristics were not missing any more in the load.

20:35:34 o'clock on 17.03.2020: Start test run for user XXX
Compare sizes of P or Q and X or Y tables for characteristic RZZZ
Characteristic RZZZ: Consistency check between P and X, Q and Y tables
Characteristic RZZZ: No errors found in this test
20:35:34 on 17.03.2020: Test run for user XXX completed
20:36:41 o'clock on 17.03.2020: Start test run for user XXX
Compare sizes of P or Q and X or Y tables for characteristic RZZZ
Characteristic RZZZ: Consistency check between P and X, Q and Y tables
Characteristic RZZZ: No errors found in this test
Compare characteristic values in SID/P/and Q tables for characteristic RZZZ
Characteristic RZZZ: Check for all values existing in P, Q and SID tables
Characteristic RZZZ: No errors found in this test
20:36:41 on 17.03.2020: Test run for user XXX completed

Friday, March 13, 2020

EPM add-in error: 500 Internal server error

While using EPM add-in in MS Excel there is, a quite common error called 500 Internal server error that may distract a users. It is appearing right away when the user just choose connection. Thus, the user even is not connected to BPC server.




As per error log (which looks like this - see below) there is no obvious reason for that error.

2020-03-12 10:47:46,829|ERROR|BPCProxy|FPMXLClient.BPCProxy.Common.Wcf.InterceptorChannelFactory`1+InterceptorRequestChannel.Request||||||19|The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate'.#


2020-03-12 10:47:51,252|ERROR|BPC10Connection|FPMXLClient.Connection.RESTConnection.LoadDimensions||||||VSTA_Main|An error has occured on the server#


2020-03-12 10:47:51,342|ERROR|BPC10Connection|FPMXLClient.Connection.RESTConnection.LoadMetaData||||||VSTA_Main|An error has occured on the server#
2020-03-12 10:47:51,362|ERROR|Connection|FPMXLClient.Connection.ConnectionManager.LoadMetaData||||||VSTA_Main|An error has occured on the server#


2020-03-12 10:47:51,631|ERROR|BPCProxy|FPMXLClient.BPCProxy.Session.SessionServiceHelper.Logoff||||||VSTA_Main|<!DOCTYPE html PUBLIC"-//W3C//DTD HTML 4.01Transitional//EN"><html><head><title> Logoff Message </title><META http-equiv="Content-Type" content="text/html;charset=UTF-8"><style type="text/css"> body { font-family:tahoma,helvetica,sans-serif;color:#333333;background-color:#FFFFFF; }td { font-family:tahoma,helvetica,sans-serif;font-size:70%;color:#333333; }h1 { font-family:tahoma,helvetica,sans-serif;font-size:160%;font-weight:bold;margin-top:15px;margin-bottom:3px;color:#003366; }h2 { font-family:verdana,helvetica,sans-serif;font-size:120%;font-style:italic;font-weight:bold;margin-top:6px;margin-bottom:6px;color:#999900; }p { font-family:tahoma,helvetica,sans-serif;color:#333333;margin-top:4px;margin-bottom:4px; }ul { font-family:tahoma,helvetica,sans-serif;color:#333333;list-style-type:square;margin-top:8px;margin-bottom:8px; }li { font-family:tahoma,helvetica,sans-serif;color:#33333;margin-top:4px; }.emphasize { color:#333333;background-color:#C8E3FF;padding:5px;}.note { color:#CC6600; }a { font-family:tahoma,helvetica,sans-serif;text-decoration:underline;color:#336699; }a:visited { color:#001166; }a:hover { text-decoration:none; } </style></head><body><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><h1> Logoff </h1><br><h2> What has happened? </h2><p> You logged off from the system. </p></td></tr><tr><td> </td></tr><tr><td class="emphasize"><strong> Note </strong><br><ul><li> The logoff took place 20200312 at 094751 system time. </li><li> Close all the windows in your browser and delete the "temporary Internet files" (Internet Explorer) and "private data" (Firefox). <BR> Depending on your browser setting, this deletion of data can take place automatically when you close the browser. </td></tr><tr></tr><tr><td><p></ul><br/><p class="note"></p><p> HTTP 200 - OK <br><p> Your SAP Internet Communication Framework Team#


2020-03-12 10:47:51,646|ERROR|Connection|FPMXLClient.Connection.ConnectionManager.CreateConnection||||||VSTA_Main|An error has occured on the server#


2020-03-12 10:48:49,726|ERROR|BPCProxy|FPMXLClient.BPCProxy.Common.Wcf.InterceptorChannelFactory`1+InterceptorRequestChannel.Request||||||19|The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate'.#



It is worth to check if there is a dump related to this error – in backend in t-code ST22. Normally there is the ABAP dump which may indicate what is root cause of the error. In this case, there is related to error in the hierarchy. In the details of the dump there is even BPC dimension tech name and hierarchy ID listed. The details like this lead to the error. In my case, I just needed to delete broken hierarchy.

Runtime Errors         ASSERTION_FAILED
ABAP Program           CL_UJAM_HIERARCHY_STORE=======CP
Application Component  EPM-BPC-NW-ADM
Date and Time          12.03.2020 10:00:25
Short Text
    The ASSERT condition was violated.

Thursday, March 12, 2020

Life after life of SAP NetWeaver and Business Suite/ECC

It was well known fact for some years now that SAP NetWeaver will be at some point reaching end of support. It is true for every software – at some point it is being replaced some something new and not being enhanced/maintained anymore. In the year 2017 the NetWeaver celebrated 20 years. However, SAP announced already earlier that end of mainstream maintenance will be on 31.12.2024 for version SAP NetWeaver 7.5. Similarly, for SAP NetWeaver 7.4 the date is set to 31.12.2020.
However, on 4.2.2020 SAP announced (via official update of maintenance roadmap) that they extended it to end of December 2027. In particular, for SAP NetWeaver 7.5 mainstream maintenance will be offered through 31.12.2027 and extended maintenance will be offered until end of 2030. Considering that by the year 2030 the NetWeaver will be death – it will be 33 years old if I count it correctly.

Concerning SAP Business Suite 7 – it will be also offered by mainstream maintenance until 31.12.2027 and extended maintenance until 31.12.2020. Nevertheless, there is a “but” like there always is. Mainstream maintenance will be provided for the latest three EhPs only after 1.1.2026. Another the “but” is that the extended maintenance comes with additional 2% fee on top of the respective support fee (20%). The 3rd “but” is that SAP customer needs to buy SAP S/4HANA license already to show that they are in process of transition to S/4HANA.
In October of 2014 SAP extended support from 2020 until 2025 for the ECC/Business Suite 7. At the end the most pressing question of all SAP customers – “Is there any chance that SAP will extend their 2025 deadline ECC/Business Suite 7“ has an answer,
For both NW and BS - after 1.1.2031 only customer-specific maintenance will be offered.

Finally, concerning S/4HANA current SAP’s commitment is until 2040.


More information:
1648480 - Maintenance for SAP Business Suite 7 Software including SAP NetWeaver
2741041 - Maintenance for SAP NetWeaver 7.X Business Warehouse
2881788 - End of SAP Business Suite 7 mainstream maintenance
SAP Release Brochure - SAP release and maintenance strategy
Extended Innovation Commitment for SAP S/4HANA Clarity and Choice on SAP Business Suite 7

Friday, March 6, 2020

DBSQL_SQL_ERROR error while writing to BW InfoProviders

I recently faced a strange error while working on simple BW transformation. There was an end routine in place. I had a few arithmetic operations within the end routine. In particular I was multiplying key figure by big number (10mil) – so called I was scaling up the key figure. The routine was syntactically correct. In addition, the transformation did not indicate any problems it was possible to activate it – so no problem in design time at all. On other had while in run time my load failed.
There were messages like following in the load’s monitor:

Runtime error while executing rule -> see long text
Update terminated in accordance with error handling setting
Overflow converting from '1.08647e+14'
An exception was raised
Error in substep
Data package processing terminated

There was also ABAP dump present, which was generated for the failed load in case target infoprovider was info cube.

Category               Installation Errors
Runtime Errors         DBSQL_SQL_ERROR
Except.                CX_SY_OPEN_SQL_DB
 Short Text
     SQL error "SQL code: 0" occurred while accessing table "/BIC/FZZZZ_ZZZ".
 What happened?
     Database error text: "SQL message: "
An exception has occurred which is explained in more detail below. The
exception is assigned to class 'CX_SY_OPEN_SQL_DB' and was not caught
 procedure
"WRITE_ICFACT" "(FORM)", nor was it propagated by a RAISING clause.
Return value of the database layer: "SQL dbsl rc: 99"
>>>>>   INSERT (l_facttab) FROM TABLE g_t_bia.

In case target infoprovider was DSO object the ABAP dump looked like below:

Category               Installation Errors
Runtime Errors         DBSQL_SQL_ERROR
Except.                CX_SY_OPEN_SQL_DB
 Short Text
     SQL error "SQL code: 0" occurred while accessing table "/BIC/AZZZZ_ZZZ00".
 What happened?
     Database error text: "SQL message: "
An exception has occurred which is explained in more detail below. The
exception is assigned to class 'CX_SY_OPEN_SQL_DB' and was not caught in
procedure
"INSERT_ODS" "(FORM)", nor was it propagated by a RAISING clause.
Return value of the database layer: "SQL dbsl rc: 99"
>>>>>   INSERT      /bic/azzzz_zzz00

I tried to comment out my arithmetic operations in the code of the transformation and the load succeeded. It was obvious that there is overflow going on while computing my arithmetic operation I was wondering why in the design time there is no error. My target variable of multiplying was type of DEC 21 Decimal 7 (e.g. IO /CPMB/SDATA in BPC) and that was not able to fit the result of computation that was bigger that DEC 21. When I changed my target variable to type of DEC 31 (e.g. IO /CPMB/LSDATA in BPC) it all worked fine.

In case there is no arithmetic operations in your code there might most likely issue with regarding parallelization. Some processing that are running in parallel are locking the objects (e.g. target infoprovider) that causes the error like this. In such a cases repair of DB object via t-code SE14 may help. Similarly, cube indexes rebuild via ABAP program SAP_INFOCUBE_INDEXES_REPAIR or in t-code RSRV may help. Another solution can be reduce maximum size of the data packages. All these things mentioned above are valid in case the BW is not on HANA DB.