Thursday, June 9, 2022

Error: Numeric overflow for parameter/column

I recently ran into an issue of reading aDSO object from custom code. I used a method READ of ABAP class CL_RSDRI_INFOPROV. Return code of the method call was 8 = inherited_error. When I debugged it; I came to place in FM TREX_DBS_AGGREGATE where following call is performed:

cl_hdb_sql_for_aggr_req_facade=>get_instance_for_1st_chunk

Exception that was triggered I found following error:

AttributeEngine: overflow in numeric calculation;AttributeEngine: overflow in numeric calculation;exception 70006944: AttributeE

overflow in numeric calculation; $message$=aggregation failed $BIC$<KF_name>$sum$ 1 fixed14.3(17) exception 70006944: AttributeE

overflow in numeric calculation; $message$=aggregation failed $BIC$ KF_name $sum$ 1 fixed14.3(17) ,Exception in executor ...

plan408469425@ndhcdb01-int:30085 while executing pop 6: calcEngine search on olapIndex failed.,QueryId: ...

00O2SPBEZ1RC04NPREWOW2QMR:_C10/[Request Info: Object Name = "<db_schema>"."0BW:BIA: <cube/aDSO_name>", FM Name = TREX_DBS_AGGREGATE]

Error 6.944 has occurred in the BWA/SAP HANA server

Error reading the data of InfoProvider <cube/aDSO_name>$X



Seems this is a generic DB error no 10811:

Numeric overflow for parameter/column (<id>) source type <source_type>, target type <target_type>, value '<value>'

Apparently, value of KF mentioned in the error exceeded its threshold. Solution was to delete the data that caused this overflow.

 

More information:

2399990 - How-To: Analyzing ABAP Short Dumps in SAP HANA Environments

2393013 - FAQ: SAP HANA Clients

2352450 - ADBC: Numeric overflow for data type BIGINT


Critical path of a process chain

Within BW Tools (t-code ST13) and in Process Chain Analysis in particular there is a function call “Critical Path” available. What it does is basically highlights some of the processes in the PC that are connected with a flow of the PC meaning what is a previous process of that needs to be completed in order for the next process to start. Once it is set on the BW system start determining the process, which finished as last one. Then the systems goes back thru a list of PC’s processes up to a trigger of the PC. This is how the critical path is analyzed.

A review of the critical path does not help much with a respect to optimizing of the PC runtime as there is no relation between the time the particular process consumed. The function is implemented in ABAP method TIME_CRITICAL_PATH of ABAP class CL_RSPC_HIER.

The function is available under a button called “Critical Path on/off” available in ST13’s Process Chain Hierarchy screen:


More information:

Suite of helpful BW programs – BW Tools (ST13->BW-TOOLS)

Run time comparison of Process Chains

Tuesday, June 7, 2022

0INFOPROV vs 0TCAIPROV

I recently faced an authorization issue when a new BW/BEx report was created. It wasn’t accessible by end users. When I traced in t-code RSECADMIN I got below error message:

Authorization missing for aggregation (":"): Char: 0INFOPROV – empty



From the trace itself, it looked like it is obvious. Analysis authorization object used in role of end user lack a 0INFOPROV characteristics. In particular its column aggregation. I followed up my analysis by checking corresponding analysis authorization object.

By definition (see e.g. here) every analysis authorization object needs to have below three characteristics:

0TCAACTVT (activity), 0TCAIPROV (InfoProvider) and 0TCAVALID (validity)

 

Therefore, no mention of the 0INFOPROV that popped up in the RSECADMIN’s trace. From this, it seemed that my analysis authorization object is setup in correct way. Nevertheless, why the RSECADMIN’s trace is complaining about 0INFOPROV? What is relation between the 0INFOPROV and 0TCAIPROV? The latter is referenced to earlier one. However, that shouldn’t matter...

