Skip to Content
Technical Articles
Author's profile photo Dinesh Deivasigamani

Writer function – ‘BW write type’ : Loading Part 2

Part 2 ‘BW write type’ Loading – An Inside Story

 

In this blog series on ‘BW write type’ – Loading, Part 1 describes how to create simple writer function and check your system configuration.

Writer function -> ACTIVATE:

Part 2 describes the list of the objects that are generated automatically in the background when activating the Loading writer function.

  1. DDIC table
  2. HANA stored procedure
  3. Infoprovider
  4. SAP Business Warehouse (SAP BW) objects – Datasource, transformation, DTP and Process chain

Tech. information of these generated objects can be accessed in the Runtime Attributes.

The generated objects – DDIC table, Stored procedure and Infoprovider (These objects are common for some functions in SAP PaPM) are discussed first and followed by the SAP BW objects that are specific for the BW write type ‘Loading’.

 

DDIC table

A transparent table is generated with fields as per the input function, ‘Model BW’ and technical fields starts with FS_PER_*. The technical field FS_PER_PROC_ID makes it possible to execute the writer function with different process selections and store data together with process id. This field is used as DTP filter when loading data to ‘Model BW’. It helps to avoid data duplication in the ‘Model BW’. To store the data in the DDIC table, Writer function should be set always as ‘Executable’.

SAP HANA stored procedure

A SQL procedure is generated as per the input function, output function, formulas and/or selections defined in the input and output tabs. These procedures are stored in the ‘NXI’ schema.

You can access the stored procedure from SAP HANA studio in the SAP HANA modeler perspective in the path: Catalog -> NXI (schema) -> Procedures (search for the procedure name)

As you can see below, the selections on PRODUCT are applied in the Where clause and the formula for UNITPRICE in the select statement.

 

Infoprovider

An ABAP CDS view or an Open ODS view is generated on top of the DDIC table which allows you to use the writer function as input in the Query function to view/report the data stored in the DDIC table.

ABAP CDS view Vs Open ODS view
 CDS technology is most preferred option. Open ODS view is created only in below cases:

  • When the keyfigure default aggregation behavior is changed
  • Authorization relevant infoobject exists
  • Infoobject with Master data exists
  • When generation of ABAP CDS view is not supported
  • In all other cases, ABAP CDS view is generated.

ABAP CDS View: Tech name of the Infoprovider starts with 2CY*. You can access CDS view in the SAP HANA studio -> ABAP perspective

You can derive the Technical name of ABAP CDS view either by adding suffix _CDS_C to the DDIC table name or In the Tcode SE11 -> Enter the Infoprovider name without the prefix ‘2C’ (which represents the DDL SQL view). DDL source represents the ABAP CDS view tech name

You can access the ABAP CDS view in the SAP HANA studio from ABAP perspective,

select ‘search’ icon -> go to tab ‘ABAP object search’ -> enter the ‘ABAP CDS View tech name’ and find

Open ODS View: Tech name of the Infoprovider starts with Y*. In BW client, it can be accessed:     T-code RSA1 -> select ‘Find’ under ‘Modeling’ tab, -> search the tech name by selecting ‘Open ODS view’

 

SAP Business Warehouse(SAP BW) objects

In the SAP BW, objects that are necessary for the dataflow from the DDIC table to ADSO are generated and process chain is generated to control/automate this loading process.

  • Datasource
  • Transformation
  • DTP (Data transfer process)
  • Process chain

In case of SAP BW powered by SAP HANA, you can access these objects in Tcode RSA1(Administrator Workbench)

In case of SAP BW/4HANA, you can access these objects in the SAP HANA studio -> BW modeling perspective.

All the below pictures are shown from SAP BW powered by SAP HANA

Dataflow

 

DataSource

Datasource is generated based on DDIC table with adapter ‘Extraction from SAP HANA’

 

Transformation

Transformation is generated between Datasource & ADSO with fields are mapped 1:1. No transformation happens here. When there are no corresponding field available in the DDIC table, those fields are left unmapped (for example 0RECORDMODE)

 

Data Transfer Process (DTP)

It is generated to transfer data from the source DDIC table to target ADSO. Extraction mode is always set to ‘Full’ with filter applied on technical field Process ID

When writer is executed with Process selections, DTP filter  FS_PER_PROC_ID_ is set with corresponding Process selected and when no process is selected, DTP filter FS_PER_PROC_ID is set as ‘ ‘(blank). This filter prevents the data duplication in ADSO.

 

Process chain

Process chain is generated to automate & control the data transfer from the Input function to ADSO.  In the Process chain, process steps are included as per the ADSO type, properties defined in the ‘Model BW’. These Process chains can be accessed in the Tcode RSPC or RSPC1.

  1. Start process – This is included as first step to trigger the process chain
  2. Run FS-PER Function – This step executes the generated stored procedure and store the results in the DDIC table.
  3. Load Mode on (optional) – In case of planning enabled ADSO this step switches ADSO to loading mode before the DTP.
  4. DTP (Data Transfer Process) – This step executes DTP to load data from DDIC table(Datasource) to ADSO
  5. ADSO data activation (optional) – In case of BW ADSOs and Classic DSOs which requires data activation after data loading, this step is included. It makes the data available for reporting immediately. When the ‘Model BW’ is ADSOs of template ‘Infocube’, this step is not included as data is available for reporting immediately.
  6. Plan Mode on (optional) – In case of planning enabled ADSO this step switches it back to Planning mode on the conditions: When ‘Model BW’ source is ‘Environment’ and the Editable option is set to ‘Yes’ and When ‘Model BW’ source is ‘Business Warehouse’ and it is planning ADSO

At the end of Part 2, you became familiar with

  • Objects that are generated on activation of the writer function.
  • How Input function data is transformed, stored in DDIC table and loaded to ADSO.
  • Accessing these generated objects in SAP HANA studio and SAP BW
  • How Process chain executes this data transfer from Input function to ADSO

In the Part 3, we will discuss how to monitor the process chain and troubleshoot, known issues and solutions

Follow the tag ‘SAP Profitability & Performance Management’ to receive new content notification.

Thanks for reading!

Assigned tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.