Loading Data into InfoCube using ABAP Program in SAP BW
Neetha Jayakrishnan is currently working with L&T InfoTech as SAP BI Consultant.
She have experience of over 2 years on SAP Business Intelligence (BW 3.5 & BI 7.0) in Production support as well as in BW Implementation Project. She has also worked on SAP technologies like Xcelsius, ABAP, and various versions of BI.
This document explains the step by step procedure to Load data into an Infocube using an ABAP Program.
This can be useful in scenarios where we dont have a data model for the Infocube and we want to show the business model to the customers in a short Span.
Program to be used : CUBE_SAMPLE_CREATE
1. Goto Transaction SE38 and execute the Program CUBE_SAMPLE_CREATE
Now you will get the below screen in which you have to enter the InfoCube name and the number of records which needs to be inserted into the InfoCube.
There are 3 modes by which we can update data to this Infocube.
- Generated Values
For all the characterestics and Keyfigures system will generate random values and update this to the Infocube.
- Values from Master data Table
- Ready-For-input ALV
With this Option we can enter data manually into the Infocube. This works like simulation and we can see the data before it gets updated into the Infocube.
Select the Mode from the 3 available options(as per your requirement) and click on “Execute Directly”.
The Program updates the Infocube fields with the values from Master data tables, with random generated values or with manually entered data.
By using “Ready – for Input ALV” option also we can randomly generate data for inputing into Infocube. The advantage of this over the other two option is that, we can see the data before it gets updated to the infocube. So if any modifications are required we can make at this level and then save the data to the Infocube.
For example :
Select the Mode as “Ready – for Input ALV” and number of records as “3”.
This will randomly generate 3 records for the cube and we can see the data in simulation before updating it into the cube.
If you want to write this data to Infocube just click on “Save Data records to Infocube” and the data will be updated to the Cube.
To manually enter data into Infocube put 0 for number of records to be generated and select ” Ready-for Input ALV” Option and Execute.
Now click on “Insert Row ” and enter the data into the InfoCube directly.
Once you complete all the data entries click on “Save data records in Infocube” , the entries will be updated to the Cube.
While manually entering data ensure that the entries matches the length of characters for that Infoobject.