It turned out that the 0INFOPROV was set to be an Authorization Relevant (in table RSDCHA field AUTHRELFL is set to X). As you can see on below picture, the 0INFOPROV comes from a Business Content as not Authorization Relevant (tables in both systems) however in the SAP BW system in question (table at the picture’s bottom) the active version of the characteristics was enabled as Authorization Relevant. That particular setting was driving the security trace to mark the 0INFOPROV as not present in the analysis authorization object. Once I included the 0INFOPROV (and its column aggregation) into the analysis authorization object effected, business user was able to access the report.


More information:

Defining Analysis Authorizations

820183 - New authorization concept in BI

1956404 - Characteristics 0TCAIPROV, 0TCAACTVT, 0TCAVALID are no longer Authorization Relevant after Upgrade to BW7.3 or higher



Sunday, June 5, 2022

CDS views related to Analytics (BI)

A CDS (Core Data Services) concept is around for some time and it enables data models to be defined and consumed on the database server rather than the application server. The concept is important from many perspectives. It provides: semantic layer (for use cases like, analysis, operations, search etc.), a uniform data model for all transactional and analytical application areas, and brings an simplifications to the SQL database language, reducing technical complexity for the user. One of the use cases for the CDS is Analytics/Business Intelligence.

Before I dig into the Analytics related CDS view let’s define few more terms related to this area. CDS Annotations describe semantics related to the business data. The annotation enriches a definition of a model element in the CDS with metadata. It can be specified for specific scopes of a CDS objects, namely specific places in a piece of CDS source code.

The CDS annotation can be ABAP specific (means consumed by ABAP runtime) or Framework specifics ones. Particular frameworks ca be Service Adaptation Definition Language (SADL), Business Object Processing Framework (BOPF), Analytics, or Enterprise Search.

 

Let’s focus on Analytics CDS annotations now. Here we recognize two of them:

 

1 Analytics Annotations - Enable the Analytic Manager for multidimensional data consumption, performing data aggregation, and slicing and dicing data. BI front ends like Design Studio and Analysis Office can consume the data via the Analytic Manager.

2 AnalyticsDetails Annotations - Enable application developers to specify the default multidimensional layout of the query, the sequence of variables in UI consumption, and the specific aggregation and planning behavior of the data. All these annotations can only be used in views with @Analytics.query: true. Such identified CDS views are called CDS Query.

 

 

Based on Annotation Analytics.dataCategory we can distinguish between following data categories of the CDS views:

 

1. Fact View = CDS view annotated with @Analytics.dataCategory: #FACT

CDS entity is represented by fact table (center of star schema) of transactional data object. The fact table contains measures (key figures). Use case here is an replication thus this type of the CDS view should not be joined with master data views.

 

2. Cube View = CDS view annotated with @Analytics.dataCategory: #CUBE

What it is cube view? Used for reporting on BW’s InfoProviders like cubes or aDSOs. It is similar to #FACT but as reporting on only figures doesn’t bring any value such an data need to be joined with master data objects. Example.

 

3. CDS Dimension = CDS view annotated with @Analytics.dataCategory: #DIMENSION

Used for reporting in master data. No key figure fields can be defined as key fields. Only characteristic fields can be key fields. Example.

 

4. Aggregation level view = CDS view annotated with @Analytics.dataCategory: # AGGREGATIONLEVEL

Used in planning scenarios to provide write-back functionality.


Few more words about naming conventions related to CDS Views. There are three different technical names for the CDS view stored in table RSODPABAPCDSVIEW:

SQLVIEWNAME - Name of SQL View (ABAP Object), the sqlviewname is used in the ABAP dictionary can be seen in t-code SE11.

DDLNAME - Name of CDS View

STRUCTOBJNAME - Name of view defined in CDS View (Entity Name)



More information:

Core Data Services

CDS Annotations

Analytics Annotations

AnalyticsDetails Annotations

Cube View in CDS

InfoObject in CDS

CDS views: HowTo use in BW contexts