step by step upload master data from flat file

30
Step-by-Step tutorial to upload Master Data from Flat File (SourceSystem) to InfoObjects (Master data table) Basic Steps of Data Flow (ETL process): 1. Determine the Source System (Flat File/SAP R3/WebServices etc) 2. Establish an interface w.r.t the Source system used 3. Create a Data Source – which has a structure similar to the Source structure. Consider two factors : Name of file and Structure same as Source. 4. Create Info Provider to transfer data from Data Source to PSA (Persistent staging Area) 5. Create a Target (Info Provider : InfoObjects/Info Cubes/DSO etc) 6. Create a Transformation rule to map Source & Target fields. 7. Create DTP (Data Transfer Process) to transport data stored within PSA , to the final Data Target. Transaction Code – RSA1 : Data Warehouse Workbench 1

Upload: hirenmadan

Post on 08-Apr-2016

41 views

Category:

Documents


2 download

DESCRIPTION

Step by step upload master data from flat file in sap bw- workbence

TRANSCRIPT

Page 1: Step by Step Upload Master Data From Flat File

Step-by-Step tutorial to upload Master Data from Flat File (SourceSystem) to InfoObjects (Master data table)

Basic Steps of Data Flow (ETL process):

1. Determine the Source System (Flat File/SAP R3/WebServices etc)2. Establish an interface w.r.t the Source system used3. Create a Data Source – which has a structure similar to the Source structure. Consider two

factors : Name of file and Structure same as Source.  4. Create Info Provider to transfer data from Data Source to PSA (Persistent staging Area)5. Create a Target (Info Provider : InfoObjects/Info Cubes/DSO etc)6. Create a Transformation rule to map Source & Target fields.7. Create DTP (Data Transfer Process) to transport data stored within PSA , to the final Data

Target.  

Transaction Code – RSA1 : Data Warehouse Workbench

1

Page 2: Step by Step Upload Master Data From Flat File

  

Source/Input: Create a Flat File of type CSV, with the following structure:  

Customer Language Land City Name

260 EN US SEATTLE JOHN261 DE DE HAMBURG SAM262 DE DE WALDORF MICHEAL

Right click on the InfoProvider column header. Select “Create InfoArea”  

2

Page 3: Step by Step Upload Master Data From Flat File

  

Enter the details – InfoArea name and Description  

  

3

Page 4: Step by Step Upload Master Data From Flat File

  

The InfoArea – IA for Customer appears on the InfoProvider list.  

Right click on the created InfoArea and create InfoObject Catalog  

4

Page 5: Step by Step Upload Master Data From Flat File

  

Enter a suitable Name and Description for InfoObject Catalog.

Select ‘Char.’ or ‘Key Figure’ based on the type of data (Master data/ Trans. Data) needs to be created.

In this case, we are creating Master data. Hence, we need to create Characteristics InfoObject.

Select ‘Char.’

Click on Create.  

The InfoObject Catalog appears right under the InfoArea created earlier.

Now, right click on the InfoObject Catalog and create Info Object.  

5

Page 6: Step by Step Upload Master Data From Flat File

Click here to continue...

.Previous

  

In the pop-up for InfoObject enter Characteristic name and description.

The first Characteristic InfoObject created can be treated as a key value in the Master table to be created.  

On the right window, the properties of the Characteristic ‘CUSTNO’ are visible.

In the General Tab, enter the Data Type and Length.

Note: the ‘Attribute Only’ field is not checked. This means that this Characteristic is a primary key field in the Master Data table.

If the box is checked, then it becomes an attribute of this Characteristic Key field or just another normal field in the Master data Table.

6

Page 7: Step by Step Upload Master Data From Flat File

In the Business Explorer tab, no changes to be done.  

Save + Activate => P tables gets created

In the Master data/texts tab,

-          Check “With Master data”, to create a Master Data table, having naming convention /BIC/P<characteristic name>

-          Check “With Texts”, to create a corresponding Text table for this Master Data table with two default fields – Language & Description.

Select ‘short/medium/long texts’, also ‘texts language dependent’.

-          Select “Char is InfoProvider” (as our InfoObject is our target in this scenario).

-          Enter the InfoArea in the box below.

