Message Mapping: Parent should only appear if child exists

Hi,
i have a message structure like
root
   structure 0-unbounded
      field1    0-1
      field2    0-1
I want to create the same output structure, but if field1 doent exist, the parent structure shouldnt appear. Sounds very simple, but the my problem is: however i map field1 to structure, either directly or with functions like exists() or ifWithOutElse() it allways give me the wrong structure.
For example:
<root>
   <structure>
      <field2>10</field2>
   </structure>
   <structure>
      <field1>20</field1>
      <field2>30</field2>
   </structure>
   <structure>
      <field2>40</field2>
   </structure>
</root>
mapped with field1 (context to root) -> structure gives me as result
<root>
   <structure>
      <field2>10</field2>
   </structure>
</root>
I would like to have:
<root>
   <structure>
      <field1>20</field1>
      <field2>30</field2>
   </structure>
</root>
Thx 4 ur help,
Udo

Hi Satish,
thx for posting
I checked your solution, but i got the same result, may be i understood something wrong.
>I changed the occurence of your mapping to 0..unbouned in mapping.
I dont understand that. Are you talking about a multi mapping?
>For root in target: field1(change context to root in source) > removecontext>exists>creatif>root
The root is of course occurence 1, so i dont need to map it, right?
>For Strucurte in target: field1 > removecontext>exists-->creatif -->Strucurte
I tried to map the structure like you recommended. It should now give ONLY structures where the child field1 exists. This works, if the first structure has such a child, but not in my example. I get the wrong structure.
Do you think i need to use node functions as well for field1 or field2? Can they appear in a wrong structure?
Regards,
Udo

