Technical Articles
SAP PaPM Writer function – ‘BW write type’: Loading – How to create simple writer function
Blog Series 1 – ‘BW write type’: Loading
In SAP Profitability and Performance Management (SAP PaPM), Business data can be stored in the Advanced Datastore Object (ADSO) to serve the ever-growing demands of the business entities reporting and planning needs. When ‘Model BW’ is created with source ‘Environment’, new Advanced Datastore Object (ADSO) is created in the SAP BW client. At the same time, it is also possible to access the existing ADSO’s that are already available in the SAP BW.
Writer function enables to write data from the input functions to the ADSO. When Output function is ‘Model BW’, system automatically offers the ‘BW write type’ as
- Loading – Data is loaded to the ADSO using DTP (Data Transfer Process)
- Planning – Data is written to the ADSO using SAP BW Planning Engine
This blog series 1 has 3 parts.
Part 1: How to create simple writer functions– If you are new to this product or you are configuring your new installation, this blog post guides you how to create simple writer functions for both ‘BW write type’s. Also, it helps to check & fix any system configuration issues.
Part 2: ‘BW write type’ Loading – An Inside Story
Part 3: Troubleshooting and known issues
It is recommended to have your system upgraded to the latest SP to get the full features and latest bug fixes. Minimum of SP09 is required for proper functioning for the writer function.
Part 1: How to create simple writer functions (Loading & Planning)
We create Model Table, enter data manually and write this data to the ‘Model BW’ with the help of writer functions – one for each ‘BW write type’s (Loading & Planning).
We perform the below steps:
- Create Environment fields
- Create Model Table (Input function)
- Create ‘Model BW’ (Output function)
- Create Loading Writer Function
- Create Planning Writer Function
- Apply Selection & Formula
Step 1: Create Environment fields
Select Environment, and create the below fields in the tab ‘Environment fields’
Step 2. Create Model Table (Input function)
Select Model Table Source – Environment and include the below fields. On activation, DDIC table with technical name Y- is generated (refer to runtime attributes for details)
Select Maintain data and enter the below data. Select Save to store these values in the table.
Step 3: Create ‘Model BW’ (Output function)
Model BW Source: Environment
Editable: Select Yes, if you want to edit the data after loading otherwise Select No. Irrespective of your selection, it is possible to use both ‘BW write types’.
Include all the Characteristics and Key figures. On activation, ADSO with technical name Y- is generated in the SAP BW client.
Step 4: Create Loading Writer Function
Create a writer function with Model Table as input function and ‘Model BW’ as output function,
‘BW write type’ : Loading
‘Model writer type’ : Insert
All the artifacts that are necessary for writing data from Model Table to ‘Model BW’ are generated automatically in the background when the writer is activated
When the writer is RUN, it triggers the process chain which automates the complete process of loading data to the ADSO. When the process chain is finished, application log shows up with the success/error messages.
Loading writer issues:
In case of errors, check the blog post How to setup and stabilize PaPM for appropriate error messages and fix your configuration.
In case ‘0’ zero records loaded to ADSO, implement the SAP BW note 2752657 – Transfer Tool DTP & RSSM (22) to fix the issue. After the note implementation, create a new writer function. For more details, refer to the known issue – 2 in the Part – 3 of this blog series of this blog series.
View data in ‘Model BW’
In the ‘Model BW’, select ‘Analyze’ to view data stored in the ADSO. It generates default query and displays the data. Add fields to the rows/columns for data slicing & dicing.
Step 5: Create Planning Writer Function
Create another new writer function with ‘BW write type’ as Planning. (It is not advisable to switch the ‘BW write type’ from loading to planning or vice versa after activation. In the background different SAP BW objects are generated).
Delete the existing data from ‘Model BW’->Delete data and run the Planning writer function. When there is no configuration issues, data is successfully written to the ADSO with SAP BW planning Engine.
Planning writer errors:
In case of errors check this blog post How to setup and stabilize PaPM with the appropriate error messages.
If the error messages are related to Variables values as shown below, implement the SAP BW note 2913238 – Error transferring single key value from variable to SID
System error in program CL_RSR_LOCAL_VAR and form BAD STATE
Variables contain invalid values
Step 6: Apply Selections & Formulas
The field UNITPRICE has initial value and it is not populated as there is no corresponding field in the Model Table. Define a formula to calculate UNITPRICE, first include the field in the Signature tab -> Action -> Add.
Then in the Output tab, add UNITPRICE and define formula the AMOUNT / QUANTITY. Activate the function again to apply these changes. Delete data from the ‘Model BW’ and run the writer. Data is now loaded only for PROD01 & PROD02 with the calculated values for UNITPRICE.
Conclusion
When the data is successfully written to ADSO confirms that the writer function with ‘BW write types’ (Loading & Planning) works properly.
In the Part 2: ‘BW write type’ Loading – An Inside Story, describes the artifacts that are created in the background on activation of the writer function.
Good luck!
Help documentation:
Model Table: Model Table – Help documentation
‘Model BW’: Model BW – Help documentation
Writer(‘BW write type’ loading): Writer – Help documentation