How to Create Hierarchy From Flat file Structure

Hi Gurus,
There is a scenario for me regarding the Hierarchy.
Required Hierarchy structure - Region>Director>Manager-->Sales id
I have flat file which gives the info like user id , sales id , manager id, director id.
But the transaction data Flat file has structure with sales id, region id, sales amt, sales qty.
Note : Region id is another Master Data.
How i can create hierarchy from the first flat file which doesnot have region info in that but it is available in the transaction data Flat file.
Is there anyway we can create hierarchy based on the first Flat file structure which contains more that 1,00,000 records.
Try to Suggest me in this regard .
This is urgent.
Regards,
Mano

Hi Mano,
                Defining the source system from which to load data
Choose the source system tree File  ® Create.
       2.      Defining the InfoSource for which you want to load data
Optional: choose InfoSource Tree ® Root (InfoSources) ® Create Application Components.
Choose InfoSource Tree ® Your Application Component ® Other Functions  ® Create InfoSource 3.x ® Direct Update.
Choose an InfoObject from the proposal list, and specify a name and a description.
       3.      Assigning the source system to the InfoSource
Choose InfoSource Tree ® Your Application Component ® Your InfoSource ® Assign Source System. The transfer structure maintenance screen appears.
The system automatically generates DataSources for the three different data types to which you can load data.
○       Attributes
○       Texts
○       Hierarchies (if the InfoObject has access to hierarchies)
The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
       4.      Maintaining the transfer structure / transfer rules
Select the DataSource for uploading hierarchies.
IDoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject for which hierarchies are loaded. With this transfer method, the structure is converted to the structure of the PSA during loading, which affects performance.
PSA transfer method: The transfer methods and the communication structure are also generated here.
       5.      Maintaining the hierarchy
Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy
Hope this helps
Regards
Karthik
Assign points if Helpful