7

Page 8: Step by Step Upload Master Data From Flat File

In the Attribute tab,  enter the fields (non-key fields) that need to be maintained within the Master Data table.

      Ex:  Customer Id – primary key field

                    Land

                    City                 

8

Page 9: Step by Step Upload Master Data From Flat File

On entry of each field, hit [Enter] and in the pop-up box, select the 1st option – “Create Attribute as Characteristic”.

9

Page 10: Step by Step Upload Master Data From Flat File

Enter the Data type and the Length. [Enter]

Repeat the same for other fields too.  

[Activate ]  - Activate all dependent InfoObjects.  

10

Page 11: Step by Step Upload Master Data From Flat File

Create File Interface: Source Systems  File  Create <New File System>

Or

Use the existing file source system

Data Source creation/selection:  

On the Navigator tab, select Data Source. Click on the ‘[X]’ button to Choose the Source System.  

11

Page 12: Step by Step Upload Master Data From Flat File

Click here to continue...

.Previous

Choose the Source System  File  <Flat File source system name>  

Right click on the header and Create Application Component.  

12

Page 13: Step by Step Upload Master Data From Flat File

  

Enter the name and description for Application Component.

Ex: Name: APC_CUSTOMER

Click ok.

The technical name of Application component APC_CUSTOMER now gets saved as  => ZAPC_CUSTOMER  

Right click on the Application component and create DataSource  

  

Enter a suitable DataSource name : DS_Cust

13

Page 14: Step by Step Upload Master Data From Flat File

                          Source System : Flatfile

Select Data Type of DataSource : Master Data attributes  as we are creating master data table.  

Note:

Select Master Data Attributes, while you are uploading Master Data from file (DS1)

Select Master Data Text, while you are uploading Text Descriptions for the Master Data records (DS2)

  

In the right Window, you can view the Data Source properties.

14

Page 15: Step by Step Upload Master Data From Flat File

General Info tab – provides information on the Data Source created  

Extraction tab – provides details of file to be extracted.

In a Data source, we need to mention 2 details:

-          Name of Flat File (ASCII or CSV) to be uploaded

-          Structure (Layout) of the input file, mentioning the fields.  

Therefore, make the following changes:

- Select name of file using F4, search for the file on you local desktop

- Header rows to be ignored = ‘1’ (if file has a header row as column titles)

                                             = ‘0’ (if file has no header row)

- Select Data Format as – “Separated with Separator (for ex CSV)”.

  Enter the Data Separator as ‘ , ‘.  

Proposal tab – provides a quick view of the data in the flat file to be uploaded

            Click on the ‘Load Example’ tab. The details can be viewed in the below pane.  

15

Page 16: Step by Step Upload Master Data From Flat File

Fields tab – provides details of all fields used to create a data structure, to map with the fields from Source file.

-          In the Template Info field, enter the field names (characteristics/attributes).

-          [Enter] or [Save]

-          [Copy] : all properties of the characteristics ( ex: data types, length etc) are copied here.  

Note: the fields 0LANGU and 0TXTSH are the standard SAP defined characteristics InfoObjects.  

[Save]

16

Page 17: Step by Step Upload Master Data From Flat File

[Activate]  

  

Preview tab – gives a preview of data on flat file loaded onto a structure.

-          Click on “Read Preview Data”  

Click here to continue...

.Previous

Info Package: An InfoPackage helps to transport data from the Data Source structures into the PSA tables. (This is similar to transfer of data from Work areas to Internal Tables in R/3 ABAP).  

Rt. Click on the Data Source and Create InfoPackage.  

17

Page 18: Step by Step Upload Master Data From Flat File

Enter the InfoPackage name : IP_Cust

Enter a suitable Description  

Select the corresponding DataSource from the list below and [Save].  

  

On the right window, we have the InfoPackage properties:

Data Selection tab – to initiate loading of data into the infopackage

-          Select “Start Data Load Immediately”

-          Click on [Start].

-          Then click on the [Monitor]button – next to “Process Chain Mgmt”

18

Page 19: Step by Step Upload Master Data From Flat File

Or [ F6].  

In the next screen, we can view the status of the data loading to PSA.

