Skip to main content

Pricing Conditions data through Custom CDS

Client is multinational enterprise information technology company that provides products and services geared toward the data center such as servers, enterprise storage, networking, and enterprise software.

 

 

Project Background

Purpose of the project was to move existing Classical BW reports that shows near real time data to real time data reporting using SLT and BW4HANA inbuilt capabilities. This is one of the best approaches to use BW Query and composite provider (BW4HANA objects) as BW shell will add flexibility to do more things. 

With Classical BW systems, Business needs to wait at least half a day for BW reports to get refreshed. However, SLT with BW4HANA system capabilities data get refreshed as soon as data enters Transactional systems and available for reporting. Thereby, supports your business users from Finance, Order Management and Delivery to make their tactical decisions on a day-by-day basis  

businessman hand working with new modern computer and business strategy as concept; Shutterstock ID 276609200

PRCD_ELEMENTS is a standard Pricing and Conditions Transparent Table in SAP SD application, which stores Pricing Elements data. Two BW4 reports stopped working as PRCD_ELEMENTS SLT replication was causing performance issue in S4 production. It was primarily because SAP generates logging table for each SLT table replication and size of logging table (~200 GB) generated was consuming more system memory (Memory dump issue). Since PRCD_ELEMENTS is the only pricing condition table in S4 hence we need to find an alternative solution.

  1. CDS – Core Data Services are virtual data models of SAP HANA which allows direct access to underlying tables of the HANA database. SAP CDS Views aim to push logic from the application server to the client-side and database
  2. Info object – Smallest Unit in SAP BW. Info objects are used to store Master data (something which do not change frequently)
  3. HANA Calculation View – Virtual data objects that helps you create information view on data base itself. It helps calculate data on the fly to cut down unload and reload phases to zero when it comes to business-related changes in data staging or extension/reduction in a data model. It also keeps your operation costs for SAP HANA at a minimal level because less data in an SAP HANA database means less expense for licensing. Also, the virtual aspect of this model ensures there is no redundant data lying at multiple places in BW
  4. Composite Provider / HCPR – Virtual BW data object that helps you union or join more than one info providers (on which you can create reports) to design complex business scenarios. A Composite Provider is an Info Provider, which combines data from several analytic indexes or from other Info Providers (by Join or Union) and makes this data available for reporting and analysis. UNION and JOIN operations are executed in HANA and not on application server, thereby increasing the model efficiency and faster execution time
  5. BW Query – BW4HANA based query to create data models or queries
  6. SLT – SAP Landscape Transformation is a trigger-based data replication method in HANA systems in real time
  7. ADSO – Advanced Data Store Objects is the primary persistent object used in data modelling 
  8. AFO – SAP Analysis for Office commonly known as AFO is an Excel add-in (reporting tool) that helps you analyze data and helps in decision making
  1. SLT setup between S4 and B4 systems so we have live data as soon as it refreshes in source system
  2. Models such as Calculation View, Composite Provider and BW query formerly known as Bex Query
  3. Analysis for Office tool for reporting purpose
  4. Minimum System requirement: SLT - SAP 7.3 SP 10, HCPR – SAP 7.4 SP 5, BW Query – SAP 7.4 SP 9, BW4HANA Info objects – SAP BW 7.5 SP 0, CDS Views – SAP 7.4 SP05
  5. Creation of Data Flows (Source system, Data source, Transformation, Data target) in BW4HANA

Process in S4

  1. CDS Views are created in S4HANA – Created 2 custom CDS for Sales (VBAK) and Billing (VBRK) flow joining Pricing Condition table (PRCD_ELEMENTS)
  2. CDS Views are exposed to BW4HANA systems through RFC – Data flows from Custom CDS in S4 to B4 through RFC call (B4 Data flow: Data Source -> Transformation / DTP -> ADSO -> PC)

Process in B4

  1. Calculation Views generated through B4 object (ADSO) are exposed to our HANA models
  2. HANA models are then exposed to Composite provider for further cleansing and transformation
  3. BW Query is then created on top of Composite Provider. AFO is used as reporting tool

Objects created in S4 and B4 systems:

System

 Object type

S4

CDS View (Sales / Billing)

B4

Data Source (Sales / Billing)

B4

Transformation / DTP (Sales / Billing)

B4

ADSO (Sales / Billing)

B4

Process Chain

Available Options

There is a Standard CDS View provided by SAP in S4 for fetching PRCD ELEMENTS table data. We can use these standard CDS view to push data to B4 through SLT or data flow process

Pros:

  • Saves time for design
  • Replicate and ready to use

Cons: We had B4 and SLT issue pertaining to this option which are as below.

