How to load data thru flat file in demantra?

Hi,
I am using seeded data model for loading data for DM module in demantra.
As per data model there is 3 staging tables for item, location and sales_data i.e. t_src_item_tmpl,t_src_loc_tmpl,t_src_sales_tmpl respectively.
I have seen the final table for sales data i.e. sales_data table. ther is only one item_id and location_id column against which sales_date and quantity is loaded.
I have same sales_data and quantity to be loaded for different location hierarchy and item hierarchy .
How the data file is created ? if you have any sample data files , can you please share with me ? If any changes needs to be done in data model for loading datardsa in custom hierarchies ?
Regards

Welcome user10979220 to the wonderful forum.
"How many rows will be there in item flat file ?
How many rows will be there in location flat file ?
How many rows will be there in sales data flat file ?"
Answer to these questions are based on the number of sales that has occured as well as the item hierarchy and the product hierarchy.
From the example
Item_name | organization | ship to site | Sales date | quantity
item 1 org1 site1 19-Jan-2008 80
item1 org1 site2 20-Jan-2008 100
I can say that the number of rows in sales data is 2 while that in item file is 1 and location file is 2.
The answer to how the flat file will look is
Item file can have
Item_Id|Item_Name
01     Item1
Location file can have
Org_Id|Org_Name|Site_Id|Site_name
O_01     Organization 1     S_01     Site 1
O_01     Organization 1     S_02     Site 2
Sales file can have
Item_Id|Item_Name|Org_Id|Org_Name|Site_Id|Site_name|sales_date|Quantity
01     Item1     O_01     Organization 1     S_01     Site 1     19-Jan-2008 80
01     Item1     O_01     Organization 1     S_02     Site 2     20-Jan-2008 100
Once you define the data model and load the data it is advisable not to change the data model since the next time when you load the incremental data it will error out due to the mismatching columns. So its better that you define the data model first and then create the files accordingly.
Hence after loading data if you want to view sales data at the product_category1 level then you should already have the product_category1 level defined in the data model.Else You have to create the product_category1 level and associate it in the item hierarchy.Also the sales file should have columns for product_category1.
Then the item file will look like
Item_Id|Item_Name|Product_category1_Id|Product_category1_desc
01     Item1     PC_01     Product_category 1
and the sales file will look like
Item_Id|Item_Name|Org_Id|Org_Name|Site_Id|Site_name|sales_date|Quantity
01     Item1     O_01     Organization 1     S_01     Site 1     19-Jan-2008 80
01     Item1     O_01     Organization 1     S_02     Site 2     20-Jan-2008 100
This is just a basic overview about loading the data into the staging tables.In short the item table should have the item hierarchy in it, the location file should have the location hierarchy in it and the sales file must contain the details about the sales at the lowest item-location level.
Hope I answered your query.
Thanks and Regards,
Shekhar

