Mapping Query: Flat Structure to Hierarchical Structure.

I have a scenario which uses the sender file adapter. Therefore my source message has a flat structure. The requirement is that the target message will have a hierarchical structure as shown below.
Source Message Type
MT_Acc_Out    1..1
…fileHeader   1..1
…docHeader    1..unbounded
…docItem      1..unbounded
…fileTrailer  1..1
Target Message Type
MT_Acc_In     1..1
…batchHeader  1..1
…docHeader    1..unbounded
……docItem     1..unbounded
…fileTrailer  1..1
The source structures docHeader and docItem both contain a field called seqNo which is used to link the items to the header.
The requirement is that in the target message the docItems are children of the corresponding docHeader.
I am having difficulty mapping the target docItem node. Does this require a user defined function or can it be achieved using standard functions?
Any assistance would be appreciated.

You can use standard or user-defined functions, see this link:
http://help.sap.com/saphelp_nw04/helpdata/en/59/f6ae42e0fac911e10000000a1550b0/frameset.htm
see the part of flat structure_2_nested tables part.

Similar Messages

  • Message Mapping from flat XML to a Record structure

    Hi All,
    We have a scenario in which the input message is a PDF document. we are following below the blog to convert PDF to XML format which uses <b>PDF box utitlity</b>.
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    We are able to convert the PDF doc to a flat XML file.
    Now we have the following queries...
    what are the different ways to map the flat XML to our record structure?
    Do we have any utitlity in PDF box to do that?
    Regards,
    Rakesh.

    Hi Rakesh,
    You have Graphical mapping, Java mapping, ABAP mapping and XSLT mapping. The choice depends on the scenario and what target result you require.
    <b>Message mapping using graphical mapping editor:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    <b>XSLT mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    <b>Java Mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    <b>ABAP mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    As said earlier, graphical mapping is the simplest and quite a few built in options are available with it, explore it and see which is suitable for your scenario.
    Regards,
    Chandra

  • Build a hierarchical structure from a ordered table

    Hi guys,
    say I have a table A with 3 columns, each column represents a level in a hierarchical structure. Is it possible to make a recursive query (connect by) to retrieve the info in a hierarchically way?
    TABLE A.
    COL1 COL2 COL3
    1 2 3
    1 2 4
    1 2 5
    The tree I want should be something like:
    1
    2
    3
    4
    5
    Thanks for your help!.

    Not really, there was a display problem. What happen is that I want to display a tree in Forms based on the info I have in my table, so the tree(implemented with FTREE) has to look like this:
    +1
    --+2
    ----3
    ----4
    ----5
    As you can see, if the table would be with only 2 columns with an pig ear relationship this would be very easy, however my hierarchy of my table is based on the position of the columns:
    COL1 father of COL2
    COL2 father of COL3
    and so on...
    My problem is that I don4t know how the query I have to fill in the Data Query property of my tree has to be.
    I tried on Forms forum but didn't get any answer, so I hope you sql guys may give a clue, as I know you're very smart in this area.
    Thanks for your sooner input.!

  • How to create a crosstab based on BW Query which has key figure structure

    Hi,
    We are on CR 2008 SP1.
    We have an existing BW query with custom Characteristics structure in the "Columns" section and a custom Key Fugure structure in the "Rows" section in the BW query designer.
    Cell editor has been used to define formulas of the cells.
    We wish to build a crystal report on top of the query.
    On the crystal report on top of the query we get the characteristics structure and individual key figure elements. As already discussed in multiple fourm posts, this is the expected behaviour.
    We are using a cross tab and in the column section, I have put the "Characteristic" structure  in the  "columns" section in the crosstab using the crosstab expert. This leads to horizonatal column headings as per expectation.
    Within the characteristics structure we have multiple fields which description "%" with diffeent formula's defined on the BW query designer. On the Cyrtsl Report, when we get the columns in the crosstab, we get only a single "%" field. All other "%" fields are not visible.
    A. Is there a way to get all fields in in case of same description?
    I tried putting in the Key Figure elements in the "Rows" section, but was not able to get desired output.
    Experts: Can you advice how this report can be built?
    Any help will be appretiated.
    Rgds

    I am interested... How did you solve it?

  • Need suggestion on Develop the Hierarchical Structure OAF page--priority

    Hi experts,
    i need to develop the hierarchical structure of OAF page, for this devlopment i need suggestions from you side.
    please find below diagram how to develop the OAF page.
    CEO
    |
    vice president vice president
    | |
    managers managers managers managers
    | | | |
    developer develoer developer developer developer
    Like that i need to develop the OAF page please give me some inputs. Is it feasible in OAF.

    CEO
    |
    vicepresident vicepresident
    |
    manager manager manager manager manager
    | | | | |
    develper developer developer developer

  • How to read a file with data in Hierarchical Structure using XSD Schema

    Hi
    We have requirement in which we have to read a FIXED LENGTH file with FILE ADAPTER. File contains the data in hierarchical structure. Hierarchy in the file is identified by the first 3 characters of every line which could be any of these : 000,001,002,003 and 004. Rest files are followed after these. So structure is like:
    000 -- Header of File. Will come only once in file. Length of this line is 43 characters
    -- 001 -- Sub Header. Child for 000. Can repeat in file. Length of this line is 51 characters
    --- 002 -- Detail record. Child for 001. Can repeat multiple times in given 001. Length of this line is 43 characters 1353
    -- 003 -- Sub Footer record at same level of 001. Will always come once with 001 record. Child for 000. Length of this line is 48 characters
    004 -- Footer of file.At same level of 000. Will come only once in file. Length of this line is 48 characters
    Requirement is to create an XSD which should validate this Hierarchical Structure also i.e data should come in this hierarchy only else raise an error while parsing the file.
    Now while configuring the FILE ADAPTER to read this file we are using Native Schema UI to create the XSD to parse this structure using an example data file. But we are not able to create a valid XSD for this file which should validate the Hierarchy also on the file.
    Pls provide any pointers or solution for this.
    Link to download the file, file structure details and XSD that we have created:
    https://docs.google.com/file/d/0B9mCtbxc3m-oUmZuSWRlUTBIcUE/edit?usp=sharing
    Thanks
    Amit Rattan
    Edited by: user11207269 on May 28, 2013 10:16 PM
    Edited by: user11207269 on May 28, 2013 10:31 PM
    Edited by: user11207269 on May 28, 2013 10:33 PM

    Heloo.. Can anyone help me on this. I need to do Hierarchial read / validation while reading the file using File Adapter using Native XSD schema.

  • How to map idoc segments to multiple output structures

    Dear experts,
    On Pi I need to map segments from an Idoc to 2 different outputstructures. My scenario is as follows:
    incoming Idoc on PI -> if segment eq 'X' then map to outputstructure '1'; if segment eq 'Y' then map to outputstructure '2'
    Idoc structure is as follows:
    - 1 header segment
    - 1..n detail segments (which I need to map to outputstructure 1)
    - 1 summarisation segment (which I need to map to outputstructure 2)
    Output needs to be a .txt file.
    I would like to use the graphical message mapping on PI, how can I map the Idoc to multiple output structures?
    Thanks in advance,
    William

    Hi
    You can do 1:n multimapping
    in message mapping in messages tab ..add both the structures in target tab and do the mapping
    and in operation mapping add both the message interface on the target side
    PLease go through this blog
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

  • Hierarchical Structure in Sender FCC

    Hi all,
    I am working on a file to file scenario.
    The sender data type is in following format -
    File_Header
    Record_ID
    Filler_S
    Batch_Header
    Record_ID
    Filler_S
    Payment_Node
    Record_ID
    Filler_S
    All the nodes are with key fields.
    File_Header Keyfield - 1, Batch_Header Keyfield - 2, Payment_Node Keyfield - 3.
    I want to know whether it is possible to have FCC on sender File adapter for this hierarchical structure.
    The source XML message should be in following format -
    <?xml version="1.0"; encoding="UTF-8"?>
    <Test>
    <File_Header>
    <Record_ID>1</Record_ID>
    <Filler_S>12</Filler_S>
    </File_Header>
    <Batch_Header>
    <Record_ID>2</Record_ID>
    <Filler_S>12</Filler_S>
    <Payment_Record>
    <Record_ID>3</Record_ID>
    <Filler_S>12</Filler_S>
    </Payment_Record>
       </Batch_Header>
    </Test>
    Currently I am getting source XML in this format.
    <?xml version="1.0"; encoding="utf-8" ?>
    <ns:Test xmlns:ns="urn:testhierarchy:fcc">
    <File_Header>
    --<Record_ID>1</Record_ID>
    --<Filler_S>01</Filler_S>
    </File_Header>
    <Batch_Header>
    --<Record_ID>25</Record_ID>
    --<Filler_S>20</Filler_S>
    </Batch_Header>
    <Payment_Record>
    --<Record_ID>6</Record_ID>
    --<Filler_S>22</Filler_S>
    </Payment_Record>
    </ns:Test>
    i.e. Payment_Record and Batch_Header are at same level. I want Payment_Record under Batch_Header.
    Kindly let me know if hierarchical structures can be handled in sender FCC. If yes then what should be the FCC parameters?
    Thanks i.

    Hi Minal,
    We have Source structure same as yours. I am trying to use FCC to handle multiple hierarchy levels at sender side.
    Can you please let me know if you have some solution for it?
    Thanks,
    Pooja.

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • How to implement hierarchical structure of managers and reportees using jdeveloper adf

    I want to display hierarchical structure(which can be expanded and compressed) with 3 columns(Employeeid, fist Name,lastname) of managers and his reportees on selecting a top level manager.
    In this i'm going to use programmatic view objects.
    I have employees table.
    Here is my detailed requirement:
    On selecting a user from drop down list, i want to display the list of users reporting to him.
    From the displayed list on selecting a manager, list of users reporting to him has to be displayed in a tree format with the correspoding just being listed below the current selected manager
    Example :
    Top Manger  has been selected from dropdown and clicked submit.
    Output(a table as mentioned below):
    Manager1
    Manager2
    NonManager1
    Manger 3
    On clicking manager1,
    output:
    Manger 1
      Manger11
      Manasger12
      Nonmanager11
    Manger 2
    NonManger1
    Manger3
    on clicking manager1 again, tree has to be compressed and the output has to be just the same as first output.
    Please help me on this by sharing information or any references on how can i achieve this implementation using Jdeveloper adf concepts.
    Will be waiting for the inputs.
    Thank You,
    Dev

    Obviously, you can only display one picture.  So then the question becomes which picture to show.  Therefore, you will have to create some sort of preference of one pattern over another.
    I would use a FOR loop so that you can loop through your available patters and their possible results.  Use the Conditional Terminal on the FOR loop so that you can stop the loop on the first match.  Then you just wire up the selected value for the ring outside of the loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Hierarchical structure download to excel

    Hi Experts,
    I have got the requirement of downloading hierarchical  to excel.  For example , In tcode se43n , the result  shown in hierarchical structure   has to be downloaded to excel sheet with all child nodes( Expanded tree ).
    Is there any FM which does the purpose or any input on this.
    I appreciate your valuable inputs...
    Thanks
    Santhosh

    Santhosh,
    <li>Without function module you can download the expanded tree structure
    <li>Goto SE43n->Enter Area menu name->Display->Place the cursor on the top node->Click Edit menu->Expand all(Shift+f6).
    <li>Now Menu tree is expanded
    <li>Click on Area Menu menu->Print->Area menu is now shown in different view->click on Print List menu->Save to PC file->Spreadsheet
    I hope that it solves your problem.
    Thanks
    Venkat.O

  • Represent hierarchical structure in graphical structure (by reports?)

    Hi
    I have a parent child relationship where I am using sys conect by path to represent the relationship. Can I display this relationship in graphical structure in Orace Reports?

    Why does Java follow the hierarchical structure i.e
    Object class is the root class which is extended by
    all classes by default..
    Can anybody tell the reason for this.It's for technical reasons. In this way any class and class hierarchy always have a known super-superclass namely Object. This means that API's can be written assuming this class only and they will then work with objects of any class. Examples of this are the Collections and Swing.

  • Create hierarchical structure in tree form

    we want model coding to create an hierarchical structure .
    example :
          . masters
                under masters material master,sales  masters,etc should come.
             items
               under items item details will come.
            customers
                  under customers different customer names will display

    HI,
    take a look to this functions:
    BAPI_HIERA_ADDSUBCLASS
    BAPI_HIERA_ADDSUBSTRUCTURE
    BAPI_HIERA_CHANGESUBCLASS
    BAPI_HIERA_CHANGESUBSTRUCTURE
    BAPI_HIERA_CHECKSUBCLASSALLOC
    BAPI_HIERA_GETDETAILSUBCLASS
    BAPI_HIERA_GETSUBCLASSALLOCS
    BAPI_HIERA_GETSUBSTRUCTURE
    BAPI_HIERA_GETSUPERCLASSALLOCS
    BAPI_HIERA_GETSUPERSTRUCTURE
    BAPI_HIERA_REMOVESUBCLASS
    BAPI_HIERA_REMOVESUBSTRUCTURE
    CRS_CUST_HIERARCHY_COLLECT_CRE
    Regards Nicole

  • How can I export my Firefox bookmarks (and the hierarchical structure of folders) to the Scrapbook Add-On?

    I'm trying to replicate the hierarchical structure of my Firefox bookmarks in Scrapbook and save the webpages automatically. Is that possible in an automatic (or easy) way?
    Many thanks

    I'm not sure how Scrapbook works, but if you open a web page, can it automatically capture all the linked pages? If so, try this:
    (1) Export your bookmarks to an HTML file, and save it in a convenient locaiton (e.g., desktop). This article has the steps: [[Export Firefox bookmarks to an HTML file to back up or transfer bookmarks]].
    (2) Open the file you just created in Firefox. You could double-click the file, or use Open from the menu, or drag and drop it on an open tab.
    Will Scrapbook work with that?

  • Flat structure,deep structure, and info structure

    hi,
    What is meant by flat ,deep ,info structures what is difference among them?

    Flat structure:
    If you have a structure with list of fields on it and You can have a structure with in the structure included
    Deep structure:
    If you have tabletype(internal table) included in the
    structure
    Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings).
    The term deep structure can apply regardless of whether the structure is nested or not
    The technical difference between deep structures and all others is as follows.
    When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information.
    When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures

