Steps to load the data by using flat file for hierarchies in BI 7.0

Hi Gurus,
steps to load the data by using flat file for hierarchies in BI 7.0

hi ,
u will get the steps int he following blog by Prakash Bagali
Hierarchy Upload from Flat files
regards,
Rathy

Similar Messages

  • Uploading the data from a flat file into ztable

    Hi,
    I have a requirement where I have to upload the data from 2 flat files into 2 z tables(ZRB_HDR,ZRB_ITM).From the 1st flat file only data for few fields have to be uploaded into ztable(ZRB_HRD) .Fromthe 2nd flat file data for all the fields have to me uploaded into ztable(ZRB_ITM). How can I do this?
    Regards,
    Hema

    hi,
    declare two internal table with structur of your tables.
    your flat files should be .txt files.
    now make use of GUI_UPLOAD function module to upload your flatfile into internal tables.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = 'c:\file1.txt'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab1
        EXCEPTIONS
          OTHERS              = 1.
    use this function twice for two tables.
    then loop them individually and make use of insert command.

  • Problem in the BDC program to upload the data from a flat file.

    Hi,
    I am required to write a BDC program to upload the data from a flat file. The conditions are as mentioned below:-
    1) Selection Screen will be prompted to user and user needs to provide:- File Path on presentation server (with F4 help for this obligatory parameter) and File Separator e.g. @,#,$,%,... etc(fields in the file will be separated by using this special character) or fields may be separated by tab(tab delimited).
    2) Finally after the data is uploaded, following messages need to be displayed:-
    a) Total Number of records successfully uploaded.
    b) Session Name
    c) Number of Sessions created.
    Problem is when each record is fetched from flat file, the record needs to be split into individual fields separated by delimiter or in case tab separated, then proceeding in usual manner.
    It would be great if you provide me either the logic, pseudocode, or sample code for this BDC program.
    Thanks,

    Here is an example program,  if you require the delimitor to be a TAB, then enter TAB on the selection screen, if you require the delimitor to be a comma, slash, pipe, whatever, then simply enter that value.  This example is simply the uploading of the file, not the BDC, I assume that you know what to do once you have the data into the internal table.
    REPORT zrich_0001.
    TYPES: BEGIN OF ttab,
            rec TYPE string,
           END OF ttab.
    TYPES: BEGIN OF tdat,
           fld1(10) TYPE c,
           fld2(10) TYPE c,
           fld3(10) TYPE c,
           fld4(10) TYPE c,
           END OF tdat.
    DATA: itab TYPE TABLE OF ttab.
    data: xtab like line of itab.
    DATA: idat TYPE TABLE OF tdat.
    data: xdat like line of idat.
    DATA: file_str TYPE string.
    DATA: delimitor TYPE string.
    PARAMETERS: p_file TYPE localfile.
    PARAMETERS: p_del(5) TYPE c.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      DATA: ifiletab TYPE filetable.
      DATA: xfiletab LIKE LINE OF ifiletab.
      DATA: rc TYPE i.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        CHANGING
          file_table = ifiletab
          rc         = rc.
      READ TABLE ifiletab INTO xfiletab INDEX 1.
      IF sy-subrc = 0.
        p_file = xfiletab-filename.
      ENDIF.
    START-OF-SELECTION.
      TRANSLATE p_del TO UPPER CASE.
      CASE p_del.
        WHEN 'TAB'.
          delimitor = cl_abap_char_utilities=>horizontal_tab.
        WHEN others.
          delimitor = p_del.
      ENDCASE.
      file_str = p_file.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename = file_str
        CHANGING
          data_tab = itab.
      LOOP AT itab into xtab.
        CLEAR xdat.
        SPLIT xtab-rec AT delimitor INTO xdat-fld1
                                         xdat-fld2
                                         xdat-fld3
                                         xdat-fld4.
        APPEND xdat to idat.
      ENDLOOP.
      LOOP AT idat into xdat.
        WRITE:/ xdat-fld1, xdat-fld2, xdat-fld3, xdat-fld4.
      ENDLOOP.
    Regards,
    Rich Heilman

  • Updating Table using the data from a flat file

    Hi,
    I have a table called emp;
    Name,
    empno,
    accountno,
    amount.
    This table is filled with values of name and empno.
    The columns accountno and amount are empty.
    I have a flat file created in some folder.
    Contents of the flat file can be like this:
    mani | 23 | 123 | 1000
    spr | 22 | 342 | 2133
    asjf | 54 | 432 | 2345
    I need to access the file in the specified location, read all the records one after the other in the flat file and update the table "emp" with the values in the flat file.
    Row after row all the records in the file should be updated to the table.
    I found out some way to do this - its sqlloader - But it loads the data from a file to the table - i dont need that - i need to update the table.
    Let me know how this can be solved ?????????
    Thanks in advance.......

    Just to clarify Andrew's point, you can use external tables as the source table for an UPDATE statement. You cannot use them as a target for an UPDATE statement (i.e. you can't update the text file from an Oracle table).
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Loading the data from a text file to a table using pl/sql

    Hi Experts,
    I want to load the data from a text (sample1.txt) file to a table using pl/sql
    I have used the below pl/sql code
    declare
    f utl_file.file_type;
    s varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    loop
    utl_file.get_line(f,s);
    insert into sampletable (a,b,c) values (s,s,s);
    c := c + 1;
    end loop;
    exception
    when NO_DATA_FOUND then
    utl_file.fclose(f);
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;
    and my sample1.txt file looks like
    1
    2
    3
    The data is getting inserted, with below manner
    select * from sampletable;
    A     B     C
    1     1     1
    2     2     2
    3     3     3
    I want the data to get inserted as
    A     B     C
    1     2     3
    The text file that I have is having three lines, and each line's first value should go to each column
    Please help...
    Thanks

    declare
    f utl_file.file_type;
    s1 varchar2(200);
    s2 varchar2(200);
    s3 varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    utl_file.get_line(f,s1);
    utl_file.get_line(f,s2);
    utl_file.get_line(f,s3);
    insert into sampletable (a,b,c) values (s1,s2,s3);
    c := c + 1;
    utl_file.fclose(f);
    exception
    when NO_DATA_FOUND then
    if utl_file.is_open(f) then utl_file.fclose(f); ens if;
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;SY.

  • Loading CLOB data to a flat file in owb 11.2.0.3

    Hi,
    Also,I have one more question.I want to load a table with clob data into a flat file using my owb client 11.2.0.3.But when I run this simple mapping ,I am getting this error:
    ORA-06502:pl/sql:NUMERIC OR VALUE ERROR:CHARACTER STRING BUFFER TOO SMALL.
    Please suggest what needs to be done.

    I was up all night as I had a dead line doing this....
    Turned out my Mapping was corrupted.
    If you do a series of synchronizations by object name, position, id the mapping would end up corrupted.
    I had to delete my staging table operator within the mapping, drag and drop and reconnect and now my loads work just fine..
    Thanks

  • Loading Master Data from a Flat File

    Hi Guru, I have flat files of different SAP tables (Transactional data tables and Master Data ), I want to upload this flat files to a DSO, my question is in the case of Master Data Files example SAP table USR03 ( User Address Data) in a Flat file format which is better to create a Master data text and attributes Datasource or create it as a transactional data Datasource to upload it to a DSO.

    Hi
    Master data datasource should be used to load master data like customer details. customer data is the master data which does not change frequently. customer infoobject may have some attributes like customer name, customer contact number, customer address, etc. we have to maintain these attributes and text data.
    Transaction data is something which keeps changing very frequently like price of the material, sales, etc. for loading such data we go for transaction datasources.
    As mentioned above too,the changes in the address are very rare, therefore youshould not use transactional datasource.
    Regards, Rahul
    Edited by: Rahul Pant on Feb 7, 2011 12:24 PM

  • Rejecting the Data to a flat file

    Hi,
    I want to reject the bad data to a flat file. For example, for primary key violation, the bad data should be loaded to a flat file, instead of giving the error and stopping my mapping job (after the error limit of 50).
    Can I do this? Please do help me.
    Thanks,
    Harsha

    Hi,
    what is your actual requirement?
    If you do not want the mapping to fail after raising the 50 errors, then configure your mapping and increase the value for Maximum number of errors tab under runtime parameters.
    If you actually want to capture all the PK violations into a flat file, there is no direct way of doing this.
    Either you have to query RT repository views (write your own sql) to produce a file OR
    While in Mapping Configure window
    expand Sources and Targets
    expand constraint management
    set Enable constraints to FALSE
    set Exceptions Table Name <your own exceptions table>.
    Have a look in Oracle Documentation for constraint management. That should give you an idea how to create your own exceptions table etc.
    HTH
    mahesh

  • Load the External text and css file for more frames

    hello..
           I created one Movie file. In that I load the External text and css file in first frame and display the first variable value in one text box.
    And then in 2nd frame I use another one text field and display the 2nd variable value like that I want to load the more variable in more textboxes with different frames.
         I loaded  for first variable value in first frame. But I don't know how to do next frames like that..
         Help me...

    You need to load them in the frames they are in.  You can store the loaded data in variables in frame 1, but you will need to extend that layer so that whatever is stored is avaliable in other frames.  The code to load the data into the other textfields can then be done in the frames where it is needed.
    There are other options, such as not using other frames for content or having all of them in frame 1 and making them invisible until you get to the other frames where they get turned visible.

  • Refreshing the data in a flat file

    Hi
    I am working on data integration.
    I need to fetch data from Oracle data base and then write it to a flat file.
    It is working fine now,but for the next fetch I don't need the old data to remain there in the file.The data should get refreshed and only the newly fetched data should be present.
    After the data is written to the flat file can i rename the file?
    I need the format of the file to be 'File_yyyyMMDDHHmmss.txt'.
    My final question is how should I FTP this to the target?
    Please help me on this as soon as possible since this is needed in an urgent part of the delivery.

    All you ask is achievable:
    1) The IKM SQL to file has a TRUNCATE option, which will if set to YES, will start from a clean file.
    2) You could rename the file after writing it, but why not just write it with that name? If you set the resource name to be a variable, (e.g. #MyProj.MyFilename), and be sure to set the variable in the package before executing your interface, you should be able to get the file you want. Otherwise, you can use the OdiFileMove tool in your package to rename the file.
    To set the name of the variable you can use a query on the database (if you are using Oracle, something like SELECT 'File_'||TOCHAR(SYSDATE) from DUAL.)
    3) ODI has ftp classes built in- you can find the doc under doc\webhelp\en\ref_jython\jyt_ex_ftp.htm
    Hope this helps
    Message was edited by:
    CTS

  • Extracting the date from a flat file name in OWB

    Hi,
    I have a particular scenario, where I need to retrieve the date value from the name of the flat file and load it into a table, as a field in the target table. Is it possible to do this directly in owb. Your help would be appreciated.
    regards,
    varsha

    -- Product : Oracle Warehouse Builder
    -- Generator Version : 10.1.2.3.63
    -- Created Date : Mon May 15 20:07:54 IST 2006
    -- Modified Date : Mon May 15 20:07:54 IST 2006
    -- Created By : owbbeta4
    -- Modified By : owbbeta4
    -- Generated Object Type : EXTERNAL TABLE
    -- Generated Object Name : CUSTEXTERNALTABLE
    -- Comments :
    -- Copyright © 2000, 2006, Oracle. All rights reserved.
    WHENEVER SQLERROR EXIT FAILURE;
    CREATE TABLE "CUSTEXTERNALTABLE"
    "C1" VARCHAR2(255),
    "C2" VARCHAR2(255),
    "C3" DATE,
    "C4" VARCHAR2(255),
    "C5" VARCHAR2(255),
    "C6" INTEGER
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY NCDEX_STG_LOCATION_TO_HOURLY
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    CHARACTERSET WE8MSWIN1252
    STRING SIZES ARE IN BYTES
    NOBADFILE
    NODISCARDFILE
    NOLOGFILE
    FIELDS
    TERMINATED BY ','
    NOTRIM
    "C1" ,
    "C2" ,
    "C3" CHAR DATE_FORMAT DATE MASK "DD/MM/YYYY",
    "C4" ,
    "C5" ,
    "C6"
    LOCATION (
    'bp20042005.csv'
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    ;

  • Error occurred in the data uploading from Flat File in BPC NW

    Hi,
    I am doing Migration project from BPC MS to NW.
    In this i am loading data from flat file to BPC NW. One error occured in this process that is Record Duplication.
    Total 17000 records in that  7000 recards rejected by the reason of duplication.
    The Information about Package Log
    /CPMB/MODIFY completed in 0 seconds
    /CPMB/CONVERT completed in 2 seconds
    /CPMB/LOAD completed in 7 seconds
    /CPMB/CLEAR completed in 0 seconds
    [Selection]
    FILE= DATAMANAGER\DATAFILES\Aprilmayjun_2011_Budget_V1.CSV
    TRANSFORMATION= DATAMANAGER\TRANSFORMATIONFILES\ZAPRMAYJUN_2011BUDGET.xls
    CLEARDATA= No
    RUNLOGIC= Yes
    CHECKLCK= No
    [Messages]
    Task name CONVERT:
    No 1 Round:
    Record count: 17064
    Accept count: 17064
    Reject count: 0
    Skip count: 0
    Task name LOAD:
    Reject count: 7230
    Submit count: 9834
    Application: CorpBudget Package status: WARNING
    Could you help me in this at the earliest.
    Thanks and Regards
    Krishna

    Hi,
    You cannot send the duplicated with the standard import package. You need to create or add a new package and link to /CPMB/APPEND process chain and do the import. This would consider the duplicate entries also. It looks like you need somehow load all the records including the duplicate ones.
    So on excel go to Manage Data -> Maintain Data management -> organize package list and add a new package and link to the standard BPC process chain /CPMB/APPEND.
    Thanks,
    Sreeni

  • Transfer the data to a flat file

    hi
    i need to transfer the table in EBAN table in a user exit to a local text file. I am trying to use gui_download method  of the class CL_GUI_FRONTEND_SERVICES. I am stuck at using the data_tab table. how do i define this. my data from the table eban has different formats. so how do i do this
    thanks

    Hi,
    do this,
    data DATA_TAB Type     STANDARD TABLE of EBAN.
    hope this solves the problem.
    regards,
    Advait

  • Step by Step details on how to load data from a flat file

    hi can anyone explain how to load data from a flat file. Pls giv me step by step details. thnx

    hi sonam.
    it is very easy to load data from flat file. whn compared with other extrations methods...
    here r the step to load transation data from a flat file.......
    step:1 create a Flat File.
    step:2 log on to sap bw (t.code : rsa1 or rsa13).
    and observe the flat file source system icon. i.e pc icon.
    step:3 create required info objects.
    3.1: create infoarea
         (infoObjects Under Modeling > infoObjects (root node)-> context menu -
    > create infoarea).
    3.2:  create char /keyfig infoObject Catalog.(select infoArea ---.context menu --->create infoObject catalog).
    3.3:   create char.. infoObj and keyFig infoObjects accourding to ur requirement and activate them.
    step:4 create infoSource for transaction data and create transfer structure and maintain communication structure...
        4.1: first create a application component.(select InfoSources Under modeling-->infosources<root node>>context menu-->create  applic...component)
       4.2: create infoSource  for transation data(select appl..comp--.context menu-->create infosource)
    >select O flexible update and give info source name..
    >continue..
    4.4: *IMp* ASSIGN DATASOURCE..
      (EXPAND APPLIC ..COMP..>EXPAND YOUR INFOSOURCE>CONTEXT MENU>ASSIGN DATASOURCE.)
    >* DATASOURCE *
    >O SOURCE SYSTEM: <BROWSE AND CHOOSE YOUR FLAT FILE SOURCE SYSTEM>.(EX:PC ICON).
    >CONTINUE.
    4.5: DEFINE DATASOURCE/TRANSFER STRUCTURE  FOR IN FOSOURCE..
    > SELECT TRANSFER STRUCTURE TAB.
    >FILL THE INFOOBJECT FILLED WITH THE NECESSARY  INFOOBJ IN THE ORDER OR SEQUENCE OF FLAT FILE STRUCTURE.
    4.6: ASSIGN TRANSFER RULES.
    ---> NOW SELECT TRANSFER RULES TAB. AND SELECT PROPOSE TRANSFER RULES SPINDLE LIKE ICON.
    (IF DATA TARGET IS ODS -
    INCLUDE 0RECORDMODE IN COMMUNICATION STRUCTURE.)
    --->ACTIVATE...
    STEP:5  CREATE DATATARGET.(INFOCUBE/ODS OBJECT).
    5.1: CREATE INFO CUBE.
    -->SELECT YOUR INFOAREA>CONTEXT MENU>CREATE INFOCUBE.
    5.2: CREATE INFOCUBE STRUCTURE.
    ---> FILL THE STRUCTURE PANE WILL REQUIRE INFOOBJECTS...(SELECT INFOSOURCE ICON>FIND UR INFOSOURCE >DOUBLE CLICK > SELECT "YES" FOR INFOOBJECT ASSIGNMENT ).
    >MAINTAIN ATLEAST  ON TIME CHAR.......(EX; 0CALDAY).
    5.3:DEFINE AND ASSIGN DIMENSIONS FOR YOUR CHARACTERISTICS..
    >ACTIVATE..
    STEP:6 CREATE UPDATE RULES FOR INFOCUDE USING INFOSOURCE .
    >SELECT UR INFOCUBE >CONTEXT MENU> CREATE UPDATE RULES.
    > DATASOURCE
    > O INFOSOURCE : _________(U R INFOSOURCE). AND PRESS ENTER KEY.......
    >ACTIVATE.....UR UPDATE RULES....
    >>>>SEE THE DATA FLOW <<<<<<<<----
    STEP:7  SCHEDULE / LOAD DATA..
    7.1 CREATE INFOPACKAGE.
    --->SELECT INFOSOURCE UNDER MODELING> EXPAND UR APPLIC.. COMP..> EXPAND UR INFOSOURCE..> SELECT UR DATASOURCE ASSIGN MENT ICON....>CONTEXT MENU> CREAE INFOPACKAGE..
    >GIVE INFOPACKAGE DISCREPTION............_________
    >SELECT YOUR DATA SOURCE.-------> AND PRESS CONTINUE .....
    >SELECT EXTERNAL DATA TAB...
    > SELECT *CLIENT WORKSTATION oR APPLI SERVER  >GIVE FILE NAME > FILE TYPE> DATA SAPARATER>
    >SELECT PROCESSING TAB
    > PSA AND THEN INTO DATATARGETS....
    >DATATARGET TAB.
    >O SELECT DATA TARGETS
    [ ] UPDATE DATATARGET CHECK BOX.....
    --->UPDATE TAB.
    O FULL UPDATE...
    >SCHEDULE TAB..
    >SELECT O START DATA LOAD IMMEDIATELY...
    AND SELECT  "START" BUTTON........
    >>>>>>>>>>
    STEP:8 MONITOR DATA
    > CHECK DATA IN PSA
    CHECK DATA IN DATA TARGETS.....
    >>>>>>>>>>> <<<<<<<<<----
    I HOPE THIS LL HELP YOU.....

  • Cannot load the data to infocube

    Hi,
    I am new to SAP BI.
    I am loading the data from my flat file to infocube. Flat file contains product, qty, amount and units of Qty is EA and Amount is INR and the units or fixed.  i need to have a Revenue field in the infocube and to populate that revenue field i am doing qty*amount in transformations using formula in transformations. My Revenue field unit is fixed currency INR. While loading data to infocube i can see error in DTP Monitor data cannot be loaded to cube. In DTP Monitor until Transformations it is showing in green and while loading to cube it is showing red color and making the whole request as red. But wthout this revenue field i can load the data to infocube correctly.
    Can any one please suggest me the things what i was doing wrong.

    Hi,
    Can you please check the error details by checking of the details for the failed step?
    This can help you to understand the exact casue of error.
    Regards,
    Geetanjali

Maybe you are looking for

  • My Drop Down Menus Do Not Work Properly in IE

    Hey. I'm really stuck and have been for over a week. Let me preface this by telling you I didn't build our website and have little knowledge of spry and spry assets. I can't the get the gentleman that built our site to help and I'm desperate! The sit

  • How can I re-print my return label?

    Hello, I recently got a replacement phone through Verizon wireless's warranty service, and, in my excitement (and idiocy, it seems), threw out the box it came in. When I received the text from Verizon informing me that, if the old phone wasn't shippe

  • Journal entry series based on base document series

    We defined series starting with 141 and 142 for two locations for almost all document types. When I post a document (A/P invoice or outgoing payment or any other), the journal entry is getting posted with default series (141) instead of being based o

  • How do you make a split-screen effect in Premiere Pro?

    Is Adobe Premiere Pro the easiest way to put together footage of someone presenting to a group and somehow splitting the viewscreen to show both the presenter as recorded and their powerpoint slides in the other side of screen in synch with the video

  • PA30: Creation of personnel numbers increment by 3

    Hi All, I am doing an initial loading of personnel data in PA30 via LSMW. The recording is fine for it is generating personnel numbers. The recording I have done will load data in infotypes 0000, 0002 and 0001. The problem I am encountering is the ge