Similar Messages

  • I cannot send or receive messages(sms), it's only appear Message(-1) anyone know how to fix it?

    I already tried to do many things from restart to restore

    We both have AT&T service.  She has an Iphone 4s, I have the 3gs.

  • Google Talk Messages Only Appear In Notification Center

    Since upgrading to Mountain Lion, instant messages from Google Talk only appear in Notification Center. (IM's between iCloud and AIM work fine.) On one occasion, I was able to double-click on the incoming IM from Google Talk, and it opened in the Messages app. However, subsequent IM's are effectively trapped in Notification Center. I am unable to single or double-click on them to reply. The only indication that I see to know a new IM from Google Talk has arrived is Message's icon bounces once in the Dock, and gets badged with the number of new messages.
    This was not a problem using the Messages Beta with Lion, which did not have Notification Center as a feature. The only interesting Messages related message I find in the Console is:
    7/30/12 12:11:45.733 pm Messages[5475]: *** WARNING: -[NSImage compositeToPoint:fromRect:operation:fraction:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
    Thanks in advance for any help!

    Timothy Arends1, if you want notifications to be displayed in the notification center, just set the one you want to see in the "INCLUDE" section.
    Settings > Notifications > Edit > Touch the bars on the right of the app you want to be notified and drag into the INCLUDE section.

  • Message Mapping Doubt

    Hi Experts,
    Im stuck up with a message mapping issue. Need your advice if I can handle this in message mapping or should I changed the FCC.
    FILE to RFC scenario.
    Input file sample.
    1|OPENED|153-01-19|T001|005151|0237|20100705|17:35:55|001     |20100705
    101|A005152|1|20100705|11:46:38|001     ||||001||1|N|SALE
    111|WCAKE004|1.000|42.00|42.00||G||0.00|LIQUOR|||N|42.00|0.00|$|0.00|WCAKE004
    111|WCAKE004|-1.000|42.00|42.00||G||0.00|LIQUOR|||N|-42.00|0.00|$|0.00|WCAKE004
    111|WCAKE005|1.000|38.00|38.00||G||0.00|LIQUOR|||N|38.00|0.00|$|0.00|WCAKE005
    121|38.00|0.00|0.00|0.00|0.00|I|N||0.00|0.00
    131|T|CASH|S$|1.0000000|38.00||||38.00
    141|G|0.00
    1|CLOSED|153-01-19|T001|005162|0237|20100705|17:35:55|001     |20100705
    After the FCC the message comes into XI in the format (Source message) .
    GMRSTORES
    --CODE1
    1
    OPENED etc..
    --CODE101
    101
    A005152
    1 etc..
    --CODE111
    111 etc..
    --CODE111
    111 etc..
    --CODE111
    --121
    --131
    --141
    --1
    The problem is on the target side when I try to map the Code111 (line item) to the targert RFC it comes only once or all the Code111 nodes comes under the same "ITEM_LI" The target RFC structure is like.
    --/POSDW/CREATE_TRANSACTIONS_EXT
    IT_TRANSACTION
    ITEM
    RetailLIne Item
    ITEM_LI (here is the problem I expect 3 ITEM_LI nodes for each CODE111)
    Pls advice.
    Thanks
    Prasanna

    The problem is on the target side when I try to map the Code111 (line item) to the targert RFC it comes only once or all the
    Code111 nodes comes under the same "ITEM_LI"
    here is the problem I expect 3 ITEM_LI nodes for each CODE111
    1) Ensure that you have raised the Context of the source node (CODE111) to a higher node.
    2) Is your mapping logic proper..... is the ITEM_LI node or its parent node mapped properly so that when the CODE111 repeats, the target is also able to repeat?
    3) did you check the max occurence of ITEM_LI node.....it should be more than 1
    Regards,
    Abhishek.

  • CcBPM Process Number in the Message mapping

    Hi,
    I  have a requirement to map the ccBPM's process number in which the Mapping error has occured to be mapped to a specific field in the target.  I wanted to know how could I pass the BPM's process number to the message mapping ( this message mapping(Service mapping) is a part of the same BPM).  If we could get the MESSAGE_ID of the message in the message mapping, we should also be getting the BPM Process number.
    In other words, when an alert is triggered in BPM, we get the BPM process number in its subject, i need that BPM process number in to the message mapping where that message has to be stored in a table in ECC.
    I have searched in help and SDN to check if some system properties can help, but i couldnt.  Any help/inputs from you is highly appreciated.
    Regards,
    Kalpana.

    Hi Manuel,
    it is very easy to to get the <b>Message ID</b>, which is unique and useful for selecting a message in the monitoring
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm">Special Access to Mapping Runtime Constants</a>
    You send a mail from Java Mapping or, what would be the standard, (as additional) message from BPM or just as normal Message Receiver or only in Error case as Alert receiver.
    Regards,
    Udo

  • Calling Message mapping Dynamically based on a field value

    Hi gurus,
    I have
    1 source inteface
    1 target interface
    3 Message mapping programs based on the 1 source and 1 Target Interfaces
    I need to decide Dynamically as which message mapping program should be called based on the Input provided by the source system.
    For example:
    If the souce side file sends a field value=1 then message mapping 1 should be called
    If the source side file sends a field value=2 then message mapping 2 should be used...
    Pls provide me help on this ASAP.

    As ur source and target structures are always same, u should have used same mapping with multiple conditions instead of using three different mappings.
    Right now for ur requirement, in ID -> standard Interface Determination, u can use multiple interface mappings based on condition.
    Check heading "Specifying Conditions (for Multiple Inbound Interfaces)" here
    http://help.sap.com/saphelp_nw04s/helpdata/en/42/ea20e737f33ee9e10000000a1553f7/content.htm
    Regards,
    Prateek

  • Message Mapping - same structure

    I have the Source and Target Structures are the SAME XML format.
    Should I need a Message Mapping?
    Should I need an Interface Mapping?
    Please help me.
    Thanks.

    Bhavesh, to be precise the Source and Target Structures are cXML(We are doing this for a testing purpose). The cXML has been imported into the External Definitions.
    >> Rohini, if your idea is just to sent the same file to the target system, i guess your solution is the same as the approach i have followed in this weblog.
    it doesnt even mattter if you have imported your XSD, any dummy type created will do.
    Ref:
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp

  • Message mapping/UDF help..

    Hi experts,
    Can someone let me know whether there is a chance to fulfill the below requirement:
    Input file:
    In the Input CSV file, there is a fixed length field with length 9 char and has leading zeroes (ex: 000000650)
    Output file:
    In the O/p XML file, the corresponding value should be displayed as "6.50" (Have to remove the leading zeroes, right justified and the last two digits should be allocated for decimals)
    Can anyone let me know if we can handle in Message mapping or should we write a UDF? If so can you please provide the code..
    Any help would be highly appreciated !!
    Thnx
    - Ravi

    Hi Ravi,
    UDF:
    Create a function zerosuppress and take the cache as value and take one argument input. Then put the code below:
    //Put this code
    String output = input.replaceFirst("^0+","");
    return output;
    With this function your leading zeros will remove.
    Then map like this:
    source field --> zerosuppress (udf) --> divide by 100 --> target field.
    This should solve your issue.
    Regards,
    ---Satish

  • Message Mapping - Filter on parent element

    Hi,
    I'm using message mapping for mapping IDoc ORDERS05 to flat file.
    This is the source structure :
    ORDERS05  1..1
    ---- IDOC  1..1
         ---- E1EDKT1  0..99
              ---- TDID  0..1
              ---- TSSPRAS_ISO
              ---- E1EDKT2  0..9999999
                   ---- TDLINE  0..1
    and this is the target structure :
    TCD 1..1
    ---- TCT  1..unbounded
         ---- TDID
         ---- TDSPRAS
         ---- TDLINE
    Can anybody help me about how to do the mapping for having 1 TCT element for each
    E1EDKT2 element with parent (E1EDKT1) having field TDID equals to the constant "ZALO" ?
    For exemple:
    <ORDERS05>
       <IDOC>
          <E1EDKT1>
             <TDID>ZALO</TDID>
             <TSSPRAS_ISO>tdspras1</TSSPRAS_ISO>
             <E1EDKT2>
                <TDLINE>tdline11</TDLINE>
             </E1EDKT2>
             <E1EDKT2>
                <TDLINE>tdline12</TDLINE>
             </E1EDKT2>
          </E1EDKT1>
          <E1EDKT1>
             <TDID>unused</TDID>
             <TSSPRAS_ISO>tdspras2</TSSPRAS_ISO>
             <E1EDKT2>
                <TDLINE>tdline2</TDLINE>
             </E1EDKT2>
          </E1EDKT1>
          <E1EDKT1>
             <TDID>ZALO</TDID>
             <TSSPRAS_ISO>tdspras3</TSSPRAS_ISO>
             <E1EDKT2>
                <TDLINE>tdline3</TDLINE>
             </E1EDKT2>
          </E1EDKT1>
       </IDOC>
    </ORDERS05>
    must result in :
    <?xml version="1.0" encoding="UTF-8"?>
    <TCD>
         <TCT>
              <TDID>ZALO</TDID>
              <TDSPRAS>tdspras1</TDSPRAS>
              <TDLINE>tdline11</TDLINE>
         </TCT>
         <TCT>
              <TDID>ZALO</TDID>
              <TDSPRAS>tdspras1</TDSPRAS>
              <TDLINE>tdline12</TDLINE>
         </TCT>
         <TCT>
              <TDID>ZALO</TDID>
              <TDSPRAS>tdspras3</TDSPRAS>
              <TDLINE>tdline3</TDLINE>
         </TCT>
    </TCD>
    Thanks in advance,
    Laurence

    Hi,
    When implementing your solution, I get only 1 TCT per E1EDKT01 (and no more loop on E1EDKT02) and filter on "ZALO" TDID is not working.
    <TCT>
         <TDID>ZALO</TDID>
         <TDSPRAS>tdspras1</TDSPRAS>
         <TDLINE>tdline11</TDLINE>
    </TCT>
    <TCT>
         <TDID>unused</TDID>
         <TDSPRAS>tdspras2</TDSPRAS>
         <TDLINE>tdline2</TDLINE>
    </TCT>
    <TCT>
         <TDID>ZALO</TDID>
         <TDSPRAS>tdspras3</TDSPRAS>
         <TDLINE>tdline3</TDLINE>
    </TCT>
    I have changed context of TDID to ORDERS05, and context of E1EDKT2 to ORDERS05 too.  Aren't thoses contexts correct?
    Laurence

  • Context Mapping: child-nodes of non-mapped parent nodes

    I am somewhat curious about Context Mapping in WebDynpro.
    Which parents nodes need to be mapped in order to map child nodes ? Does a child node has more than one parent node (e.g. grandparent - two steps above) ?
    A.1  -
    MAPPED----
    >    B.1
      - A1.1   NOT MAPPED
      - A1.2   NOT MAPPED
            - A.1.2.1     MAPPED TO>    B.1.2.4
            - A.1.2.2   NOT MAPPED
      - A1.3   NOT MAPPED
    Is it sufficient that only one of these parent nodes (e.g. direct parent node not mapped, but parent node of this parent node is mapped) need to be mapped so that the child node can be mapped ?
    Is this assumption true or not ?
    The SAP library states:
    "Conversely, child nodes of non-mapped parent nodes cannot be mapped, otherwise this would result in irresolvable conflicts at runtime with respect to the parent-child relation in the context and the mapping relation." (http://help.sap.com/saphelp_nw04/helpdata/de/51/a3384162316532e10000000a1550b0/content.htm)
    This statement is not absolutely clear on this issue.

    Let me put it this way
    You have a node vehicle and you have a child node for that the car. The car node have parameters car1, car2.
    Let the vehicle node have parameters veh1 and veh2
    Then if you map vehicle node one to any other node (say in the comp. controller) you have the option of mapping its children i.e veh1,veh2 and carnode.
    You can have that veh1 is mapped and veh2 is not mapped.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car node(may or may not be mapped)
    If instead you try to map only the car node the vehicle node will also get mapped automatically but not it's child parameters like veh1 and veh2.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car nodemapped)
    car1(may or may not be mapped)
    car2(may or may not be mapped)
    Hope this would help.
    Do revert for further clarification
    Regards
    Noufal

  • Why does the attachement icon indicator (paper clip) only appear after the message is selected?

    In my inbox there should be an attachment indicator (paper clip) appearing on all messages that have an attachment, however, the icon only appears after the message is selected. So there is no way of knowing if a message contains an attachment without clicking on it. This is IMAP mail through Godaddy. thank you

    Is the mail set to synchronize or only download bodies when selected? My guess is the latter as the attachment forms part of the body so the header that is downloaded to form the mail list has no information about attachments. Hence Thunderbird becomes aware of an attachment once the body is downloaded.

  • Sent messages only appear in the sent folder after restarting Thunderbird

    Hi, my problem is that sent messages do not appear in the sent folder unless I restart Thunderbird. I have the sent 'copies' box de-checked as if not although it syncs I end up with two copies (of sent messages).
    I am using Thunderbird 31.2.0 on OSX Yosemite connecting via IMAP to ZOHO mail with STARTTLS on 587 for SMTP.
    Hope you can advise, I've tried SSL/TLS on 465 also and it is the same. It's a bit of an inconvenience not being able to view the sent messages.
    Many thanks

    Interesting to know (the RFC violation) but as you say, perhaps not relevant as such, although if ZOHO wasn't auto-placing a copy in sent then I could check the 'place a copy in' option and it would work ok.
    Anyhow, I tried your recommendations and yes, I use both an Android and an iPad to also check my mail but with both disconnected from Wi-Fi the problem still persists. There are a few warnings being reported in the TB error console on the Mac but they just relate to 'mso-table-lspace' for my INBOX.
    And for info in Thunderbird on my Ubuntu laptop the problem is exactly the same -
    'Place a copy' checked - Messages instantly appear in the sent folder but there are two copies.
    'Place a copy' de-checked/Cached connections = 5 - Messages only appear in the sent folder after restarting Thunderbird
    'Place a copy' de-checked/Cached connections = 1 - Messages appear in the sent folder on clicking out of the folder and back in.
    On Ubuntu there is nothing at all in the error console.
    I can work with how things are at this stage as I don't live in the sent folder (rather the inbox), and when you click into it (with the connections cache at 1) the messages do appear, so I suppose that's actually ok.

  • Parent values should be enter into child table in 11g adf

    HI ALL,
    i' m using oracle 9i with 11g adf jdeveloper.
    I have one parent table and child table respectively . I'm display both the parent and child table in one jsf page.Some fields/records in child table have same as in parent table.so when we enter values in parent fields the child table value should be placed.
    Ex:
    PARENT TABLE
    ID
    NAME
    LOC
    SAL
    DEPART
    COMP
    CHILD TABLE
    CID
    PID
    CNAME
    LOC
    SAL
    DEPART
    CNO
    CPNR
    LOC,SAL and DEPART are common fields in both tables
    I display all the feilds in parent table , but i won't display LOC,SAL and DEPART field from Child table . Now i when i fill value in fields and fire submit . the values of LOC,SAL and DEPART parent table values should be enter in child table fields
    Thanks in advance.

    Create a custom Application Module method and expose it to the AM client interface. In it set the child VO attributes from the parent VO and submit. Bind this custom method to your Submit in the ViewController and call it from a backing bean.
    Regards,
    Nick

  • Message mapping crashes only in INterface Mapping

    hi guys,
    i have an issue with one of my interface mapping. the message mapping crashes when i run the interface mapping. however when i run the message mapping separately it works fine.
    any hints?
    thanks,
    ali.

    Hi Ali,
    If you are using try catch then in case of catch condition if you pass null to substring it will fail.. Either you call the substring inside your udf (so that you can make sure that the filename is available then only substring is called) else handle the null condition in message mapping before calling substring...
    Also you can try looking into the display queue entry for substring in Message Mapping for further analysis. Here also you will not get any filename by dynamic configuration, but i am not sure why it was not failing there.. May be display queue will help you.
    Regards
    Suraj

  • Fastest way to find parents with only one child?

    I have two very large tables (both >6 million rows) in an oracle 8i DB. They have a parent child relationship and I would like to construct a query to give me the parents that have only one child......syntactically, what's the best way to construct this query?
    I was going to try:
    select join_id
    FROM parent
    where join_id in (select join_id, count(join_id)
    FROM child
    group by join_id
    having count(*)=1)
    but then I realized that the subselect has two columns to return and the primary query is only expecting one column, so this will not work.
    I suspect there's a quick and dirty way to find out what parents have only one child....
    I thought of using rowid's but am not sure this is the best way and in the example below I tried, I'm having problems b/c of functions not being allowed in the where clause.....
    select join_id
    from child d
    where rowid in (select min(rowid)
              FROM child s
              WHERE min(d.rowid)=max(s.rowid)
              AND s.join_id=d.join_id))
    Any thoughts?

    The two tables are order_header and order_detail. The order_header carries order specific information and the detail contains item specific information.
    So if you had ordered three separate products, you would have:
    one row in the order_header table (parent)
    and three rows in the order_detail table (child)
    They are linked by order_number.
    I presented the problem this way to make it more accessible to more posters.....;)
    One possible solution that I've thought of for my problem is this:
    select join_id
    from child_table d
    where (d.rowid, d.rowid) IN (select min(rowid) MIN_ROW
                   ,max(rowid) MAX_ROW
                   FROM child_table
                   WHERE s.str_order_number=d.str_order_number
                   AND s.date>='30-JAN-2005'
                   AND s.date<='31-JAN-2005'))
    I think this might work because I think that we can safely assume that if the minimum rowid and the maximum rowid (with the same join_id ) are the same then there is only one child record.....is this logic correct?

Maybe you are looking for

  • Material master error in sales order??/

    Hi SAP gurus While creating sales order after copying the standard material from IDES its giving a error message ""material not determined for sales organization 1000, dist ch 10,language DE"" PLz provide the solution for the same

  • How many application servers do I need??

    Does anyone know at what point i would need to consider using two application servers instead of just the one?? Is it based on number of users?? Is it based on hardware spec?? or both Thanks G.

  • Instalation error in premiere cs4

    Hello, I had adobe premiere cs3 since à long time, and this week, I upgrade my pc to windows 7.  I installed cs3 it with sucess. After, I saw that premiere CS4 was better for 7, so I download the trial. But, when I install it, I had an error message

  • Calendar Publishes but ToDo items do not

    Hello, I've been successful at publishing my calendar and allowing subscribers to view it. But when I allow the publishing of to-do items they will not show up on the other user's to-do list. Is there something I'm missing? I've allowed todo items to

  • Simple crop and the file size triples

    Good day, I'm trying to figure out why a video encoded using AME comes out with a much bigger file size than the original. Even if all I'm doing is using it to trim the source file. No change in settings, bit rate, dimensions etc. In the current exam