Maybe you are looking for

  • Error occured when installing the statspack

    1.create tablespaces: sp_data,sp_indx,sp_temp. sp_temp is used for temporary space,but i made a mistake: set sp_temp a permanence tablespace. 2.sql>@spcreate.sql error 3.sql>@spdrop.sql 4.drop user perfstat cascade 5.drop tablespace sp_temp 6.create

  • How to use a logical database's selection screen elements

    Hi all, I have used the logical db, pnp, in my report, however when I want to select data about a personel , ie. her name surname plans-positions, how will I join the two tables pa0001 and logical db? and the table t528t - text for plans? Thanks.

  • Using 10.5.6 for old stuff

    Anyone out there who may have the answer to this. I have a new iMac, and am wondering two things. First, is there such a thing as Apple BASIC ? Secondly, some of the stuff I do requires me to write batch files for the DOS in windows. Is this possible

  • Customer Statements

    Can anyone help me please? Using ECC 6.0 - I am using SAP13 statement type - program RFKORD11 is assigned to it. I have specified the statement type in the customer master records however nothing is being output to the printer/spool request. I am pro

  • Can't install the Creative Cloud on Macbook

    When I try to install the creative cloud, the Installing window disappears. Before I bought the creative cloud I had the creative cloud already installed and delete by myself.