B4 Issue

  • Large amount of data will be pulled due to 115 fields in CDS (~5.2 B records)

SLT issue

  • Log table generated through Replication would be too huge that S4 systems will have Performance issue (~200 GB)
  • Lower version doesn’t support direct CDS view replication (Current Version: SAP S/4HANA 1610, minimum version: SAP S/4 HANA 1905). However, version upgrade was not an option at that moment

We can replicate CDS views (Standard / Custom) directly through SLT process. Since current version does not support replicating CDS views directly due to lower SLT version (Current Version: SAP S/4HANA 1610, minimum version: SAP S/4 HANA 1905), version upgrade was not an option

Pros: Fastest Process as we just need to replicate the CDS views

Cons: Costlier and time-consuming process to upgrade SLT

We created Custom CDS in S4 system for Sales and Billing flow joining PRCD_ELEMENTS to VBAK and VBRK tables along with Project specific fields and Filter values. These CDS views are then exposed to B4 system through RFC. Views generated through BW object are then consumed to HANA models.

Amongst the available options, option 3 was chosen for implementation due to below reasons:

Pros:

  • Least amount of data among all 3-process due to least number of fields along with Filters such as Fiscal year, Condition types, Billing types, Sales Doc type etc.
  • Less storage
  • Housekeeping activity can be performed in B4 by deleting data over certain years
  • Automation of data through Process chain (Business can decide the number of run times)

Cons: Data availability is in near real time

Solution Overview

CDS Views are implemented in S4 system. We created two custom CDS one for sales and other for billing flow. Once the CDS view is ready it is then exposed to B4 through RFC Connection. Data Sources are created in B4 system to get CDS data. Transformation / DTP are created to push data from Data sources to ADSO.

Calculation Views and Composite provider helps us implement Mixed modelling in BW4HANA where a model from Native HANA (Calculation views) is exposed to BW object (Composite provider).

Calculation views aids in implementing logic directly on data base layer, thereby reducing execution time by eliminating the need to push the data to application layer. It helps calculate data on the fly to cut down unload and reload phases to zero when it comes to business-related changes in data staging or extension/reduction in a data model. Unlike Classical BW systems there is no need to clear delta queues whenever there is a change in logic which facilitates zero downtimes during go live.

Composite Provider helps us combines data from several analytic indexes (Calculation Views in our Scenario) or from other Info Providers (by Join or Union – Info objects in our Scenario) and makes this data available for reporting and analysis. UNION and JOIN operations are executed in HANA and not on application server. CP also help us implement complex logic such as Key and Text display for field, Attributes of Info object.

  1. In the Client environment, BW4 report should be executed using AFO tool
  2. Input User selections when prompted, this would help us restrict data from getting picked from S4 system
  3. Input entered through User Selections would then traverse in reverse order from Query -> CP -> CV
  4. Data is then picked up based on logic implemented in CV. It is further restricted based on logic implemented in CP and Query
  5. When data is pushed using Conventional approach (CV -> CP-> Query), it takes a lot of time to search relevant data as Linear search algorithm is applied and value help field executes implemented logic each time to pull list of values
  6. When CP fields are associated with Info objects, an integer value is assigned to each master data value in an Info object. Thereby, value search help access is much faster
  7. If the data is loaded for first time or new data is loaded, then SID values are generated for all those newly created data traversing through Info object
  1. Lesser amount of data. ~1000 records against 5.2 B records
  2. Lesser maintenance – There is an option in this flow to perform House Keeping activities and data load can be controlled through Process chain
  3. Less amount of data means less amount of storage. ~15 MB of storage vs 189 GB of storage
  4. Data automation can be controlled as per Business requirement through Process chain
  5. Dynamic feature to control Custom CDS view filter through TVARVC table
  6. Only Project specific fields were selected

 

Process

Number of records w / o Custom CDS

Memory Consumption

Number of Records with Custom CDS

Memory Consumption

% records reduction

% Memory reduction

Sales

5.2 B

189 GB

1150

15 MB

99%

99%

Billing

5.2 B

189 GB

1800

15 MB

99%

99%

  1. By implementing this solution, we have reduced the amount of data pulled through SLT process vs conditions data through Custom CDS by 99%
  2. Reduced User Maintenance – This flow would not only help support team with housekeeping activity but also Business users help refresh data anytime through Process chain
  3. Lesser storage in B4 due to less volume of data.
  4. Enhanced User Experience
  5. Improved performance in executing complex process and larger volumes of data
  6. Use Custom CDS wherever Standard SAP CDS or SLT replication cannot suffice the requirement to achieve improved performance results

Sponsors:

Authors: