Vous êtes sur la page 1sur 34

Step by Step Procedure to Extract

Data from R/3 to BI 7.0 using


Query

Applies to:
SAP BI 7.0. For more information, visit the EDW homepage.

Summary
This article demonstrates a step-by-step process for doing generic extraction from R3 into BI using Infoset
query. It also describes the creation of User Groups,Infoset query and BI objects like InfoObjects, DTP,
Transformations and also includes the steps to install Objects from BI Content.

Author: Vishall Pradeep


Company: Applexus Software Solutions (P) Ltd.
Created on: 24.02.2011

Author Bio
Vishall Pradeep Somasundaram is working as SAP BI Consultant with Applexus Software Solutions (P) Ltd.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Table of Content
Table of Content ................................................................................................................................................. 2
Steps in R/3 ........................................................................................................................................................ 3
Step 1: Creation of User Groups (Transaction SQ03) .................................................................................... 3
Step 2: Creation of InfoSet (Transaction SQ02) ............................................................................................. 5
Step 3: Creation of InfoSet Query (Transaction SQ01) ................................................................................ 11
Step 4: Creation of Generic DataSource (Transaction RSO2) ..................................................................... 15
Step 5: Testing Generic DataSource (Transaction RSA3) ........................................................................... 17
Steps in BI......................................................................................................................................................... 19
Selecting Source System .............................................................................................................................. 19
Replicate Metadata ....................................................................................................................................... 19
Creating InfoPackage and uploading data to PSA ........................................................................................... 21
Creating InfoArea .......................................................................................................................................... 22
Creating DSO ................................................................................................................................................ 24
Creating Transformation ............................................................................................................................... 26
Creating DTP (Data Transfer Process) ......................................................................................................... 28
View contents of DSO and move data from New to Active table .................................................................. 31
Related Content ................................................................................................................................................ 33
Disclaimer and Liability Notice .......................................................................................................................... 34

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Steps in R/3
Steps to create a SAP query using InfoSets.
There are three main steps in writing a query. They are;
1. Creation of User Groups (Defines who is going to create, modify and use the query)
2. Creation of InfoSet (Defines the set of data used in the query)
3. Creation of the Query (Generating reports using the data)
4. Creation of a Generic DataSource
5. Testing Generic DataSource

Note: Generally there is no need for you to carryout the first step for every query you write. Once created, you can reuse
them in queries.

Step 1: Creation of User Groups (Transaction SQ03)

1. Go to the screen SQ03


2. Enter the Group Name you want to create and press Create

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

3. Enter a description to the user group and press save

4. Now the User Group got created as “ZUG_TEST”

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Step 2: Creation of InfoSet (Transaction SQ02)

1. Go to the transaction SQ02


2. Enter a Name to your InfoSet and Press the Create Button

3. You will get the Popup window.


a. Enter the Descriptive name to your InfoSet
b. Select the data source which suits your requirement, I am using Table join using basic table as
DataSource
c. Enter the First table to get the data (I am using table VBAK to get the header data of the
Sales Document)
4. Press Continue

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

5. Now the table VBAK gets inserted. To insert other tables click on the Insert Table Button

6. In the Popup window mention the table you want to insert next and press continue. I am inserting the
SD Item level data table VBAP

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

7. Press the Continue button. You will see the tables with automatic joint Conditions as shown below

8. Now click the Insert button again and enter the next table. I am entering VBKD to get the Sales
Document: Business data.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

9. Press the Continue button. You will see the tables with automatic joint Conditions as shown below

10. Now press Check Button. If there are any errors in linking the Joins it will be highlighted and you can
see the result of check in the bottom of the screen
11. Click "BACK" button

Note: In the proposed links between the tables, if you don't require any link means just right click the link and select
“Remove Join Condition”

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

12. We can limit the number of fields the Infoset can contain
13. Select the create empty field groups button and press continue

14. Now we can see all the field groups which are created and now we can drag and drop the fields from
" Data Fields tab "in the left side of the panel to Field Group/ Data Fields in Right side panel

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

15. Now we can generate the Infoset by clicking Generate button

