Mapping node from a different subtree

Hi Experts,
I am doing a mapping where the source structure contains two segments LINE and VAT. Under LINE, I have a field called ABC. Also under VAT, I have a field called ABC. What I want to do is, if ABC under LINE is blank then I want to populate the value of ABC under VAT. Any idea how to go about this?
Thanks,
Dhawal

Use ifWithElse & exist function.
check if ABC from line exists then map it to traget else map ABC of VAT to target.
oR just use the equalS & NOT function instead of exist function and then check if LINE (ABC) not equalS Blank (empty constant) then map ABC of Line into target else map ABC of VAT to target.

Similar Messages

  • Mapping node from UIcust &View throws dump in result

    hello all,
    Need ur urgent help!!
    I hav already posted one thread bout dis but didnt got any response.... So doing it again
    Not able to map UICust node to View.Till UICust the app works fine but as i map the node to View........ Error comes of contact administrator without any exception
    Contact Administrator error is coming after mapping node from UICust with View.
    Its not happpening in case of 1 single attribute but while mapping the node this error is encountered even if that node consists of single attribute.
    Urgent help required....Kindly help
    Thanks n regards
    Mandeep

    Hi Siva,
    4 attr under 1 node in modal node and same i craeted in value node in uicust. but even if i try to map the replicated value node in uicust and map dat to value node of view. still its showin dump (Contact administrator wid no exception)
    I hav reopnened the project....... rebuild. it doesnt show any error.... as soon as i go for mapping in view and uicust . it starts throwin dump
    Thanks n Regards
    Mandeep

  • Map node from different View Container

    hi all,
    i have a question about WDA. In case i have 3 view controllers: V_MAIN, V_A, and V_B. This program lets the user to fill out the form on V_A and V_B. V_MAIN has view containers embedded by V_A and V_B.
    If i want an application to submit the form by click the Submit button on V_MAIN. The button has an action to send the parameters which fetch from V_A and V_B to do something further.
    I've tried to declare the variable by
    data: lr_v_a type if_v_a=>element_node.
    the system shows an error "The type if_v_a=>element_node. is unknown"
    Do you guys have any ideas about this? Please share me then.
    Hope you can figure out what I'm saying. Thanks in advance.
    Peerasit

    Hi...
    Use Global Component controller for all the view your using.... so that any time if you want data.... you can access it from the component controller...... try to use always global........
    so if you click submit and want to do something further..... you can get the values from component controller and pass it to the next process..... its simple.....
    Hope this will help you.....
    Thanks & regards
    Raja

  • Mapping element from a different line item

    Hi Experts,
    I have a structure that looks like this,
    LINE
    line1
      item1
      item2
    line2
      item1
      item2
    line3
      item1
      item2
    and the target structure will look like this,
    SEGMNT
    line1
      item1
      item2
    line2
      item1
      item2
    line3
      item1
      item2
    Now, if item2 in line1 of source is missing then I want to map item2 of line2 of source to item2 of line1 of target. Please let me know how to go about this?
    Thanks,
    Dhawal

    Hi,
    I will add payloads here to explain the situation in more detail.
    Source Payload
    <class>
    <student>
      <name>ABC</name>
      <grade></grade>
    </student>
    <student>
      <name>XYZ</name>
      <grade>A</grade>
    </student>
    <student>
      <name>PQR</name>
      <grade>B</grade>
    </student>
    </class>
    Current Target Payload
    <Target_class>
    <student>
      <name>ABC</name>
      <grade></grade>
    </student>
    <student>
      <name>XYZ</name>
      <grade>A</grade>
    </student>
    <student>
      <name>PQR</name>
      <grade>B</grade>
    </student>
    </Target_class>
    Required Target Payload
    <Target_class>
    <student>
      <name>ABC</name>
      <grade>A</grade>          // Here, grade A shoube be picked up from next student (XYZ)
    </student>
    <student>
      <name>XYZ</name>
      <grade>A</grade>
    </student>
    <student>
      <name>PQR</name>
      <grade>B</grade>
    </student>
    </Target_class>
    Now I understand that I need to write UDF for this, the question is HOW? Please guide me in this direction.'
    Thanks,
    Dhawal

  • Map several records to different elements in the same xml node

    Hi,
    I am trying to map data from relational tables to elements as per my xml schema. One of my tables has several records that I need to map to different elements in the same xml node.
    For example:
    Customer_Id | Param_Id |Param_Name
    212 | 1 |State
    212 | 2 |Country
    212 | 3 |ZipCode
    I can not change the structure of this existing table and need to work with it.
    How do I map the different params for a specific customer to my Customer node in the schema?
    One option is to join on the parameters table several times, but there ought to be a better way!
    PLEASE HELP!!!
    Thanks,

    First I question the design that contains/allows 600 attributes on an element. They sound like they really should be elements in the XML.
    Regardless, the following (NOT TESTED) should work for you (assuming you want to write one SQL with 600 columns)
    CREATE OR REPLACE VIEW APPLICATION_XML
    OF XMLTYPE
    Element "LOAN_APPLICATION"
    with object ID
    substr(extractValue(object_value,'/LOAN_APPLICATION/APPLICATION_DATA/@CallID'),1,5)
    AS
    WITH parm_tb AS
    SELECT MAX(DECODE(prv_valu, 1, prv_value)) BusinessType,
           MAX(DECODE(param_id, 2, prv_value)) Product,
           MAX(DECODE(param_id, 3, prv_value)) SomethingElse
      FROM parameter_details
    WHERE prv_pmh_header_id = 1
    SELECT xmlElement
       ("APPLICATION_DATA",
         xmlAttributes
          p.prv_detail_id as "CallID",
          p.PRV_PRM_PARAM_ID as "RandomID",
          p.prv_value as AppInitDate
         xmlElement
         ("PRODUCER_DATA",
           xmlAttributes
            parm_tb.BusinessType as "BusinessType" ,
            parm_tb.Product as "Product"
      FROM parameters_table p
    WHERE p.PRV_PMH_HEADER_ID = 1

  • Powerbook G4 10.4.11  won't start from hard drive .  Tried repair, " The underlying task reported failure on exit (-9972).Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.

    Powerbook G4 10.4.11  won't start from hard drive .  Tried repair, " Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.Powerbook G4 10.4.11  won't start from hard drive .  Tried repair, " The underlying task reported failure on exit (-9972).Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.
    The underlying task reported failure on exit (-9972).

    kauribill wrote:
    " The underlying task reported failure on exit (-9972).Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.
    The underlying task reported failure on exit (-9972).
    This is a directory issue that Disk Utility cannot fix. Although it manifests itself as a software issue sometimes it may be hardware based. See DiskUtility reports "Underlying task reported failure" when repairing avolume http://support.apple.com/kb/TS1901?viewlocale=en_US". You can try using a utility like TechTool Pro, Drive Genius or Disk Warrior to repair and replace the directory. Another option would be to use the Archive and Install feature to reinstall. If the problem returns after correction you may have a failing or failed HDD.
    cornelius

  • How To Remove Empty Node From Source XML

    Hi,
    How can I remove an empty node from the source xml in a XSLT mapping.
    For e.g. If the source xml is like:
    <SRC>
    <Node1>SAP</Node2>
    <Node2/>
    <Node3>XI</Node3>
    </SRC>
    Then the xml should become:
    <SRC>
    <Node1>SAP</Node2>
    <Node3>XI</Node3>
    </SRC>
    I need to do this because the output of my XSLT mapping is showing blank spaces for each blank node.
    Thanks,
    Abhishek.

    Use <xsl:if>
    Or else you may find different options here
    http://www.dpawson.co.uk/xsl/sect2/N3328.html#d4804e304
    Regards,
    Prateek

  • How to map nodes to an embedded Component during runtime?

    Hi,
    I embed a Component (<i>BasisComponent</i>) in a new created Component (<i>MyComponent</i>) to use some funcionality from it. Therefor, I have to map some ValueNodes from <i>MyComponent</i> to <i>BasisComponent</i> during designtime to transfer the data. I thought, I could use External-Context-Mapping for that. That means I've created a ValueNode in <i>BasisComponent</i>'s InterfaceController and declared it for ExternalContextMapping (let's call it <i>ExtNode</i>.
    Because I want to use this basis functionality from different embedding Components (<i>MyComponent1, MyComponent2</i>, etc.), I can't declare the structure of <i>BasisComponents ExtNode</i> yet, it's just an empty ValueNode.
    Now, I want to map from my using Components their different ValueNodes to <i>BasisComponents ExtNode</i>.
    How to do that? Or is there another possibility to put different value-nodes from different components to the same Node in my <i>BasisComponent</i>? Can this be done during designtime? I believe it can be definitively done during runtime....
    kr, achim

    Achim,
    Let me use your example and explain what in fact will work when you are creating attributes/nodes only at design time.
    Let us define context in BasicComponent as:
    - MyRoot (0..n, selection 0..1, singleton)
    |-MyInt (int)
    |-MyString (string)
    Say, ComponentA has the following context structure:
    - rootNode (0..n, selection 0..1, singleton)
    |-attA (int)
    |-attB (string)
    |-attX (string)
    --attC
    Then you can easly map rootNode of ComponentA to MyRoot of BasicComponent, attA -> MyInt, attB -> MyString, attX left is not used for mapping.
    =============
    Same is true for ComponentB with
    - RootOfBNode (0..n, selection 0..1, singleton)
    |-attIgnored (date)
    |-attA_INT (int)
    |-attB_STR (string)
    |-attY (string)
    --attZ
    ComponentB.RootOfBNode -> CU of BasicComponent.MyRoot, attA_INT -> MyInt, attB_STR -> MyString, attY and attIgnored are not used for mapping.
    =============
    However, if context of ComponentA is defined as
    - rootNode (<b>0..1</b>, selection 0..1, singleton)
    |-attA (int)
    |-attB (string)
    |-attX (string)
    --attC
    ...then you are out of luck -- wrong cardinality of node.
    Moreover, this case also fails
    - rootNode (0..n, selection 0..1, singleton)
    |-attA (string)
    |-attB (string)
    |-attX (string)
    --attC
    Here all attributes are strings so mappings will be incomplete. To fix this you need at least fake attribute in rootNode.
    And mostly important fact: if you can't map nodes in designer due to mismatch context structures the any dynamic (at run-time) mapping will fail as well in majority of cases.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Adding multiple same-name nodes from one xml into another

    Hi,
    Following on from my question the other day (Adding multiple different nodes from one xmltype into another), I now have a slightly more complex requirement that I cannot work out where to start, assuming that it's something that can reuse some/all of yesterday's work (thanks again, odie_63!). ETA: I'm on 11.2.0.3
    So, here's the (slightly amended) xml along with yesterday's solution:
    with sample_data as (select xmltype('<root>
                                           <xmlnode>
                                             <subnode1>val1</subnode1>
                                             <subnode2>val2</subnode2>
                                           </xmlnode>
                                           <xmlnode>
                                             <subnode1>val3</subnode1>
                                             <subnode2>val4</subnode2>
                                           </xmlnode>
                                         </root>') xml_to_update,
                                xmltype('<a>
                                           <b>valb</b>
                                           <c>valc</c>
                                           <d>
                                             <d1>vald1</d1>
                                             <d2>vald2</d2>
                                           </d>
                                           <e>vale</e>
                                           <f>valf</f>
                                           <g>
                                             <g1>valg1</g1>
                                             <g2>valg2</g2>
                                           </g>
                                           <h>
                                             <h1>valh1</h1>
                                             <h2>valh2</h2>
                                           </h>
                                           <multinode>
                                             <name>fred</name>
                                             <type>book</type>
                                             <head>1</head>
                                           </multinode>
                                           <multinode>
                                             <name>bob</name>
                                             <type>car</type>
                                             <head>0</head>
                                           </multinode>                                        
                                         </a>') xml_to_extract_from
                          from   dual)
    select xmlserialize(document
               xmlquery(
                 'copy $d := $old
                  modify (
                    insert node element extrainfo {
                      $new/a/b
                    , $new/a/d
                    , $new/a/f
                    , $new/a/h
                    } as first into $d/root
                  return $d'
                 passing sd.xml_to_update as "old"
                       , sd.xml_to_extract_from as "new"
                 returning content
             indent
    from sample_data sd;
    That gives me:
    <root>
      <extrainfo>
        <b>valb</b>
        <d>
          <d1>vald1</d1>
          <d2>vald2</d2>
        </d>
        <f>valf</f>
        <h>
          <h1>valh1</h1>
          <h2>valh2</h2>
        </h>
      </extrainfo>
      <xmlnode>
        <subnode1>val1</subnode1>
        <subnode2>val2</subnode2>
      </xmlnode>
      <xmlnode>
        <subnode1>val3</subnode1>
        <subnode2>val4</subnode2>
      </xmlnode>
    </root>
    However, I now need to add in a set of new nodes based on information from the <multinode> nodes, something like:
    <root>
      <extrainfo>
        <b>valb</b>
        <d>
          <d1>vald1</d1>
          <d2>vald2</d2>
        </d>
        <f>valf</f>
        <h>
          <h1>valh1</h1>
          <h2>valh2</h2>
        </h>
        <newnode>
          <name>fred</name>
          <type>book</type>
        </newnode>
        <newnode>
          <name>bob</name>
          <type>car</type>
        </newnode>
      </extrainfo>
      <xmlnode>
        <subnode1>val1</subnode1>
        <subnode2>val2</subnode2>
        <type>book</type>
      </xmlnode>
      <xmlnode>
        <subnode1>val3</subnode1>
        <subnode2>val4</subnode2>
        <type>car</type>
      </xmlnode>
    </root>
    If it's easier, I *think* we would be ok with something like:
    <newnode>
      <type name="fred">book</type>
      <type name="bob">car</type>
    </newnode>
    The closest I've come is:
    with sample_data as (select xmltype('<root>
                                           <xmlnode>
                                             <subnode1>val1</subnode1>
                                             <subnode2>val2</subnode2>
                                           </xmlnode>
                                           <xmlnode>
                                             <subnode1>val3</subnode1>
                                             <subnode2>val4</subnode2>
                                           </xmlnode>
                                         </root>') xml_to_update,
                                xmltype('<a>
                                           <b>valb</b>
                                           <c>valc</c>
                                           <d>
                                             <d1>vald1</d1>
                                             <d2>vald2</d2>
                                           </d>
                                           <e>vale</e>
                                           <f>valf</f>
                                           <g>
                                             <g1>valg1</g1>
                                             <g2>valg2</g2>
                                           </g>
                                           <h>
                                             <h1>valh1</h1>
                                             <h2>valh2</h2>
                                           </h>
                                           <multinode>
                                             <name>fred</name>
                                             <type>book</type>
                                             <head>1</head>
                                           </multinode>
                                           <multinode>
                                             <name>bob</name>
                                             <type>car</type>
                                             <head>0</head>
                                           </multinode>                                        
                                         </a>') xml_to_extract_from
                          from   dual)
    select xmlserialize(document
               xmlquery(
                 'copy $d := $old
                  modify (
                    insert node element extrainfo {
                      $new/a/b
                    , $new/a/d
                    , $new/a/f
                    , $new/a/h
                    , element newnode {
                                       $new/a/multinode/name
                                       ,$new/a/multinode/type
                    } as first into $d/root
                  return $d'
                 passing sd.xml_to_update as "old"
                       , sd.xml_to_extract_from as "new"
                 returning content
             indent
             ) fred
    from sample_data sd;
    Which produces:
    <newnode>
      <name>fred</name>
      <name>bob</name>
      <type>book</type>
      <type>car</type>
    </newnode>
    - obviously not right!
    Can anyone provide any hints? I've tried searching for similar examples, but I mustn't be putting in the right search terms or something!

    odie_63 wrote:
    or, similarly, to get the alternate output :
    copy $d := $old
    modify (
      insert node element extrainfo {
        $new/a/b
      , $new/a/d
      , $new/a/f
      , $new/a/h
      , element newnode {
          for $i in $new/a/multinode
          return element type {
            attribute name {data($i/name)}
          , data($i/type)
      } as first into $d/root
    return $d
    So we're going with the second method, but I've discovered that the "$i/name" node is not always present. When that happens, I would like to use a default value (for example, "george"). I promise I've searched and searched, but I'm completely failing to turn up anything that sounds remotely like what I'm after (seriously, I can't believe my google-fu sucks this badly!).
    Is there a simple way of doing it? The only thing that I've found that looks vaguely relevant is "declare default namespace...." but I'm not sure that that's the correct thing to use, or if it is, how I'm supposed to reference it when populating the attribute value.

  • How to read the attribute in another context node from setter method

    Hi,
    As part of the  requirement
    i need to read the STRUCT.E_MAIL ( attribute ) present  in  INDEPENDANTEMAIL context node  from  the SET_S_SRUCT method of the context node  HEADER.
    I tried th following but it didnt work out....
    Get the Custom Controller Path
    *lr_cuco ?= controller->get_custom_controller( controller_id = 'BP_HEAD/IndComm').
    *IF lr_cuco IS BOUND.
    Get the Entity
    *lr_entity ?= lr_cuco->typed_context->independantemail->collection_wrapper->get_current( ).
    *ENDIF.
    *CHECK lr_entity IS BOUND.
    Get the Trade Event Type.
    *lv_email  = lr_entity->get_property_as_string( 'E_MAIL' ).
    also i tried ...
    data:
    *lv_value type string,
    *lr_property type ref to if_bol_bo_property_access.
    *lr_property = collection_wrapper->get_current( ).
    *lv_value = lr_property->GET_PROPERTY_AS_STRING( importing iv_attr_name = 'E_MAIL'
                                                returining  ev_result    = lv_email ).
    but it didnt workout ......
    Any suggestions   ...................
    Regards,
    Sijo...

    Hi,
    Both Context node are available in view then refer this link.
    Reading Attributes from different context nodes in the same view
    Relationship name for context node INDEPENDENTMAIL is 'BuilIndependantEmailRel'
    Regards
    Gaurav

  • Table transformation from two different database

    Hi all,
    I am trying to load table from one database table to another database table in ODI 10g.I have created two physical and logical topology.
    But when in interface design i have drag the source and target tables in the diagram window, but here it doesnot shows the auto mapping options, when i try it manually by dragging a field, i have failed. when i execute the operation the following error occured:
    create or replace view db1."C$_0 W_INT_ORG_D"
    as select     
    from     db1.W_INT_ORG_DS W_INT_ORG_DS
    where     (1=1)
    here both the source and target db are same..
    How can i resolve it

    Hi,
    Thanks it worked.
    I am getting another error on Insert flow into I$ table step.
    I am connecting two database from two different hosts, both are in oracle.
    I have two logical schema prepared for both database.
    should i have to mentioned these schema in one physical topology? what should be placed in schema and work schema option.
    I have used LKM Oracle to Oracle(DBLINK) as KM.
    Please help
    Best regards,
    manish

  • Cross reference data from 2 different ecc system.

    Hi Sdners,
    Iam working on a scenario where i have to get data from two different Ecc system,consolidate them and send it back to their respective system.
    But some refernce data in both the systems are different and when iam merging data from 2 system i have to maintain either of the reference data.But problem comes when i syndicate it back to ECC ,it cannot accept a new reference data.
    Please suggest me some answere how to proceed in such case.
    Its urgent.
    Points will be rewarded for Genuine answeres.
    Thanks in advance,
    Regards,
    Neethu.

    Hi,
    First enable keymapping property to YES  for the table which you want to do
    importing and syndicatig.
    Create two remote systems type inbound/outbound .
    Import the data from first remote system and map the corresponding fields.
    Don't forget to map the remotekey field which is on the destination side.Make clone
    of one of the dispaly field and map to the remote key field.
    After importing you can see the records from which remote system are imported
    using Edit Key Mappings option in DataManager.It shows that remotesystem
    name and corresponding remote key.
    Do the same for second remote system too.
    After merging data in data manager , you can see the merged record and see the
    two remote systems names and two remote keys by using Edit Key Mappings
    option so the merged record goes back to both remote systems when you syndicate
    the records.
    Syndicate the data from first remote system by selecting destination properties and
    output remote system property under map properties tab as your first remote
    system.
    Do the mapping for corresponding fields and don't forget to map the value field under
    remote key .Then MDM generates remote keys for only records belongs to your
    first remote system.You can see this in destination preview.It does n't genarate
    remote keys for second remote system.Then check the option Suppress records
    without key under map properties tab and execute the syndication.Finally we can
    see the accurate records.
    Do the same for second remote system too.
    Hope it helps
    Cheers
    Narendra

  • Receive data for same IDOC from 2 different scenarios

    Hello,
    I have already scenario that received xml file and transfer data to IDOC (The IDOC is purchase order).
    This scenario works fine.
    Now I try to add more scenarios. This scenario takes files from other xml source work with new mapping and transfer data to same IDOC.
    The problem is in integration builder u2013
    When I try to create receiver agreement the message the message "Object already exists" appear.
    How can I solve this issue?
    Elad

    Hi Elad,
    +Now I try to add more scenarios. This scenario takes files from other xml source work with new mapping and transfer data to same IDOC.
    The problem is in integration builder u2013
    When I try to create receiver agreement the message the message "Object already exists" appear.+
    Does this mean that the other xml source is from the same party? If yes, then that party is already configured in your receiver agreement as explained by the error "Object already exists".
    If the xml source is from a different party. What you can do is to delete the existing receiver determination. Make a new one and replace the party with an "*", in that way, increasing the parties would only consist of one receiver determination for that particular interface. You would only have to add sender and receiver agreements.
    Hope this helps,

  • How do I calculate days from two different dates?

    Hi all,
    How do I calculate days from two different dates?
    my requirement is to pass the number of days to target field from two dates.
    Current date :  14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out  udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

  • How do I calculate days from two different dates in XI/PI?

    Hi all,
    How do I calculate days from two different dates in XI/PI?
    my requirement is to pass the number of days to target field from two dates.
    Current date : 14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

Maybe you are looking for