Similar Messages

  • Loading data from flat file...

    Hello,
    I am actually experiencing a problem where I cant load data from a flat file into a table. I have actually reverse engineered the flat file into ODI. But the thing is I don't know how to load the data that is reversed into a RDBMS table. Added, I don't know how create this RDBMS table form within ODI to be reflected on the DB. Added, don't know how to load the data from the flat file onto this table without having to add the columns in order to map between the flat file and the table.
    In conclusion, I need to know how to create an RDBMS table from within ODI on the database. And how to automatically map the flat file to the DB table and load the data into the DB table.
    Regards,
    Hossam

    Hi Hossam,
    We can used ODI procedure to create table in the DB.
    Make sure you keep the column name in the table name same as the column name in FLAT FILE so that it can automatically map the column.
    and regarding Loading data from FLAT File i.e. our source table is FLAT FILE till ODI 10.1.3.4 we need to manually insert the datastore since the file system cannot be reversed.
    Please let me know Hossam if i can assis you further.
    Thanks and Regards,
    Andy

  • Loading data from flat file to ODS

    Hi Experts,
    I have a developed a report, in which Flat file is the datasource and data target as DSO. 
    Here I have one requriment to Increatment the counter value in TVARVC table after every load compleate.
    Can this be done thru Process chain?  I belive this can be done thru process chain by creating variable.
    If this can be done thru Process chains can  any experts send me sample examples code.
    Thanks In Advance.
    Sreedhar.M

    Hi sridhar,
         We have a similar scenario in which we will load data from flat file to datasource the file name (x_20081010.dat) of such format  being fetched from the low value of the TVARVC table ... once successfully executed we had program to increment the value of low which increments by one day adn the next day the file with that will be placed in the application server...
        U can create a abap program varaint and attribute for that and u can achieve that.... this is sample code which searches for the string and after some coding i.e once ur file has been loaded successful code u can write similar code to increment or counter values which u are asking for...
    search s_tvarvc-low for '20'.
            if sy-subrc ne 0.
              sy-msgty = 'E'.
              sy-msgid = 'ZWM1'.
              sy-msgno = '000'.
              sy-msgv1 = 'Unable to find DATE to increment'.
              raise unable_increment.
            else.
              w_date = s_tvarvc-low+sy-fdpos(08).
              w_nextdate = w_date + 1.
              replace w_date with w_nextdate into s_tvarvc-low.
              modify tvarvc from s_tvarvc.
            endif.
    Regards
    vamsi

  • Loading data from flat file to table

    Hi,
    I am using OWB 10g R2. I have to develop a map which loads data from flat file to table.
    1. I have created a .csv file.
    2. Import that into OWB by Module Wizard.
    3. I have created one external table, which use the .csv file.
    After that what I have to do for successfully loading the data into table.
    Regards,
    Sanjoy

    Hi Sanjoy
    You can building a mapping to move the data from somewhere to somewhere else. More specifically;
    1. create a mapping
    2. add external table to mapping
    3. add table to mapping for target (it can be unbound)
    4. map from external table ingroup to target table ingroup (all columns will be mapped)
    5. if target table was unbound right click on target table and click create and bind
    This is a basic mapping you can have for this scenario. There is a post here which does something like this, but it will create a File to Table mapping which will use SQLLoader.
    http://blogs.oracle.com/warehousebuilder/2009/01/expert_useful_scripts_from_simple_primitives.html
    Cheers
    David

  • How to load a long flat file field into BW

    Hi all,
    I have a field from flat file with 256 characters to be loaded into BW. As we all know the max length an info object can take is only 60. How can I split the flat file field so that I can load that data into BW and how can I then concatenate them in the BEx.
    Can anyone suggest a way?
    Thanks in advance.
    Vinay

    Hi Vinay,
    we already had this discussion in this forum. In short:
    1. create a number range object
    2. create a table with a number field a key and a text field
    3. while loading the data check your text against the table. If the text already exist, get the number out of the table. If the text doesn't exist, get a new number out of your number range object and post this number + the text into your table.
    4. in your loaded data always work with the number you assigned to the text
    5. create a infoobject for the number-field
    6. create a variable that takes it's value out of the table.
    regards
    Siggi

  • How to  upload data from flat file to datastore object in BI 7.0

    Dear friends,
    Please tell me
    step by step process for upload data from flat file to datastore object in BI 7.0
    <removed by moderator>
    please help me
    Thanks,
    D.prabhu
    Edited by: Siegfried Szameitat on Aug 17, 2011 11:40 AM

    Create transformation on thr data source and keep the DSO as the target and load.
    Ravi Thothadri

  • Error while loading data through flat files

    Hi,
    I am laoding data through flat files
    I loaded the data in development & then transported it to Quality  system  for doing Integration testing & loaded the data in Quality  system  & data loading was successful
    But we do the regression testing in one more Quality system where the objects get transported from Quality  system ,here when I try to the load the data to any of the cube in this system  I am getting the following error
    Error 'The argument 'US' cannot be interpreted as a number' on assignment field /BIC/ZIFBCOCTR record 1 value US
    Generally we get this error when there is the data of one field is going to the other field
    But one thing I am unable to understand is it was working fine in the Quality system and all the objects got transported from Quality to Regression testing system
    Could any one help me out
    Thanks
    Maya

    Hi,
    Can you please cross check the file structure and the transfer structure.
    Cheers,
    Malli....

  • Error in loading data from flat file....

    Hi,
    While loading the data from flat file , only one column is getting populated in the ODS and after that the sixth column is getting populated with the null values. Also when I save the changes in CSV file .. its not getting saved.
    Could you please tell me what could be the probable reason for this.
    Also what are the points we should keep in mind while loading from flat files.
    Regards,
    Jeetu

    Hi,
    You need to take care of -
    1. you flat file structure ( left to right columns) should match with the datasource ( top to down) column to column. if you don't wish to laod some column, leave it as blank column in flat file.
    2. your file should not be open when loading data
    3. make sure your transfer rules & update rules are defined properly.
    4. do the simulation in infopakage first & that will give you fair idea.
    5. to start with load data first in PSA Only, check & then take it forward.
    hope it helps
    regards
    Vikash

  • Dataload(without rule file)hangs on EAS on loading data thru exported file.

    I am trying to do a data load to a database though a file I exported earlier and the data load just hangs after taking in the text file. It hangs where it says "Press escape or cancel button to terminate the current operation." It is a very small text file that am loading data from. I have to kill the ESSSVR process for that particular application to get the EAS back to do other tasks. Am able to do all other tasks just fine. Also on our Prod environment we do not have this issue and am able to load data thru exported text files just fine. Has anyone seen this behavior before?
    Thanks,
    Ted.
    Edited by: Teddd on Mar 4, 2013 8:52 AM

    Tim, Priya
    The Prod and Dev Environments are exactly the same and no additional patches were applied on either. It is not a ASO Cube either. This happens for all the applications in Dev and This is what the application Log says(see below), I cleared the dabase before loading it.
    /App1234/App1234/user123/47563117857088/Info(1013022)
    All data of database [App1234] has been cleared by User [user123]
    [Tue Mar  5 11:59:46 2013]Local/App1234///47563289983296/Info(1013214)
    Clear Active on User [user123] Instance [1]
    [Tue Mar  5 12:04:32 2013]Local/App1234///47561752435120/Info(1013205)
    Received Command [Get Database Info]
    [Tue Mar  5 12:10:43 2013]Local/App1234///47563293141312/Info(1013210)
    User [user123] set active on database [App1234]
    [Tue Mar  5 12:10:44 2013]Local/App1234/App1234/user123/47563121015104/Info(1013161)
    Received Command [Dataload] from user [user123]
    [Tue Mar  5 12:10:44 2013]Local/App1234/App1234/user123/47563121015104/Info(1003040)
    Parallel dataload enabled: [1] block prepare threads, [1] block write threads.
    That is where the logging ends.
    Priya,
    This is what the Essbase.log says
    [Tue Mar  5 11:59:05 2013]Local/ESSBASE0///47060015159616/Info(1051001)
    Received client request: Select Application/Database (from user [user123])
    [Tue Mar  5 11:59:07 2013]Local/ESSBASE0///47060015159616/Info(1054014)
    Database App1234 loaded
    [Tue Mar  5 11:59:07 2013]Local/ESSBASE0///47060015159616/Info(1051061)
    Application App1234 loaded - connection established
    [Tue Mar  5 11:59:07 2013]Local/ESSBASE0///47060015159616/Info(1054027)
    Application [App1234] started with process id [8072]
    [Tue Mar  5 11:59:07 2013]Local/ESSBASE0///47060015159616/Info(1051009)
    Setting application App1234 active for user [user123]
    [Tue Mar  5 11:59:46 2013]Local/ESSBASE0///47060017264960/Info(1051001)
    Received client request: MaxL: Execute (from user [user123])
    [Tue Mar  5 11:59:46 2013]Local/ESSBASE0///47060017264960/Info(1051009)
    Setting application App1234 active for user [user123]
    [Tue Mar  5 12:04:32 2013]Local/ESSBASE0///47060014106944/Info(1051160)
    Received Validate Login Session request
    [Tue Mar  5 12:04:32 2013]Local/ESSBASE0///47060016212288/Info(1051001)
    Received client request: Get Database Info (from user [user123])
    [Tue Mar  5 12:04:36 2013]Local/ESSBASE0///47060018317632/Info(1051001)
    Received client request: List Objects (from user [user123])
    [Tue Mar  5 12:04:36 2013]Local/ESSBASE0///47060015159616/Info(1051001)
    Received client request: List Objects (from user [user123])
    [Tue Mar  5 12:10:43 2013]Local/ESSBASE0///47060017264960/Info(1051001)
    Received client request: MaxL: Execute (from user [user123])
    [Tue Mar  5 12:10:43 2013]Local/ESSBASE0///47060017264960/Info(1051009)
    Setting application App1234 active for user [user123]
    That is where the logging ends.
    Thanks,
    Ted.
    Edited by: Teddd on Mar 5, 2013 10:40 AM

  • How to load data from UTL file to database

    Hi All,
    I am new in this technologies.
    I am facing below problem to load data from utl file to database .
    below is the script written by me :
    CREATE OR REPLACE PROCEDURE load_data AS
    v_line VARCHAR2(2000);
    v_file UTL_FILE.FILE_TYPE;
    v_dir VARCHAR2(250);
    v_filename VARCHAR2(50);
    v_1st_Comma NUMBER;
    v_2nd_Comma NUMBER;
    v_deptno NUMBER;
    v_dname VARCHAR2(14);
    v_loc VARCHAR2(13);
    BEGIN
    v_dir := ':f/rashi/dataload';
    v_filename := 'fake.txt';
    v_file := UTL_FILE.FOPEN(v_dir, v_filename, 'r');
    LOOP
    BEGIN
    UTL_FILE.GET_LINE(v_file, v_line);
    EXCEPTION
    WHEN no_data_found THEN
    exit;
    END;
    v_1st_Comma := INSTR(v_line, ',' ,1 , 1);
    v_2nd_Comma := INSTR(v_line, ',' ,1 , 2);
    v_deptno := SUBSTR(v_line, 1, v_1st_Comma-1);
    v_dname := SUBSTR(v_line, v_1st_Comma+1, v_2nd_Comma-v_1st_Comma-1);
    v_loc := SUBSTR(v_line, v_2nd_Comma+1);
    DBMS_OUTPUT.PUT_LINE(v_deptno || ' - ' || v_dname || ' - ' || v_loc);
    INSERT INTO don
    VALUES (v_deptno, UPPER(v_dname), UPPER(v_loc));
    END LOOP;
    UTL_FILE.FCLOSE(v_file);
    COMMIT;
    END;
    show error
    I am getting the below errors:
    LINE/COL ERROR
    3/8 PL/SQL: Item ignored
    3/8 PLS-00201: identifier 'UTL_FILE' must be declared
    15/1 PL/SQL: Statement ignored
    15/1 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    20/1 PL/SQL: Statement ignored
    20/19 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    36/1 PL/SQL: Statement ignored
    LINE/COL ERROR
    36/17 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    could anyone please advice me on above error.
    thanx.

    First of all, is file located on (or is accessible from) database server? If not - you can't load it neither with UTL_FILE nor with external table. You need to use client side tool like SQL*Loader or write your own client side load. If file is accessible from database server, then, as sb92075 noted, external table (assuming you are not on some ancient Oracle version) is the way to go.
    SY.

  • Problem in loading data from flat file to info object

    Hi experts,
      I am new on bw. I am trying to load data from .csv file to info object. CSV file contains two colums Mat No, Mat Name and are separated by comma and similarly Mat Name is attribute of Mat No in info object. I am doing all steps by following the book but whenever I load data into info object it is loaded in one column. I mean both Mat no and Mat name apears in Mat No column whereas Mat Name column appears empty in info object. I have changed exel file into .csv. Any one can help me sort it out.
    regards

    Hi,
    your flatfile should be in the form of csv ie it does not mean that in a word u seperate it with coma
    create an excel file and say save as in teh file name give the name of your flatfile and in the save as type select CSV(comma delimited) from the drop down list
    and then in this file enter the data as u fill in excel sheet.
    After closing the file right click it and say open with wordpad then the data should appear seperated with a comma.
    Try this and then revert back in case of any doubts.........
    Are u loading data into BI 7.0 or 3.x
    Regards
    Madhavi

  • Loading data from flat file into 0EMPLOYEE

    Dear,
    I want to see the <b>'monthly change of numbers of employees'</b> of my company in a BW report.
    i want to do this by loading data from a dummy flat file into 0EMPLOYEE and afterwards into cube 0PAPA_C02.
    i've searched the whole 'help and service sap' websites but nowhere, i could find a usefull user guide.
    Could you explain me how this job needs to be done, are there certain steps that need to be taken?
    here are a few of my questions:
    1: what fields and data do i have to fill in my flat file?
    2: how does the time-dependency of master data of employee work?
    3: why do you only have to map 0calday and 0employee from infosource 0HR_PA_PA_1 to the corresponding fields of cube 0PAPA_C02?
    4: how is the key figure 0HDCNT_VC filled automathically?
    (the activation of cube 0PAPA_C02  and its flow is already done.)
    or maybe you know a user guide which explains the whole picture and could you send me its link?
    thanks a lot in advance,
    Julie de Meyer

    Hi,
    Employee is master data : You need to extarct data every month.Once the extraction is done , you need rto activate to see the results. Otherwise it will display old result.
    You can extract data for 0HR_PA_0 and 0HR_PA_1 cubes also. After that  you can do the reporting based on this.
    You can try some sap standard BI reports .
    Headcount is calculated based on employement percentage which is maintained in infotype 0007 (Planned Working Time). If it is 100 then it is considerd as headcount 1.
    you can check .
    http://help.sap.com/saphelp_nw2004s/helpdata/en/63/351e3c6a2fc036e10000000a114084/frameset.htm
    Regards
    Nilesh

  • Load data from flat file to target table with scheduling in loader

    Hi All,
    I have requirement as follows.
    I need to load the data to the target table on every Saturday. My source file consists of dataof several sates.For every week i have to load one particular state data to target table.
    If first week I loaded AP data, then second week on Saturday karnatak, etc.
    can u plz provide code also how can i schedule the data load with every saturday  with different state column values automatically.
    Thanks & Regards,
    Sekhar

    The best solution would be:
    get the flat file to the Database server
    define an External Table pointing to that flat file
    insert into destination table(s) as select * from external_table
    Loading only single state data each Saturday might mean troubles, but assuming there are valid reasons to do so, you could:
    create a job with a p_state parameter executing insert into destination table(s) as select * from external_table where state = p_state
    create a Scheduler chain where each member runs on next Saturday executing the same job with a different p_stateparameter
    Managing Tables
    Oracle Scheduler Concepts
    Regards
    Etbin

  • How to load Material from Flat File and convert to SAP Format

    Hi
              I am loading 0Material values from Flat File for mapping purpose. The format of Material in Flat File is "7704132". Within the system, i need to compare the value with 0Material values from the incoming data and update corresponding 0Material in records. for this purpose, I created dummy materials taking 0Material as template and trying to load data. I am getting invalid error- Version '7704132' is not valid RSDMD No194. Can anyone please let me know how to over come this issue. Should I include any routine in the data source or rules level. I am in BI 7.0.
    Thanks.

    Hi,
    Use the FM CONVERSION_EXIT_ALPHA_INPUT to convert the value into Internal format .Use this FM in the Transformations (field mapping).
    Search the forum with CONVERSION_EXIT_ALPHA_INPUT for more information on this.
    Regards,
    Anil Kumar Sharma .P

  • How to delete data from flat file ?

    Hi all,
    I deleted a record from a tables and I want to delete it from data file.
    Can I do it ?
    Pls help me !

    What do you mean by deleting it from datafile ?, Is it flat file or something else you want to ask? I believe you have records in flat files and you want to delete them as soon as you load them into oracle table.Oracle dosent offer such facility, however you can syncronise your tables and flat file contents by using merge statements and update it in a fashion, so that only records which reflects in flat files syncronises with table in oracle database .
    hare krishna
    Alok

Maybe you are looking for