Node Function help required in XML message mapping !!

Hi Brilliants,
Source Message
    <ROOT>               0..1   
      <OUTPUT>          0..n
         <Group_N1>           0..n     <Header>
            <H02_N1_DTM>                           0..1
      DTM_Y2K_DATE     0..1
         <Group_LIN>          0..n                <Lin Item>
     <Group_ZA>          0..n
          <D02_ZA>     0..n
      </OUTPUT>
</ROOT>
The above Source <OUTPUT> tag comes 2 times. In this two time, Header comes once per header and more than 50 times Lin item occurs.
Target Message
ProductActivityNotification                                                            0..n
     ProductActivity                                                       1..1
          Item                                                       1..unbound  (Lin Item level on target side)
             SalesTimeSeries                  0..1
                      Item                                           1..unbound
                    ValidityPeriod              1..1
                    StartDate              0..1
                    EndDate              0..1
The above source message Lin item, whatever the times it replicates, the same number of times u201CItemu201D tag has to occur and DTM_Y2K_DATE value has to pass to StartDate.
Could anybody please put your valuable idea on this? I suppose to deliver this interface tomorrow.
I will highly appreciate your intellectual ability.
Many Thanks in Advance
Kind Regards
San

HI San,
Based on your this post, i think u want like this way...
How many times from source  DTM_Y2K_DATE  or <LinItem>(because DTM_Y2K_DATE   in LinItem ) occurs that many of <Item> in target is required rt??
Then u map like,
DTM_Y2K_DATE  (Change context to LineItem(right clich and choose context)) and map  to LineItem of target.
and also now map directly from DTM_Y2K_DATE  to Start Date(Dont change any context now..)
If still nt clear do post..
Babu

