Mapping Header Values to Item Nodes

Using the graphical mapping editor, I need to map values from a source header level node to a target item level node for each item in the source structure.
eg.
<b>Source</b>
<HEADER>
  <H1>HeaderValue1</H1>
</HEADER>
<ITEM>
  <I1>Item1Value</I1>
</ITEM>
<ITEM>
  <I1>Item2Value</I1>
</ITEM>
<b>Target</b>
<ITEM>
  <H1>HeaderValue1</H1>
  <I1>Item1Value</I1>
</ITEM>
<ITEM>
  <H1>HeaderValue1</H1>
  <I1>Item2Value</I1>
</ITEM>
If I map the source <ITEM> node to the target <ITEM> node and the <H1> and <I1> nodes as shown above, the <H1> node only appears on the first item. I need the <H1> node to appear for all target <ITEM> nodes.
Any assistance would be appreciated.
Thanks.

Hi Briggs,
This Mapping will Solve Ur Problem
Source Structure:
MT1  1..1
Header 1..1
  H1 1..1
Item 0..unbound
  L1 1..1
Target Structure:
MT2
Item 0..unbound
  H1 1..1
  L1 1..1
Mapping that solve Your Problem is :
Item(source)-->Item(dest)
H1(Source)>copy value (property=0)>H1(dest)
L1(source)-->L1(source)

