Basic Steps of Data Flow Loading Master Data From Flat File

Embed Size (px)

Citation preview

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    1/30

    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 asSource.

    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 CodeRSA1 : Data Warehouse Workbench

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    2/30

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

    Customer Language Land City Name260 EN US SEATTLE JOHN261 DE DE HAMBURG SAM262 DE DE WALDORF MICHEAL

    Right click on the InfoProvider column header. Select Create InfoArea

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    3/30

    Enter the details InfoArea name and Description

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    4/30

    The InfoArea IA for Customer appears on the InfoProvider list.

    Right click on the created InfoArea and create InfoObject Catalog

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    5/30

    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 createCharacteristics 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.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    6/30

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

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

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

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    7/30

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

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

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

    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, havingnaming convention /BIC/P

    - Check With Texts, to create a corresponding Text table for thisMaster 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 thisscenario).

    - Enter the InfoArea in the box below.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    8/30

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

    Ex: Customer Id primary key field

    Land

    City

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    9/30

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

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    10/30

    Enter the Data type and the Length. [Enter]

    Repeat the same for other fields too.

    [Activate ] - Activate all dependent InfoObjects.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    11/30

    Create File Interface: Source Systems File Create

    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 theSource System.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    12/30

    Choose the Source System

    File

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    13/30

    Right click on the header and Create Application Component.

    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

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    14/30

    Enter a suitable DataSource name : DS_Cust

    Source System : Flatfile

    Select Data Type of DataSource : Master Data attributes as we are creatingmaster 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 theMaster Data records (DS2)

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    15/30

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

    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

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    16/30

    - 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 asSeparated with Separator (for ex CSV).

    Enter the Data Separator as , .

    Proposal tab provides a quick view of the data in the flat file to beuploaded

    Click on the Load Example tab. The details can be viewed in the belowpane.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    17/30

    Fields tab provides details of all fields used to create a data structure, tomap 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, lengthetc) are copied here.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    18/30

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

    [Save]

    [Activate]

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

    - Click on Read Preview Data

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

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    19/30

    Rt. Click on the Data Source and Create InfoPackage.

    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

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    20/30

    - Click on [Start].

    - Then click on the [Monitor]buttonnext to Process Chain Mgmt

    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 theflat file values.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    21/30

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

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

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

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

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

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

    Right click on DataSource Create Transformation

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    22/30

    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 were considering Master dataonly. 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 forDS1)

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    23/30

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

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

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

    Save and Activate, if the mapping if done correctly.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    24/30

    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

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    25/30

    - 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 :

    Source System: Flat file

    Click on OK.

    In the DTP properties window,

    Extraction tab,

    - Select Extraction Mode as Full.

    [Save]

    [Activate]

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    26/30

    Update tab no changes to be made

    Execute tab,

    - Click on [Execute] button

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    27/30

    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 onthe Master data table created : /BIC/P Table displayExecute

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    28/30

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

    Text table Data Display is Language Dependent:

    For Lang = EN, display corresponding Short Desc.

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    29/30

    For Lang = DE, display corresponding Short Desc.

    Observations:

    In the above Master data table display,

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

    These 3 fields have been created as a result of checking the With Master datafor the Characteristic. The contents of the Master data are stored in the newlycreated transparent table /BIC/P 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 WithText data for the Characteristic. The contents of the Text data are stored in thenewly created transparent table /BIC/T Ex:

  • 7/31/2019 Basic Steps of Data Flow Loading Master Data From Flat File

    30/30