16. After Generating , Click the "BACK" button


17. Now we have generated our InfoSet to be used in the query. Now we have to tell the system who
can Change/Use this InfoSet
18. Now select the Infoset which is goin to be assign and then click the "User Group Assignment"
button

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 10
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

19. Select the User Group and press save(Here I have assigned my Infoset to the user group
"ZUG_TEST" which we created in Step 1)

Step 3: Creation of InfoSet Query (Transaction SQ01)

1. Go to the transaction SQ01


2. If your user Group is not displayed already , then click other user groups button

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 11
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

3. Select the User group from the list and click on "Choose"

4. Now give the query name and click on "CREATE" button

5. Now we can give a title and add some notes for references and press "SAVE" button and then Click
"BACK" button

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 12
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

6. Now highlight the query you have created and select the Infoset query button to create the query

7. Select the fields which you want to use in selection criteria and the fields which you need to display
by checking the check boxes near each field (Selection and output checkboxes)

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 13
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

8. In my case , I am selecting Sales Document, Date on which record was created ,Sales Document
type, Sales Document item ,Item type, Customer Group and Incoterms
9. We can see the selection information in the bottom of the screen
10. After selecting the required fields , Click "SAVE" and then click on "BACK" button
11. Press "F8" to process the Output

12. A selection Screen appears , Press "F8" to see the output

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 14
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Step 4: Creation of Generic DataSource (Transaction RSO2)


1. Go to Transaction RSO2
2. Select the radio button for "Transactional Data" and give the DataSource name and click on
"CREATE" button

3. A screen appears as below , In that give the Application Component as "SD" since it deals with
Sales Documents and give description to data source and click on "Extraction from Query"

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 15
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

4. Give the Infoset name whish we created already using Transaction SQ02 and save the DataSource
and now you can see the Extract structure

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 16
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Step 5: Testing Generic DataSource (Transaction RSA3)

1. Go to transaction RSA3
2. RSA3 is known as extractor checker. Give the name of DataSource. Either click on "Extraction"
button or press "F8".

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 17
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

3. It shows the number of records extracted

4. Go to Transaction RSA6
5. RSA6 is the tcode used to check whether a DataSource is available for replication or not
6. Check whether DataSource is available under the application component SAP r/3->SD. In the figure
given below DataSource "DS_SD_TEST" is available and thus it is available for replication

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 18
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Steps in BI
Selecting Source System
Take RSA1 tcode. Click on "DataSource‟"section present in the left side panel under "Modeling" section.
Select appropriate source system. Click on the button "Choose Source System". Select source system as
R/3.

Replicate Metadata
1. Now select Application Component. So select "Sales and Distribution" and check whether
DataSource is available under it. It won‟t be there because it was created in R/3. So right click on
Sales and Distribution and click on "Replicate Metadata". Then all the DataSource under SD will be
regenerated in BI

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 19
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

2. It asks for options for the version of DataSource. That is whether we need it in 3.x version or as
(RSDS) DataSource. We have to select rsds DataSource. If the version is rsds option then the object
will be available in BI7.0 otherwise it will be available only in 3.x version

3. It may take some time to replicate the DataSource to BI. When replication is completes DataSource
is available under the Application Component "Sales and Distribution".

4. Double click on DataSource and click on "Activate" button to activate the DataSource

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 20
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Creating InfoPackage and uploading data to PSA


1. Once the DataSource is activated, Right click on it and select "Create InfoPackage"

2. In the update tab of InfoPackage only "Full Update" option is there because delta update mode was
not selected when the DataSource was created in R/3 side. In the section for InfoPackage click on
"Start" button which is under "Schedule" tab. Since it‟s a full upload it extracts all records from
"VBAP" table in R/3

3. When the process is over right click on the DataSource and select the option "Manage"

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 21
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

4. In the next screen, select the request and click F5 or the icon called "PSA maintenance"

5. In the next screen select the first row showing the number of records retrieved and press enter or
click on the tick mark. A window is shown with the number of records fetched