Similar Messages

  • Call HEADER value into ITEM level in mapping

    HI,
    my structure is as below:
    H
    I
    I
    I
    P
    H
    I
    I
    P
    P
    H
    I
    I
    I
    I
    I
    P
    I have created a sequence in DB and retriving the value from DB using lookup for the header level(H) for feild ID.by using the code:
       //write your code here
       //write your code here
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    try{
                    //container.getTrace().addWarning("Obtaining channel");
                    channel = LookupService.getChannel( businessSystem, communicationChannel);
                    //container.getTrace().addWarning("Channel OK");
                    //Get a system accessor for the channel. As the call is being made to an DB, an DatabaseAccessor is obtained.
                    accessor = LookupService.getDataBaseAccessor(channel);
                    //container.getTrace().addWarning("Accessor OK");
                    //Execute Query and get the values in resultset
                    resultSet = accessor.execute(" SELECT ID.NEXTVAL FROM DUAL");
                    //container.getTrace().addWarning("SELECT OK");
                    //String[] cols = resultSet.getMetaData().getColumnNames();
                    //for (int i=0; i<cols.length; i++){
                    //            container.getTrace().addWarning("Column name: " + cols<i>);
                    for(Iterator rows = resultSet.getRows();rows.hasNext();){
                                    //container.getTrace().addWarning("Result has rows");
                                    Map rowMap = (Map)rows.next();
                                    //container.getTrace().addWarning("Trying to get NEXTVAL");
                                    //Object obj = rowMap.get("NEXTVAL");
                                    //container.getTrace().addWarning("Data received " + obj);
                                    //return obj.toString();
                                    return rowMap.get("NEXTVAL").toString();
                                    //return ((String)rowMap.get("NEXTVAL"));
                    //container.getTrace().addWarning("Result has no rows");
                    throw new RuntimeException("Cannot obtain next service repair ID");
                    //return "-1";
    } catch(Exception ex){
                    container.getTrace().addWarning("Exception " + ex.getMessage());
                    throw new RuntimeException("Cannot obtain next service repair ID", ex);
                    //return "-1";
    finally {
                    try {
                                    if (accessor!=null) accessor.close();
                    catch(Exception e){
                                    container.getTrace().addWarning("Cannot close DataBaseAccessor for service " + businessSystem +
                                                                                    " and comm channel " + communicationChannel + " in getNextID user defined funcion");
    now my requirement is i have my to call the same value of ID feild into ID of I.to represent perticular I is related to so and so Header(H).
    Please suggest me how i can call the value to which is passing to ID(targetfeild) of H and map to ID(targetfeild) of I.
    please provide me UDF code....
    thanks in advance,
    Naveen.

    Use standard function UseOneAsMany (found under NodeFunctions) to populate the Header-value for each of the corresponding Item-segments.
    Input 1 - your header-fields as resulted from DB-lookup
    Input 2 - Item-segment
    Input 3 - Item-segment
    Make sure to set the context for Input 1 so that there are equal number of contexts in Input 1 as 2 & 3.
    -Kenneth

  • Map Header field on Item field

    hello everibody.
    I have a very simple problem but i'm not is possible solve with standard graphycal mapping.
    I need map a field on header structure in all relative field on item structure:
    example:
    inbound message:
    <header>
    <field1>a</field1>
       <row>b</row>
        <row>c</row>
    </header>
    result:
    <header>
    <fieldA>a</fieldA>
        <row>
           <fieldB>a</fieldB>  (this is the field1 value)
           <fieldC>b</fieldC>
        </row>
        <row>
            <fieldB>a</fieldB>   (this is the field1 value)
            <fieldC>c</fieldC>
        </row>
    </header>
    hany help?

    Use copy value function available in Constants category.

  • Mapping of values in multiple nodes into one

    Folks,
    I have a message with the following structure
    <Document>
      <Item>
        <ID>1000</ID>
       <CustomerPO>128389</CustomerPO>
       <Reference>
         <Category>A</Category>
         <ReferenceID>31909031</ReferenceID>
       </Reference>
      </Item>
    <Item>
       <ID>1001</ID>
       <Reference>
         <Category>B</Category>
         <ReferenceID>707501451</ReferenceID>
       </Reference>
      </Item>
    I need to map it to message below.
    <Result>
      <Reference1>128389</Reference1>
      <Reference2>707501451</Reference2>
    </Result>
    The logic here is:
    Reference1 is populated from the first occurrence in /Document/Item/CustomerPO.
    Reference2 is taken from the first occurrence in /Document/Item/Reference/ReferenceID where /Document/Item/Reference/Category = 'B'.
    I suspect it's possible to do with either one or a combinations of (a) node and string functions, and (b) some custom function, but for the life of me cannot figure out exactly how. Any relevant advise will be appreciated!

    Try below..
    CustomerPO -> copyvalue[0] -> should return the first occurence
    Category -> map with default -> remove context -> equals-> constant[B]
                                  if without else -> target field
    ReferenceID -> map with default -> remove context

  • Mapping input values for a web service connection to a range of cells

    I've created a web service connection in Xcelsius data manager. My web service requires an array of integer as input parameter. How do I map input values for a web service connection to read from a range of cells in the spreadsheet, e.g. $A$2:$A$20, in similar way of mapping output values to write to a range of cells in the spreadsheet?
    For output values of the web service, I can specify to map the output values to write to a range of cells. However, it doesn't seem to work for reading the input values.
    I can map input values for each node to a single cell, e.g. $A$2, in the spreadsheet. However, when I set the "Read From" field to a range of cells, e.g. $A$2:$A$20, it only reads in the first value in the range.
    Is there any way that we can do this mapping for input values as we do for output values?
    Your assistance is very much appreciated.
    Regards,
    Van

    Van,
    There is a workaround for that...
    Example:
    My Webservice accepts input data range in a specific format with " :" symbol, i.e. 072008:082008
    Now what i do is
    A1 = 072008
    A2 = 082008
    A3 = CONCATENATE(A1,":",A2)
    so A3 = 072008:082008
    Now i map the input value in web service to cell A3
    P.S have 2 input box components and map it to cells A1 and A2, i.e you are giving users an  option to enter the range of values...then web service will capture the range and refreshes data with the range of values user entered.
    hope this helps..
    -Anil

  • Problem mapping header/items in 1 Message Type

    Hello,
    I'm currently facing the following problem in my message mapping:
    On my 'CRM side'
    I have a MessageType (DataType) consisting out of +/- 10 header fields and a field called 'ITEMS'
    'ITEMS' is table type field consisting out of +/- 5 item fields. Ofcourse 'ITEMS' can occur min1 time - max ?? times
    On My 'Dbase' side I have a MT containing 2 'update' statements
    1 table is updated for every header record ( mapped with header fields )
    1 table is updated for every item ( mapped with header fields as well as item fields )
    As far as the header data is concerned everything works fine.
    The problem is in the update per item.
    The fields that are mapped with the fields inside 'ITEMS' are working fine.
    But ... I need to put 3 fields from my header level in the 'item table' as well. So I mapped them from header level to 'Item table'
    This seems to work fine as long as I have only 1 item. From the moment I have more then 1 item, the mapping throws an error that he can not create the target item.
    I have the impression that he 'looses' the link between header and item(s) from the second item on.
    Can somebody let me know that I have to use a special function or something to do this type of mapping ( mapping from header level towards item level ) ?
    I tried already some things with the functions 'Remove context' and 'CollapseContext' but this does not seem to help.
    Every help is welcome,

    Hi,
    Here you will be passing some values from Header Segments to Item level. So definately there should be a link available between them to pass the appropriate values..
    For multiple Item fields you need to use the single header fileds as common
    you should go for UseOneToMany API in Node function
    Header field to be passed                  --------->
    (Update table for Item level) ITem Node ------->   UseOneToMany  -----> splitByValue -------> Target field
    (Update table for Item level) ITem Node ------->
    Thanks
    swarup

  • Header Value Condition to Distribute at Item

    Hi dear all.
    Please clarify me about the following issue, already discussed here.
    There was already a suggestion proposed which I went through but unfortunately without the expected results. Let me go a little bit more in detail.
    How can we configure the condition type such that It would be possible to maintain the Fixed amount at header and then it should automatically distribute equally for the items (Based on quantity).
    I will enter the Condition Type ZM00 amount at Header as 2000 EUR and in the items it should automatically split up as :
    Ex ->Condition Type Item Qty Amount as it shoulb be distributed.
    Item A Qty=1 PC, so ZM00 => 400 EUR
    Item B Qty=2 PC, so ZM00 => 800 EUR
    Item C Qty=2 PC, so ZM00 => 800 EUR
    According the suggestion, I made:
    In <b>Control data 1</b> TAB
    put calculation type as <b>C</b>
    In <b>group condition</b> TAB
    <b>active</b> group condition.
    By doing so at Custo, running the process, by entering the amount of 2000 EUR at Header, going back the Overview we see the following distribution:
    Item A Qty=1 PC, so ZM00 => 2000 EUR
    Item B Qty=2 PC, so ZM00 => 4000 EUR
    Item C Qty=2 PC, so ZM00 => 4000 EUR
    It looks like (at it is actually) that the value of 2000 EUR has been understood as a <b>unit value</b> and not a total value, as it should.
    How to make the system understand it by just inputing the value without maintaining "per x units" (in this case would be 5). Actually the unit price is not relevant, only a total value. The quantity would be then just a distributing criteria.
    When I enter the value 2000 per 5 (PC) then the result is correct.
    You also mentioned the Condition Group activation. Can someone please clarify me what is the logic behind? In fact, the type of materials for which the total value is due to be distributed in this example according, let's say the quantity, is assigned to a specific material group. How is then possible for ZM00 to address its total value to these three items? Remember that there is no condition record maintained for ZM00. He's just a manual entry, decided on that moment.
    I really appreciate your prompt reply, as there is some urgency on solving this riddle.
    Thanks in advance and Best Regards
    Rui Viegas

    Hi Pathik.
    Regarding the requirements you mentioned I have to say:
    There is no sales order. I've created a delivery based on a Project (CNS0). Then I'm trying to create a Pro Forma invoice. Only at this stage the pricing will run.
    On the delivery I can have several materials, as I can have more then one material group involved. That's probably were the problem begins. The Group Condition, in this case, can have some problems on identifying which materials to look for. I made what you told me. Anyway, in the ZM00 settings I've place the Group Condition Rotine 003 (Pricing Material Group). It also required me to flag the RoundDiffComp.
    After placing the value 2000 EUR under the 'Amount' column, here's the distribution I got:
    Item 10 A Qty=1 Net Value = 0
    Item 20 B Qty=1 Net Value = 0
    Item 30 C Qty=1 Net Value = 2000
    Any suggestion?
    On the Tab 'Changes that can be made' I have also:
    Manual entries 'C'
    Delete - X
    Amount/ Percent - 'X'

  • What's the difference of Item Class value:Header and Line Item in AME Rule

    Hi All,
    when creating a Rule or Attribute,there is a Item Class property,which contains Header and Line Item two values.
    Can anybody pls help me clarify the difference?
    thx,
    edmund.

    This information can be found in the Approvals Management implementation guide in metalink. The part number for this document is B31622-02
    Regards

  • Map input schema with highest id value in the node to output schema

    <job job_reference="4444">
    <jobnotes/>
    <appointments>
      <appointment id="1" slot_id="1" slot_ref="0830-1030" slot_start_time="08:30" slot_end_time="10:30" slot_description="0830-1030" date="19/02/2014" time="" tk_rowid="7367"
    kept="" reason_code="" narrative="" status="DEL" scheme_id="1" day="4" created_by="" creation_date="19/02/2014 11:58:09" amended_by="" amended_date="19/02/2014 11:58:15"
    apb_exported="N" />
      <appointment id="2" slot_id="2" slot_ref="1030-1230" slot_start_time="10:30" slot_end_time="12:30" slot_description="1030-1230" date="19/02/2014" time="" tk_rowid="7368"
    kept="" reason_code="" narrative="" status="ENT" scheme_id="1" day="4" created_by="" creation_date="19/02/2014 11:58:38" amended_by="" amended_date="19/02/2014 11:58:38"
    apb_exported="N" />
    </appointments>
    </job>
    The above is the input schema. I need to map the elements in appointment node with highest ID to the elements in the output schema. Of the two appointment nodes above, I should only pick up one node with highest ID and map the elements of it to
    the output schema.

    My apologies for not giving the input schema right.
    <jobs>
    <job job_reference="4444">
    <jobnotes/>
    <appointments>
      <appointment id="1" slot_id="1" slot_ref="0830-1030" slot_start_time="08:30" slot_end_time="10:30" slot_description="0830-1030" date="19/02/2014" time="" tk_rowid="7367"
    kept="" reason_code="" narrative="" status="DEL" scheme_id="1" day="4" created_by="" creation_date="19/02/2014 11:58:09" amended_by="" amended_date="19/02/2014 11:58:15"
    apb_exported="N" />
      <appointment id="2" slot_id="2" slot_ref="1030-1230" slot_start_time="10:30" slot_end_time="12:30" slot_description="1030-1230" date="19/02/2014" time="" tk_rowid="7368"
    kept="" reason_code="" narrative="" status="ENT" scheme_id="1" day="4" created_by="" creation_date="19/02/2014 11:58:38" amended_by="" amended_date="19/02/2014 11:58:38"
    apb_exported="N" />
    </appointments>
    </job>
    <job>
    <job job_reference="1111">
    <jobnotes/>
    <appointments>
      <appointment id="1" slot_id="1" slot_ref="0830-1030" slot_start_time="08:30" slot_end_time="10:30" slot_description="0830-1030" date="19/02/2014" time="" tk_rowid="7367"
    kept="" reason_code="" narrative="" status="DEL" scheme_id="1" day="4" created_by="" creation_date="19/02/2014 11:58:09" amended_by="" amended_date="19/02/2014 11:58:15"
    apb_exported="N" />
      <appointment id="2" slot_id="2" slot_ref="1030-1230" slot_start_time="10:30" slot_end_time="12:30" slot_description="1030-1230" date="19/02/2014" time="" tk_rowid="7368"
    kept="" reason_code="" narrative="" status="ENT" scheme_id="1" day="4" created_by="" creation_date="19/02/2014 11:58:38" amended_by="" amended_date="19/02/2014 11:58:38"
    apb_exported="N" />
    </appointments></job></jobs>
    I should pick up details of the appointment with Higesht ID for every job. For every job one record should exist as the ouput.
    With the existing mapping, i am getting just one record as output no matter how many input jobs are there.
    Input schema has got multiple jobs and within each job there are many appointments. So in each job I should pick up the one
    with highest ID

  • Displaying header and line items

    Hi,
    i) i have a fieldname i.e text and its value to display in the bodypage  (body)..
    i want to display the text and its value only if the value is there.. otherwise it should not be displayed and a blank line also should not appear
    in smartforms we can handle that in conditions in the corresponding node, how we do the same in adobe forms?
    ii) suppose i have header and line items and for each header item i want to display the line items, both r in 2 tables how can we handle this
    Thanks

    Hi Shekar,
    The following solutions useful if you are using printbased forms.
    1. To display the field if the value is there.
    ->In the Context you can define the condtion on the filed.
    ->You can write a script on the subform superior to the field
    [code]      if ( $.field.rawValue == <value> ) then
                $.field.presence = “hidden”
          endif [/code]
    2. Header and item table
    In the SFP context drag the header table from interface.drag the item table from interface on the DATA in the header table. it will placed at the end of the header table. Now select the item table select where clause in the properties ( at the bottom of the screen ).there you create a line for condition using create button. drag the field from header table field ( say header-matnr ) on the right side and then drag the same field from the item table ( say item-matnr) in the left side.This will filter the item records relevent for header record.
    refer the message
    Re: Adobe IF Attachments

  • Unable to add value to model node with cardinality 0..n

    Hi All,
       Im working with Webdynpro Java.i have an issue here.i have a input field item named customer and a drop down box item location.when i give customer and location as inputs,a WSDL (named Equipment WSDL) is called.the result is a  drop down list containing equipments id
    i took a custom node location with cardinaliy 0..n.i gave static values as input for location.i need to set the location values to model node location.when i m giving a single value to custom node location,that static value is not accepted by model node location(in WSDL) whose cardinality is 0..n.
    Please suugest a solution for this issue
    With Regards,
    Ushasri.

    HI Ushashri,
    What do you mean by 'static value is not accepted by model node location'
    how you have done the mapping
    send me the hierarchy of rfc and ur value node
    With Regards
    Naidu

  • Problem getting text value of a node

    Hi
    this is my xml:
    <servizio servizioID="WS-AS-14">
    <mapping idEnte="-1" userName="administrator" name="ISTAT" nameTo="master">
         <category id="1.2.2.0" target="true" toId="01.05.01.011.000">
         <name>Descrizione1</name>
         </category>
         <category id="1.2.2.1" target="true" toId="01.05.01.011.001">
         <name>Descrizione2</name>
         </category>
         <category id="1.2.2.2" target="true" toId="01.05.01.011.002">
         <name>Descrizione3</name>
         </category>
    </mapping>
    </servizio>
    I can get the value of the attributes id and toId of the Node category
    But not the value of the Node name
    This is the code:
    Element rootElement = document.getDocumentElement();
    NodeList nodeList = element.getElementsByTagName("category");
    for(int i = 0; i < nodeList.getLength(); i++) {
    Node category = nodeList.item(i);
    NamedNodeMap categoryAttributes = category.getAttributes();
    and the i get the 2 attributes
    Node namelist = category.getFirstChild();
    String name = namelist.getNodeName();
    String value = namelist.getNodeValue();
    but name is #text
    and value is empty
    what's wrong with my code?
    thanks

    up
    thanks

  • Mapping descrete values to childs of a complex type array

    Hi all,
    I have the following flat XML file with descrete values as source:
    <MaterialRequest_MT>
      <number><b>number1</b></number>
      <shortdesc><b>shortdesc1</b></shortdesc>
      <projectname><b>projectname1</b></projectname>
    </MaterialRequest_MT>
    My problem is how to map this file to the following destination file where the single values of the source file are values of a child element in a list of complex elements:
    <ns0:query xmlns:ns0="http://QueryService">
            <ns0:attributes>
              <ns0:item>
                <ns0:key>
                  <ns0:system>MP</ns0:system>
                  <ns0:name>PartNumber</ns0:name>
                </ns0:key>
                <ns0:value><b>number1</b></ns0:value>
              </ns0:item>
              <ns0:item>
                <ns0:key>
                  <ns0:system>MP</ns0:system>
                  <ns0:name>Description</ns0:name>
                </ns0:key>
                <ns0:value><b>shortdesc1</b></ns0:value>
              </ns0:item>
              <ns0:item>
                <ns0:key>
                  <ns0:system>MP</ns0:system>
                  <ns0:name>Project</ns0:name>
                </ns0:key>
                <ns0:value><b>projectname1</b></ns0:value>
              </ns0:item>
            </ns0:attributes>
    </ns0:query>
    As you see I don't have a source array over which to iterate. This makes it impossible to me to map the source values to the destination items.
    Any help is very appreciated!
    Thanks!
    Denis

    Hi
    <b>Mapping for item node:</b>
        Create a user defined function with 3 input parameters for number,shortdesc,projectname. In the user defined function check whether each input value exists or not.if the input value exists add the code 'result.addValue("")'.if the 3 input values exist then 3 item nodes will be created.
    <b>Mapping for elements</b>
             Create another user defined function with 3 parameter.take the 3 input values same as the above function. Check whether parameter a value exists in the element and write  <b>result.addValue(a[0]);</b>Do similarly for b and c parameters. After defining this function add standard node function 'splitbyvalue' and assign to the target.
       USedefined function---->splitbyvalue--
    >value.
    I guess this solution is a bit complex.....hope it works
    regards
    Suneel
    Message was edited by: Suneel
    Message was edited by: Suneel

  • UDF or Mapping for removing more items

    Hi
    I'm in a need to implement a data validation using UDF or Graphical Mapping
    File has the data like ONE header record (5 fileds) and ONE item record (8 fields) as follows
    header:field1field2 field3 field4 field5
    item:field1field2 field3 field4 field5 field6 field7 field8
    header:field1field2 field3 field4 field5
    item:field1field2 field3 field4 field5 field6 field7 field8
    header:field1field2 field3 field4 field5
    item:field1field2 field3 field4 field5 field6 field7 field8
    and so on.
    Here my requirement is one header should have only one item. Sometimes either header or items are repeating more than one time .. in that case lastest header or item should be updated in target fields.
    To say clearly ... one header and one item & one header and one item and so on to be updated.
    In case any header has two items then first item to be deleted and second item to be updated.
    Kindly advise me how to go about this requirement.
    Thanks.

    Do the mapping as
    Direct assignment of Source header to Target Header and same for fields inside the Header.
    create a UDF (choose context).very simple UDF with a single statement.
    result.addValue(a[a.length-1]);
    Item Node mapping and Its Fields
    Item------>UDF------>Item(Target)
    field1(Change the context to Header)------->UDF----->field1(under Target Item)
    Do the same mapping for remaining fields Under Item as you  do for field1
    I have tested the above UDF and the mapping..It is working according to your requirement.

  • Error after Adding Header Zfields to Item Level Screens?

    Hi,
    When I add SLA Z fields from Node BTAdminI to the  SRQM_SLAPRO/SLASrvCtrView,. Contract related SLA data is not appearing and all fields are appearing in the mode of grade out in WEB UI.
    Few of the fields are showing  BTAdminI not bound as value.
    In the same scenario for the few of the fields I am getting below mentioned error
    BSP exception: Error converting to data object from ZZAFLD00002U
    Same error I am getting after I added Zfields (From BTADMINH) to Item Level Screen too.
    My doubt is Cant I add Header Zfields to Item Level Screens? Or/And Item Zfields to Item Header Screens
    What can be possible what is not possible. Please get some clarity on this issue.
    Thanks
    Chand

    Hi All,
    I am new to IC WEB.
    i am facing a problem while ading Zfield in Contact Screen using AET Tool.
    i am getting the error as
    BSP exception: Error converting to data object from ZZAFLD00001K
    Please help me....
    Thanks in Advance,
    Swaraj
    Edited by: swaraj sap on Oct 6, 2009 7:08 PM

Maybe you are looking for