Click on the [PSA Maintenance] or [Ctrl + F8] to maintain the PSA table with the flat file values.  

  

In the pop-up, defining the number of records per request, click OK.  

19

Page 20: Step by Step Upload Master Data From Flat File

  

This leads to the PSA display screen, with the table and the respective data in them.

Click on [Back] and come back to the DataSource screen.  

Transformation: This is a rule that is defined, for mapping the source fields in the DataSource to the final Target (basically, the Info Providers from where BI extracts the reports).

In this case, our target is the InfoObject (Master data table), which has been already created.  

Note: Normally, the Transformation can be created on the Data Source or the Target. Here, we are creating a Transformation on the DataSource.  

Right click on DataSource  Create Transformation  

20

Page 21: Step by Step Upload Master Data From Flat File

In the pop-up,

For the Target of Transformation,

                 - Enter Object Type: InfoObject (this is our target in this scenario)

                 - Enter subtype of Object: Attributes (as we’re considering Master data only. Not transactional data)

                 -  Enter the name of the InfoObject we created.  

For the Source of  Transformation,

                 - Enter Object Type: DataSource (this is our source structure)

                 - Enter name of Data Source used

                 - Enter the Source System used.

  Click on OK  

Note:

While uploading Master Data, select Sub-type of Object : ‘Attributes’ (IP1 for DS1)

While uploading Text desc. For this Master Data, select Subtype of Object : ‘Texts’ (IP2 for DS2)

21

Page 22: Step by Step Upload Master Data From Flat File

In the next screen pop-up, we get the no. of proposals (rules) generated to map source fields with target fields. Click on Ok.  

  

On the next window we can see a graphical representation of the mapping of Source fields to Target fields.  

Save and Activate, if the mapping if done correctly.

22

Page 23: Step by Step Upload Master Data From Flat File

Click here to continue...

..Previous

Data Transfer Process (DTP):

The DTP is a process used to transfer data from the PSA tables, into the data Targets, based on the Transformation (mapping) rules.  

DataSource  right click  Create Data Transfer Process.

In the pop-up,

-          The DTP name is described as : < DataSrc/SourceSys -> InfoObject >

-          DTP type : standard

-          Target of DTP : Object Type : InfoObject (in this case)

Subtype of Object : Attribute

Name  :   < name of InfoObject >

-          Source of DTP: Object Type : Data Source

                                 DataSource  : <name>

                                 Source System: Flat file

Click on OK.  

23

Page 24: Step by Step Upload Master Data From Flat File

In the DTP properties window,

Extraction tab,

                 - Select Extraction Mode as ‘Full’.

[Save]

[Activate]

Update tab – no changes to be made  

Execute tab,

24

Page 25: Step by Step Upload Master Data From Flat File

                 - Click on [Execute] button  

  

25

Page 26: Step by Step Upload Master Data From Flat File

  

Click on [Refresh] until the icons in Yellow, turn Green.

Incase a Red icon appears, we need to track the error and rectify it.

Go Back.  

To view the contents of the Target (Info Object), there are 2 ways:

1. Go to the InfoObject – CUSTNO  MasterData/Texts tab  Dbl click on the Master data table created : /BIC/P<Char name>  Table display  Execute  

On Transformation/DTP  Attribute  rt.click  Manage  rt windw Contents tab  [Contents] F8.

26

Page 27: Step by Step Upload Master Data From Flat File

  

Text table Data Display is Language Dependent:

For Lang = ‘EN’, display corresponding Short Desc.  

  

For Lang = ‘DE’, display corresponding Short Desc.

27

Page 28: Step by Step Upload Master Data From Flat File

  

Observations:

In the above Master data table display,

The fields – Customer Name, Customer Land, Customer City : have been created and loaded with data as per the file.

These 3 fields have been created as a result of checking the “With Master data” for the Characteristic.  The contents of the Master data are stored in the newly created transparent table

/BIC/P<char. Name> Ex:    

The fields – Language , Description : have been created and loaded with data as per the file.

These 2 fields have been created by default, as a result of checking the “With Text data” for the Characteristic.  The contents of the Text data are stored in the newly created transparent table

/BIC/T<char. Name>  Ex:    

28