Similar Messages

  • How to create database from .sql file

    how to create database from .sql file..?? i put the sintax query in a sql file.. and i want to call it in java code..
    ho to do it..??

    why do you want to do this from java?
    i just don't see the point.
    find your dba and have him/her run it for you

  • Upload hierarchy from flat file to BPC

    Hello SAP Guru,
    I have download customer / material  hierarchy in flat flie from BI/BW  and now I want to upload hierarchy from flat file to BPC
    Please can any one give me step by step method to load hierarchy from Flat file to SAP - BPC.
    Thanks in advance.
    With regards,
    Anand Kumar

    Hi Saida Reddy,
    why you resurrect a 5 years old thread? Surely he solved in the meanwhile his issue, see please dr Frankenstein.
    Regards
        Roberto

  • Creating JCo IDoc from flat file structure

    Hi,
    I need to send an IDoc into SAP using JCo.
    The input to my program is a string containing lines representing a flat file idoc, e.g.
    Line 1="EDI_DC40                           2   ORDERS04.."
    Line 2="E1EDK01                                          00000100000001    USD..."
    Line 3="E1EDK14                                          0000030000000...."
    Is there a simple way to use JCo to create & send the IDoc? 
    i.e.
    1) If I use JCo and RFC IDOC_INBOUND_ASYNCHRONOUS, what would be all the steps/calls to SAP (create TID, call IDOC_INBOUND_ASYNCHRONOUS, confirm TID..?)
    And can IDOC_INBOUND_ASYNCHRONOUS be called using the flat file structures (without having to map to all the JCo ParameterList fields)?  Since the flat file structures are  in the format required by the RFC, just in one long string.
    Line 1=>IDOC_CONTROL_REC_40
    Lines 2..n=>IDOC_DATA_REC_40
    2) Similarly, if I were to use JCo plus the JCO IDoc library, is there a way to pass the flat file structures without having to do all the mapping to segment fields?
    3) Other options..?
    I want to use ALE to SAP, not files, even though the input is in the flat file structure.

    Your reply gives a link to the general JCo documentation.
    It doesn't give ideas on how to call an RFC or IDoc from JCO without mapping each and every field from a flat file structure.
    I'm looking for a way to do something like this:
    Function IDOC_INBOUND_ASYNCHRONOUS has table parameters
          IDOC_CONTROL_REC_40 STRUCTURE  EDI_DC40
          IDOC_DATA_REC_40 STRUCTURE  EDI_DD40
    Since I have the flat file representation of the IDoc, the first line should overlay exactly onto the EDI_DC40 structure.  And the subsequent lines should overlay onto EDI_DD40.  (all fields in this RFC are strings)
    However JCO and JCO IDoc library seem very strongly typed, so it looks like I would have to map each field from the flat file structure to a field in the JCO Function or JCO IDoc object. 
    This could be done in a generic way using the function/idoc metadata, however there would still be some overhead.
    Is there a way to get round this, and build the function/idoc treating its parameters as one long string?

  • Error when loading hierarchy from Flat-file

    I am trying to get the Fund Group-Fund –Fund Center Hierarchy .
    Ie :  Fund Group
                 Fund 1
                        Fund center 1
                        Fund Center 2
           Fund Group 2
    I am trying to load it from a flat –file.
    I got the Flat –file structure for the hierarchy.
    & I am trying to load it to the Funds Group  master data.
    I am stuck at IPak.
    In the Processing Tab,
    Only the option “ Only PSA” is enabled.
    My Doubt  is :
    Why are the other options disabled: could it be because I might have  missed something in my previous  steps ???
    Or
    if I load till PSA , I don’t know how to load it to the Master data from there –-as when I schedule it : I can see it in PSA but then it stays in Yellow & then turns to Red.

    Hi,
    Go to monitor(RSMO)then verify on detail tab for PSA Load. Hope this help you,
    Thanks
    DST

  • 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

  • I have to load hierarchy from flat file

    Hi Guys,
                 I build a balance sheet Report,which is showing the report based on financial statement item(0glaccext)hierarchy.
    But previously client is maintaining some third party system,so client wants to load all the GL accounts in to BW.
    When i load the GL accounts in to BW using flat file,in report it is not showing based on hierarchy for the flat file GL accounts.
    So i need to load the hierarchy also for those GL accounts,how to load the GL accounts using flat file to maintain the hierarchy based on Assets,liabilities etc...

    Abdul,
    You might want to take a look here:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    or else see this weblog:
    /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
    assign points if useful
    kalyan

  • Loading Hierarchy  from flat file giving dump

    Hi gurus,
    i am trying to load data from flat file to hierarchy, when i am trying to schedule the infopackage its giving message PLEASE SELECT THE VALID INFOOBJECT and if i proceed even its giving a dump :-ASSIGN LENGTH 0.
    i tired using i-doc method...then i am getting records in to BW in red and the same error
         InfoObject INFOOBJECT is not available.
    i followed the blog
    /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
    > points will be assigned for inputs.
    Message was edited by:
            ravi a

    hi guys,
    my heirarchy is different from the one in the blog. should i mark all the infoobjects in all nodes as hierarchy relavant or only the bottom one? i also brought the 0hier_node from the business content. i dont know what other valid infoobject is missing ......plz help........
    the following are more details about the dump
    Program error: ASSIGN with length 0 in program "SAPLRRSV".
    Error analysis
    An ASSIGN statement in the program "SAPLRRSV" contained a field symbol with
    length 0. This is not possible.
    length 0.
    This is not possible

  • 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

  • Create IDoc from flat file - How to do the message mapping

    Hi everybody,
    I want to create an IDoc from a flat file.
    The file structure looks like this:
    MT_XYZ
    - Node001       0...1
      - Leaf001
    - Node002       0...unbounded
       - Node003    0...1
          - Leaf002
          - Leaf003
       - Node004    0...1
          - Leaf004
       - Node005    0...1
          - Leaf005
    I have created a mapping and all the other stuff to set up the IDoc adapter.
    Now when I try to test the interface the IDoc is created properly but obviously no information from the nodes "Node003" to "Node005" is inserted in the IDoc. Only the information kept in the elements (leafs) of "Node001" are inserted.
    All IDoc segments and their "Segment" elements are linked to the root node of the file structure "MT_XYZ". I tried to link some IDoc segments only to "Node002" but then this segment is not created.
    So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?
    Thanks in advance for all answers!
    Regards,
    Torben
    Edited by: Torben Hönemann on Dec 14, 2009 4:26 AM

    Hi Torben,
    >>I want to create an IDoc from a flat file.
    So you are using File content Conversion on the sender side. Right?
    >>no information from the nodes "Node003" to "Node005" is inserted in the IDoc.
    Are these information available in the source XML (you can check in transaction SXMB_MONI-> Input Payload).. There is a limitation in File Content Conversion of File adapter and it is that I can make an XML structure of 3 level.. Since these nodes details are in level 4 and 5 they should be missing in Source XML structure itself (after content conversion of File adapter). check that
    >>So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?
    So you need to take an alternate approach where you do File Content Conversion and make 3 level structure.. then using a mapping convert this three level structure to your 5 level one and then try to map with the idoc.
    Check this blog for an idea
    http://www.riyaz.net/blog/xipi-file-content-conversion-for-complex-structures/
    http://www.riyaz.net/blog/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphical-mapping/
    Regards
    Suraj

  • How to create Fixed Length Flat File from Open Hub in BI 7.0

    My requirement is to produce a Fixed length Flat file by Open Hub destination. My Open Hub has four fields. Now the requirement is to create another extra field in Open Hub which will contain all of the four fields value. In addition to that the fields should be fixed length that means if for any field no value is there and the field length/type is CHAR4 then 4 spaces should be there as the field value. SO, basically the Open Hub output will be single field which will contain information of four fields.
    How to get this using End Routine of Transformation (from DSO to Open Hub) ?

    Hi,
    You can map the four input fields to the new field in the Open Hub, and change rule type to "Routine".
    For example, if your source fields are called "first", "second", "third" and "forth", the ABAP routine could be similar to:
    DATA: l_t_1  TYPE C LENGTH 4,
          l_t_2  TYPE C LENGTH 4,
          l_t_3  TYPE C LENGTH 4,
          l_t_4  TYPE C LENGTH 4.
    IF source_fields-first IS INITIAL.
      l_t_1 = '    '.
    else.
      MOVE source_fields-first TO l_t_1.
    endif.
    IF source_fields-second IS INITIAL.
      l_t_2 = '    '.
    else.
      MOVE source_fields-second TO l_t_2.
    endif.
    IF source_fields-third IS INITIAL.
      l_t_3 = '    '.
    else.
      MOVE source_fields-third TO l_t_3.
    endif.
    IF source_fields-forth IS INITIAL.
      l_t_4 = '    '.
    else.
      MOVE source_fields-forth TO l_t_4.
    endif.
    CONCATENATE l_t_1 l_t_2 l_t_3 l_t_4 into result.
    In the example, the program uses four blank spaces if any of the fields has no value. 
    Additionally, if non-initial values in input fields could be shorter than 4 characters (if the input fields have no fixed length), you could use STRLEN to evaluate if it is necessary to add blank spaces to complete the fixed length of 4.
    I hope this helps you.
    Regards,
    Maximiliano

  • How to remove CR from flat file in Windows

    One of the columns in my table is varchar2(2000) and contains multi-line data.
    New lines are identified by the linefeed terminator (chr(10)) in the table.
    I am writing all records from this table to a flat file. My machine is running Win XP.
    I am using UTL_FILE.PUT procedure to write to the file.
    Problem is, for multi-line data each line gets appended with a <CR> in addition to the linefeed.
    So each line in the file ends with <CR><LF> as opposed to only <LF> in the table.
    So my question is, how do I get rid of this extra <CR> or chr(13) in the file ?
    Is there anything I can set in the UTL_FILE package or alternatively is there any
    DOS utility which can strip the file of the chr(13) ?
    I understand this is Oracle default behaviour while writing to file on Win platform, i.e.
    using a <CR><LF> as a line terminator. How can I change this behaviour.
    Please help, very urgent !!
    Regards,
    Azhar.

    Hi Kishore,
    Thanx for the response.
    What am trying to do is dump the table in a flat file.
    Then create an External table (exactly same as original table) pointing to the flat file.
    Due to occurence of the extra <CR> column length increases. For eg. multi-line column data of varchar2(2000) in original table having say 43 lines becomes 2042 characters now. As a result I will have to make external table with column length varchar2(2042) to read the column !! that's the problem.
    I want external table definition to be exactly the same as original table.
    This is part of a generic utility which am developing.
    The only option I have right now is to use unix2dos utility and strip the <CR> characters, but I am looking for something which can eliminate <CR> at file creation itself.

  • Hierarchy from flat file loading with errors - duplicate node names

    Hello experts,
    I am loading a product hierarchy from a flat file into a custom hierarchy
    object.  The issue is that it errors out saying I am loading
    duplicates within nodes, however all node IDs within a level are unique.
    It seems to be looking at the node name to determine uniqueness and I know
    we have some duplication within the text there especially when you factor
    in the 32 character limitation for the node name.  Does anyone have an idea
    as to whether it is possible to have it only consider the node ID instead
    of the node name to determine uniqueness?
    A colleague suggested using the link ID to fix this problem but I don't know how that field works or how to populate it.
    I'm working in a BI 7.0 environment (I don't know if that makes a difference since you still have to use the 3.x objects to extract the hierarchy).
    Any help would be appreciated.
    Nancy

    Hi Nancy,
    You may wish to check this OSS Note 1026749 - Hierarchies: Consistency check for duplicate nodes and 912115 (old one)
    Symptom -
    When you load or activate a hierarchy it terminates with error message RH 109 or RH 211. The hierarchy contains duplicate nodes and this is not allowed. The long texts of messages RH 109 or RH 211 do not describe the reason for the problem sufficiently or they are partially incorrect.
    There is uncertainty about in which cases duplicate nodes exist in a hierarchy and in which cases duplicate nodes are allowed.
    Hope this helps,
    Bye...
    Naga Timmaraju

  • How to create security for flat files under a Webserver Directory?

    Hello,
    I have an Application where I need to show a Flat Excel File (with open/save option) from a URL from Portal.
    This works fine.
    But a user can view this file without login to Portal.
    Though we restricted the directory, file access is uncontrolled.
    What should we do?
    Thanks
    Madhav

    I mean, how to enforce Login to Portal on flat files in the Web Server Directory(if the users are accessing directly from URL), they should be accessible as long as they logged into Oracle Portal. But right now, they can access by typing the URL for this flat file directly into browser.
    Thanks for your time
    Madhav

  • How to create Exe From Data files

    my requirement is very much similar to registration of file extension.
    lets say if you have a file with extension .xyz then you can decide which program should invoke .xyz but instead of any other extension i need that extension of my file should be .exe
    and when user double clicks on this exe files the file should get opened with my own program, but if the file is true .exe (i.e. Created by some other program) then it should not get invoked by my program...
    i dont know how to do this but i know this is possible
    e.g. Flash can create an exe files from their .swf files which when opened run using flash player (but it doesnt get fooled by any .exe file. also flash exe files have different icons)
    similarly winzip can create self extracting exe files from .zip files
    can anybody help me out
    the files i am trying to create will have numeric data in spreadsheet format and when launched the player will show the data in animated format.
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

    i think i will briefly describe the things; what exactly i want to acheive
    my client will have one application which will acquire data and log them into files. but he want to distibute these files to other people who will not have the application developed by me.
    he wants that file should show the reports in specific way. but to see those reports end user should not be required to install any specific application.
    i know that this thing is possible. as per msdn developer can include any data (text, graphics, audio, video etc.) inside exe in the form of resource file. (and there are programs are avaiable on internet which allow to extract, edit, add resource files inside exe)
    what i dont know right now is how i can access the resource file inside exe
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

Maybe you are looking for