Similar Messages

  • XML message mapping considering idoc message variant

    Dear Experts,
    I am very new to PI. I am working on a scenario where I need to map VGON_OUT xml message from SNC system to ORDRSP.ORDERS05 inbound idoc of ECC 6.0 system.
    The issue is :
    In the inbound partner profile in ECC there are two ordersp message types. one with message variant SMI and another without any message variant.
    Both of them are using different process codes for processing.
    So my question is how to map the VGON_out xml message in PI?
    Please note: the key difference is the idoc message variant.
    There is no way to merge both of these message types as their function is serving two different purposes.
    I have attached the xml file and the screenshot of the partner profile here.
    Any suggestion or reference link or document would be deeply appreciated.
    Thanks in advance.
    Praty

    Hi Pratyusa,
    Did you try with different partner profiles for each ORDRSP?
    Regards,
    Krupa

  • Help required on XML format for Sourcing system

    Hi All,
    We are Integrating PI with SAP Sourcing and Sourcing is expecting the XML in below structure.
    XML Required by the target system:
    <?xml version="1.0" encoding="UTF-8"?>
    <sapesourcing defaultlanguage="" xsi:noNamespaceSchemaLocation="Locations.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <objects>
    <object classname="">
                <fields>
    Field1....n
                </fields>
            </object>
          </objects>
    </sapesourcing>
    I have converted the XML in to XSD and imported in to PI, but I have no idea how to Populate the tag as it required by Sourcing system
    tag must be required by sourcing system is:
    "<sapesourcing defaultlanguage="" xsi:noNamespaceSchemaLocation="Locations.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    Mapping generates below tag :
    <?xml version="1.0" encoding="UTF-8"?>
    <sapesourcing defaultlanguage="">  ........
    Regards,
    Mani

    Hi Mani,
    Try to add the xml tag using XSLT mapping.  Go through with the below link.
    add Namespace in message mapping | SCN
    Thanks,
    Satish.

  • Regarding nodes shown in red colour in message mapping under test (tab)

    hi all.
    i just want to confrom one thing.
    i just created a file to rfc scenario and when i was tested and look in sxmb_moni its showing like the message was sucess but when i ltested in message mapping in design there were some nodes in sender Message type which were displayed in red colour.
    and when i look in runtime workbench the message is showing like system error.
    so can you guys tell me what could be the reason for this.
    waiting for your response.
    bye.
    regards.
    seeta ram.

    hi rinku .
    i think you havent understand my problem.
    here the message in moni was showing as succes but when i tested the same message which was in moni in message mapping (design) there were some nodes which were in red colour and these nodes are not populated to reciever message type  .but it was in sxmb_moni with all the nodes .
    what could be the reason for this.
    can u tell me fast and i case if u still havent understand the Q u can ask me.
    waiting for your response.
    bye.
    regards.
    seeta ram.

  • XML message mapping issue!!

    Hi ipbuff,
    Many Thanks for your very quick reply. I have tried the way what explain, but not working . I am attaching both the structures, please guys throw your valuable openions and technical ways how to resolve this. I have 5 segments in Header, more than Lin item repeats more than 50 times. How do I map DTM Segment, <DTM_Y2K_DATE>20100531</DTM_Y2K_DATE> value for all target side node <ProductActivityNotification>ProductActitvity>Item>SalesTimeSeries>Item>Validate-->StartDate field.
    This filed generates the same amount of lIn item generates.
    Please your quick response.
    I will really appreciate your quick and positive response.
    http://img837.imageshack.us/img837/7786/mappinghelp.jpg
    Many Thanks
    Kind Regars
    San

    Hi Sandhya,
    I have 5 segments in Header, more than Lin item repeats more than 50 times. How do I map DTM Segment, <DTM_Y2K_DATE>20100531</DTM_Y2K_DATE> value for all target side node <ProductActivityNotification>ProductActitvity>Item>SalesTimeSeries>Item>Validate-->StartDate field
    Upto my understanding, u want to map <DTM_Y2K_DATE>20100531</DTM_Y2K_DATE> to StartDate(as above mentioned path).
    Since u have 50 occurences for <DTM_Y2K_DATE>20100531</DTM_Y2K_DATE> parent node, but in target its not..... am i rt?
    If yes..
    Map from <DTM_Y2K_DATE>20100531</DTM_Y2K_DATE> to StartDate, and u also add a node function collapse contexts.
    Collapse context will give the very first value in every context.
    <DTM_Y2K_DATE>20100531</DTM_Y2K_DATE> > Collapse Context>StartDate.
    I think this should solve ur problem.
    If still not let us know...
    Babu

  • Help required in xml to xml Mapping

    Hi guys,
    While performing mapping between two message types, where my input message type looks like..
    <?xml version="1.0" encoding="UTF-8"?>
    <DATA>
    <FNAME>
    <LNAME>
    <DATA>
    and I'm using both the FNAME and LNAME nodes in the output file.
    Here If I'm giving the input file format as...
    <?xml version="1.0" encoding="UTF-8"?>
    <DATA>
    <FNAME>Varun</FNAME>
    <DATA>
    This is without the LNAME tag...
    I want to know, how can I assign a blank value to my output file structure for this particular tag???
    I tried using a custom mapping with the code written below, but it didn't work
    public String matchFields(String a,Container container){
       //write your code here
    String output;
    if(a""l)
    output = "";     
    else
    output = a;
    return output;
    Please help me on this guys....Plzzz
    Regards
    Varun

    Hi,
    use it like this if Fname equals constnat[space] then pass the Constant[space] to Fname else value of Fname as under
    ................................Constant[]------>
    FNAME.............................................Then
    >Equals....................................IF -
    >FNAME
    Constant[].........................................ELSE
    .......................................FNAME---->   
    Constant[]    = Constant [ Space ]
    Sachin

  • Add new nodes to IDoc in IDoc-XML Schema Mapping with Java

    Hello everyone, I'm not very sure if this is the right forum but I have a problem and I haven't being able to find the answer, my scenario is as follows:
    -First of all our system characteristics: SAP ECC 6.0, SAP BASIS 700, PI BASIS 2005-1-700 and SAP APPL 600
    -We are in Mexico and we are creating our own billing documents with digital signature and a digital certificate in XML format according to SAP Note 1303712 and all derived notes.
    -Our actual schema is working fine: We generate our IDocs (one for SD and one for FI) in SAP and we send them to PI XI to be parsed by a JAVA program and then converted to XML.
    Now we have the requirement to add new nodes (I might be wrong in the term, feel free to correct me) to the IDoc, it sounds very simple but I have only experience with ABAP  and no experience with PI, also it's working only on our production landscape, so if I don't do it right it could be very dangerous.
    I have already read the following notes that might help me: 1321680 and 1318342 but their configuration is just in the aplication server and don't mention anything about PI or the Java program.
    So, if any one could provide me some kind of guide or important aspects that I should take care (like mapping, structures, etc) to enhance IDocs for this schema i would be very grateful.
    I hope this post were clear enough, if it is not also feel free to ask me to clarify or provide more information.
    Kind Regards
    Omar

    Hi Omar,
    Since the structure of the IDoc is changing (adding a new node), you would need to do the following in PI:
    1) Reimport the IDoc in ESR/IR of PI.
    2) Change the mapping/transformation logic in the mapping parser defined. If it is a Java code, you would need to reimport it in the ESR/IR. Use link below to understand more on jave mapping.
    http://wiki.sdn.sap.com/wiki/display/XI/BeginnersguidetoJavamappingusingDOMparserinSAPXI
    3) Delete the IDoc cache using transaction IDX2, after the IDoc is reimported.
    Regards,
    Sanjeev.

  • Need to create two nodes based on one condition in message mapping.

    Hi Experts,
                    In my mapping I have two different nodes. If my condition is true then only one node should be created otherwise both the nodes should be created.
    requirement is I need to print. one header before first item record and after every 200 item records.
    i.e I need to create header node if (item recordno) is 1 or (item recordno % 200) is 1. I have tried using this condition. But Iam getting all the header records( 3 headers for 600 items) in sequece and then all  item records (600).
    i want 1 header then 200 items , then again header followed by 200 items. so on.
    Can any body help.
    Thanks&Regards,
    REYAZ HUSSAIN

    Hi REYAZ HUSSAIN,
    as graphical mapping is "target field mapping" this is not possible. The parser for graphical mapping traverses the taget message from the first element to the last!
    You need another kind (ABAP, XSLT, JAVA) of mapping.
    Regards Mario

  • Help required on XSLT Conditional Mapping

    Hi,
    We need help on XSLT mapping in BPEL based on a condition. We are transforming from OAG format to a client specific format. We need to map a single tag (but repetitive) on the left hand side (OAG) to different tags on the right hand side. The same tag on the left hand side repeats with different values. Depending on the value the mapping to the right hand side varies. The left hand side (OAG) looks something like this.
    <PARTNER>
    <PARTNRID>2002</PARTNRID>
    <PARTNRTYPE>Supplier</PARTNRTYPE>
    <ADDRESS>
    <ADDRLINE index="1">2000 Century Way</ADDRLINE>
    </ADDRESS>
    </PARTNER>
    <PARTNER>
    <PARTNRID>204</PARTNRID>
    <PARTNRTYPE>BillTo</PARTNRTYPE>
    <ADDRESS>
    <ADDRLINE index="1">90 Fifth Avenue</ADDRLINE>
    </ADDRESS>
    </PARTNER>
    Please note that the tag PARTNER and it's underlying tags appear twice in the XML file.
    Based on the value in the tag PARTNRTYPE, the mapping to the right hand side differs. If the value is 2002, PARTNRID should map to Supplier ID on the right hand side and if the value is 24, PARTNRID should map to BillTo ID on the right hand side. The right hand side should look something like
    <Supplier>
    <SupplierID>2002</SupplierID>
    <Address>2000 Century Way</Address>
    </Supplier>
    <BillTo>
    <BillToID>204</BillToID>
    <Address>90 Fifth Avenue</Address>
    </BillTo>
    Please let us know how to achieve this. Your help is much appreciated. Thanks in advance.
    Thanks,
    Prasanna

    Hi Prasanna ,
    I am not an expert but what about this:
    <SUPPLIERID>
      <xsl:value-of select="/PARTNER/PARTNRID[../PARTNRTYPE = '2002']"/>
    </SUPPLIERID>
    <BILLTOID>
      <xsl:value-of select="/PARTNER/PARTNRID[../PARTNRTYPE = '24']"/>
    </BILLTOID>or
    <xsl:choose>
      <xsl:when test="/PARTNER/PARTNRTYPE = '2002'">
        <SUPPLIERID>
          <xsl:value-of select="/PARTNER/PARTNRID"/>
        </SUPPLIERID>
      </xsl:when>
    </xsl:choose>
    <xsl:choose>
      <xsl:when test="/PARTNER/PARTNRTYPE = '24'">
        <BILLTOID>
          <xsl:value-of select="/PARTNER/PARTNRID"/>
        </BILLTOID>
      </xsl:when>
    </xsl:choose>Regards Pete

  • Urgent help required for sms messages

    i need help urgently...i havea legal case comming up shortly and need my sms messages from my old lawyer off my phone for the court. as they will be evidence, and i cannot find a way to do this i need them on to a sim. how do i do this please. i do not have BIS service so i cannot send them like that....Help please thanks

    I haven't figured out how to get them onto your SIM card yet - but it may be a good idea for you to "back them up" by marking them all "saved." They would then be more secure
    Phil

  • MM functional help required

    Hi Experts,                
    I have to develop a report  the description given like this:
    <b>Parts that leave BOM and have an L - Item Category               
    Any part that rolls a rev and is a material type - ROH; HALB or FERT               
    Any assembly that uses any part in item 1 or 2 with a disposition of Scrap or re-work for that part</b>
    the initial screen contains
    Plant
    Material          to     
    Disposition                Options - U; S; R; D; C; T
    Cost of Re-work               
    the output should be in the format
    Derived      Material    Matl Descrpn     Plant      Disposition     Cost/Re-wrk Cost     POs Qty     Material at Vendor     Stock     Consigned to customer     W.O. Qty     Total Cost
    the standard transactions Cs15 and QS51 need to used for the logic.
    Can anyone explain me the flow/logic?

    Hi Alekya,
    In this forum you can get small doubts cleared .
    You cannot expect someone to explain logic for the functional spec.
    (and one cannot explain also through this forum)
    Better you can discuss with your MM functional consulatnt who has given this spec and code according to the requirement.
    Hope you dont misunderstand.
    regards,
    Guru

  • Advance aggreate function: help required

    Hi All, Pls help me in solving the below requirement
    Sample Data:
    F1 F2 F3
    [email protected] A 1
    [email protected] B 1
    [email protected] A 2
    [email protected] A 1
    Unique combination of F2 & F3 to be treated as a account.
    Need to find the total accounts related to the domain along
    with Unique emailID's and the accounts related to each email.
    Required Output:
    o1 o2 o3 o4
    d1.com [email protected] 3 2
    d1.com [email protected] 3 1
    d1.com [email protected] 3 1
    o1: Domain
    o2: Unique email ID's in the Domain
    o3: Unique accounts accessible by Domain
    o4: Unique accounts accessible by Email
    I'm able to get o1, o2 & o4 with the following sql
    SELECT a.domain, a.F1, COUNT (a.rnum)
    FROM (SELECT UNIQUE ROWNUM rnum,
    SUBSTR (TRIM (F1),
    INSTR (TRIM (F1), '@') + 1
    ) AS domain,
    F1, F2, F3
    FROM tab1
    WHERE F1 LIKE '%d1.com%') a
    GROUP BY a.domain, a.F1
    Pls help me in completing this sql for the required output.
    Thanks :-)

    What version/edition of Oracle are you using? Can you use analytics?
    SELECT a.domain, a.F1, COUNT (a.rnum),
    count(a.domain) over (partition by a.domain) domain_count
    FROM (SELECT UNIQUE ROWNUM rnum,
    SUBSTR (TRIM (F1),
    INSTR (TRIM (F1), '@') + 1
    ) AS domain,
    F1, F2, F3
    FROM tab1
    WHERE F1 LIKE '%d1.com%') a
    GROUP BY a.domain, a.F1;
    DOMAIN               F1                   COUNT(A.RNUM) DOMAIN_COUNT
    d1.com               [email protected]                    2            3
    d1.com               [email protected]                    1            3
    d1.com               [email protected]                    1            3

  • Functional Help required

    Hi,
          can any one tell me the link where i can find the details of fields in the data base table?
    for example, in VBAK table whats VBELN? where it is used? in which module?
    My client just says material number, posting date, fiscal year etc...
    i need to find the table and corresponding field
    Thanks in advance,
    Niyaz

    Hi,
    Please check this link for SD tables and relationship perhaps it may help.
    http://www.erpgenie.com/abap/tables_sd.htm
    You can also go to transaction SE11 to find data type VBELN where being used in table fiels, program, function module, etc (CTRLSHIFTF3).
    Regards,
    Ferry Lianto

  • Help required to put message to a queue running on different machine.

    Hi,
    I need to put a message to a queue which is on Queue manager running at different server. What I have are name of queue manager, name of queue and message to be put on the queue.
    Can you please help me as I m new to this area.
    Thanks alot.
    Omesh

    Your question is not about scripting. It is about how to use a third party system utility.  Post your questions here:
    http://forum.sysinternals.com/miscellaneous-utilities_forum11.html
    ¯\_(ツ)_/¯

  • Help required on Brodcast messages to logged on users in Portal- Weblogs

    Hi All
    The link to the weblog is
    Brodcast messages to logged on users in Portal(Part1)
    My doubts is
    1) Whenever user refreshes his/her page the popup gets displayed.
    User might get irritated everytime he will referesh the page.
    2) When does the data stored in container destroys?
    Please comment
    Points will be rewarded.
    Regards
    Sonal Mangla

    Hi Sonal,
    Did you find a solution yet ?
    I'm also interested.
    Regards,
    H. Cakir

Maybe you are looking for