Note:
1. Now data is in the PSA table. Sometimes the InfoObjects corresponding to the fields in DataSource are not
active in BI side. So InfoObjects have to be installed from BI content , If the Info Objects not found do the
following steps to Install them (In this case all the Info Objects are Installed)
2. Go to RSA1 tcode and click on BI content on the left side of the panel. Expand InfoObject and double click on
the option "Select Objects"
3. In the window which pops up click on find button to search for the InfoObjects that are required and click on
„Transfer Selections‟ button if it is found
4. Transferred InfoObjects are transferred to the collected objects section which is in the right side and Click on
"Install" button to install the collected objects

Creating InfoArea
1. In RSA1 select InfoProvider under "Modeling" tab. Right click on InfoProvider and select "Create
InfoArea"

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 22
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

2. Give a name and description for the InfoArea

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 23
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Creating DSO

1. Right click on the Info Area created and select the option "Create DataStore Object"

2. Give name and description for DSO and then click on "Create" button

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 24
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

3. Now we get the maintenance screen for our DSO. We can find our InfoObjects in the middle part of
our window. Select the button for "All InfoObjects"

4. Drag mouse over the buttons and you can see the description of buttons. They are marked in the
below figure. Click on "Find" button and type the technical name of the InfoObject. For example, give
"0DOC_NUMBER" and search to get Purchase document number

5. Now click and drag the InfoObject to the right hand side. Drag 0DOC_NUMBER to the node "key
fields". Similarly find and drag all other fields in our DataSource. Drag and drop 0DOC_NUMBER
and 0S_ORD_ITEM should come under "Key fields". Similarly put 0APO_CRDATE, 0ITM_TYPE,
0CUST_GROUP, 0INCOTERMS,0DOC_TYPE under "Data fields".When we drag all fields into our
DSO click on the activate button to activate our DSO

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 25
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Creating Transformation
1. It maps fields from the source object to the target object. A transformation converts the fields of the
source into the format of the target. Right click on the DSO and select "Create Transformation

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 26
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

2. In the source of transformation we have to give the DataSource name and source system

3. Drag and connect arrows from the source side to their corresponding fields in the target side

Note: Here I dont want the text fields, so I am not assigning it to any Info Objects.Incase if you need you can find it out
and drag and drop them into DSO

4. Save and Activate the Transformation

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 27
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Creating DTP (Data Transfer Process)


1. Data Transfer Process (DTP) is used to transfer data from source objects to target objects in BI.
Right click on DSO and select "Create Data Transfer Process"

2. A Pop up with Target of DTP and Source of DTP will occur and press "Enter"

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 28
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

3. In the „Extraction‟ tab select the extraction mode as "Full". Click on "Update" tab. Select "Valid record
Update,No Reporting (Request Red)" option under error handling section. This option allows you to
update valid data. This data is only released for reporting after the administrator checks the incorrect
records that have not been updated and manually releases the request (using a QM action, that is,
by setting the Overall status on the Status tab page in the monitor)

4. Click on "Activate" button.

5. If DTP is active then click on "Execute" button under "Execute"tab

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 29
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

6. The DTP window shows that the package extracted 402 records

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 30
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

View contents of DSO and move data from New to Active table

1. Right click on the DataSource and select "Manage" to see the contents of DSO. Click on the
"Contents" tab and click on "New Data". Press "F8" button to see the records
2. We have to activate the data in the new table to make it available in the table for "Active Data".To
activate the data, click on the "Requests" tab and select request. Click on "Activate" button

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 31
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

3. In the next window (below figure) select the request and click on "Start" button.It may take some time
to load data into the table for active data. Click on the „Refresh‟ button to refresh the request. After
some time the request will be in green color

4. When the request is in green color it means that the data is active now. Click on "Contents" tab and
click on "Active Data" button. Press „F8‟ and it will show the records in DSO

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 32
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Related Content
Thread: data extraction from r3 to sap bi 7.0
Creating Transformations
Creating InfoSet Queries
For more information, visit the EDW homepage

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 33
Step by Step Procedure to Extract Data from R/3 to BI 7.0 using Query

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 34