Graphical Mapping Help

Hi
I am trying to sort idoc segments based on values like below. I have written XSLT before which just broken after applying SPs. i need a break fix immediately before SAP look into the SP issue.
Now i am leaning towards graphical map. Please help with this
Sample Structure
<E1EDL37>
<EX1DV>0000000000101</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000102</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000103</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000104</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000201</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000202</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000203</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000204</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000200</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000201</EXIDV>
<EXIDV>0000000000202</EXIDV>
<EXIDV>0000000000203</EXIDV>
<EXIDV>0000000000204</EXIDV>
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000100</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000101</EXIDV>
<EXIDV>0000000000102</EXIDV>
<EXIDV>0000000000103</EXIDV>
<EXIDV>0000000000104</EXIDV>
</E1EDL37>
Here is the output i am looking for
<E1EDL37>
<EXIDV>0000000000100</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000101</EXIDV>
<EXIDV>0000000000102</EXIDV>
<EXIDV>0000000000103</EXIDV>
<EXIDV>0000000000104</EXIDV>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000101</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000102</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000103</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000104</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000200</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000201</EXIDV>
<EXIDV>0000000000202</EXIDV>
<EXIDV>0000000000203</EXIDV>
<EXIDV>0000000000204</EXIDV>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000201</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000202</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000203</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000204</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>

Hello,
This can be done using graphical mapping and without udf. See mapping below:
Legend: rc = removeContext, sBV = splitByValue :EV = eachValue :VC = ValueChanged, mWd = mapWithDefault
fBe = formatByExample
For E1EDL37
E1EDL37 -> E1EDL37
For EX1DV
EX1DV -> rC -> sort:ascending -> sBV:EV -> EX1DV
For VHILM
EX1DV -> rC -> sortByKey:ascending -> sBV:EV -> VHILM
VHILM -> rC -> /
Now for the fun part
For E1EDL44
                      EX1DV -> UseOneAsMany (2,3) -> rC -> sortByKey:ascending -----> fBE -> equalsS: -> not -> ifWithoutElse (output of fBE is mapped to then) -> E1EDL44
EXIDV(setContextTo E1EDL37) -> mWd: -> /                                                / Constant: /
                      EX1DV -> UseOneAsMany (2,3) -> rC -> sort:ascending -> sBV:VC -> /
EXIDV(setContextTo E1EDL37) -> mWd: -> /
For EXIDV
                          EX1DV -> UseOneAsMany (2,3) -> rC -> sortByKey:ascending -----> fBE -> equalsS: -> not -> ifWithoutElse (output of fBE is mapped to then) -> sBV:EV -> EXIDV
EXIDV(setContextTo E1EDL37) -> mWd: -> /                                                / Constant: /
                      EX1DV -> UseOneAsMany (2,3) -> rC -> sort:ascending -> sBV:VC -> /
EXIDV(setContextTo E1EDL37) -> mWd: -> /
Hope this helps,
Mark

Similar Messages

  • Help in graphical mapping needed

    Hi,
    i have a graphical mapping where the scenario is that in input we have the following structure
    header0
    header1----
    occurances 1-unbounded
    header2----
    occurances  1-2
    in the output i have to get the below structure
    header0
    header1----
    occurances 1-unbounded
        |--header2---occurances 1-2
    So i have done a one onone mapping
    if my inp xml is like the one given below it works
    <header0>
    <value1>099</value>
    </header0>
    <header1>
    <value1>09</value>
    </header1>
    <header2>
    <value1>hjjd</value>
    </header2>
    <header2>
    <value1>094f9</value>
    </header2>
    But if the input is like the one given below its not working
    <header0>
    <value1>099</value>
    </header0>
    <header1>
    <value1>09</value>
    </header1>
    <header2>
    <value1>hjjd</value>
    </header2>
    <header2>
    <value1>094f9</value>
    </header2>
    <header1>
    <value1>09769</value>
    </header1>
    <header2>
    <value1>09469</value>
    </header2>
    i.e., if header1 repeats its not working can anyone help me in this issue
    Thanks in advance,
    Bhargav.

    Hey Rajeev,
    i had activated it and i can also see that in my message mapping.but still its not working.
    Hey raj,
    As suggested by you i have used splitbyvalue in between header1 in source and header1 in target than the output that was generated is diferrent from that i wanted.The output it generated is
    <header0>
    <value1>099</value>
    </header0>
    <header1>
    <value1>09</value>
    </header1>
    <header2>
    <value1>hjjd</value>
    </header2>
    <header2>
    <value1>094f9</value>
    </header2>
    <header2>
    <value1>09469</value>
    </header2>
    but the actual output to be generated should be as gievn in the topmost post.here the header2 under the second header1 is coming under the first header1 only and the second ocurance of header1 is not replicating in the output.
    Thanks,
    Bhargav

  • Help needed for Graphical mapping.Tag only once produces

    Hello experts,
    I have a problem in my graphical mapping.This is the example:
    from each segment A in IDOC has to be made Tag A or Tag B in output XML.
    Segment A has a field USER_STATUS and if it is X than Tag B has to be made otherwise Tag A.
    Segment A is 0..9999999. occurence
    Tag A  0..unbounded
    Tag B 0..unbounded.
    I made a mapping
    mapping for Tag A:
    USER_STATUS -> mapwith default(empty)->length->EqualsA (with Constant =0)-> createif->Tag A
    for Tag B as following:
    USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)-> createif->Tag B
    The problem is that in output XML, I have only one Tag A or B (depending on field USER_STATUS in first occurence of the segment) while in inbound IDOC 5 segments are with different value of the field: USER_STATUS.
    Does anyone idea to solve this problem!
    Thank you very much for your effort.
    King regards,
    Danijela Zivanovic

    HI,
    CAn you try this way,
    Use Maping Node UseOneAsMany for Tag B
    and pass 3 inputs as
    Constant[]----
    >
    USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)----
    >
    USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)----
    >
    Same way try for Tag A also.
    Thanks
    Swarup

  • Graphical Mapping Vs XSLT mapping Vs Java Mapping Vs ABAP Mapping

    Hi Experts,
              I have a question regarding different message mapping options available in XI namely
    Graphical Mapping
    XSLT mapping
    Java Mapping
    ABAP Mapping
    Q1: Which amoung the above mappings is the best and why?
    Q2: On what cases Graphical, XSLT, Java and ABAP Mapping should be used?
    Q3: Is it true that graphical and XSLT mappings are converted into Java class internally?
    Kindly help!
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi,
    There is no hard and fast rule for using the mapping techniques.
    Graphical Mapping is used for simple mapping cases. When, the logic for your mapping is simple and straight forward and it does not involve mult hiearchical mapping requirement. and context handling.
    Java and XSLT mapping are used when graphical mapping cannot help you.
    When the choice is between Java And XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks.  XSLT can lead to a bad perfrormance if the Source XML is huge.
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but , DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exaclty easy to develop either.
    For further info on each of the mapping, refer to these links,
    Graphical Mapping,
    http://help.sap.com/saphelp_nw04/helpdata/en/6d/aadd3e6ecb1f39e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    XSLT Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    http://www.w3.org/TR/xslt20/
    Java Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    DOM parser API
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
    Also, check this thread for more info,
    Different types of Mapping in XI
    Am not sure about XSLT , but , yes graphical mapping is converted into java classes internally and these classes use SAX parsing as well.
    Regards,
    Bhavesh

  • How to use  Advance java function in graphical mapping in XI 2.0?

    Hi,
    currently I am using a simple java function to make an RFC call to R3 system.
    I want to avoid making connection for each lookup. Instead I want to make a single connection for whole message queue and get the corresponding values in some array or container object.
    please suggest a solution.
    I think this is possible using Advance java function, but I am not able to find any example on using Advance java function at help.sap.com.
    thaks in advance.

    Hi!!!
    I'm not sure if I understood you well.
    Do you want to preload some data into your structures in the memory and keep them there so you don't need to make a new connection during processing the whole message or every message?
    In my opinion you can cache some data during processing a message, but it's impossible to cache some data between processing messages.
    If you write your java mapping or you use graphical mapping (even with user-defined function), then you have a java class. The problem is that XI 2.0 reloads this class during processing every message, so even if you load some data from your data source into your structures in the memory, this data will be lost after reloading your mapping class.
    Regards,
    Andrzej Filusz

  • Is it possible to replace  XSLT mapping in place of Graphical mapping

    Is it possible to do XSLT mapping in place of Graphical mapping, in any normal scenario?
    Means the fuctionality we do by using Graphical mapping(like the operations by using node functions etc...) could possible to do with XSLT Mapping?

    HI
    yes it is possible to replace the graphical mapping with the XSLT mapping.
    But using XSLTs degrade the performance of the interface and moreover they are not easily maintainable.
    Refer the below links for assistance on XSLT Mapping:
    XSLT MAPPING:
    Generic XSLT Mapping for SAP XI,Part I
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    Generic XSLT Mapping for SAP XI,Part II
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    XSLT: Recursive Templates
    XSLT: Recursive Templates
    Easy RFC lookup from XSLT mappings using a Java helper class
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
    Step u2013 By u2013 Step Simple Approach for XSLT Mapping
    Step – By – Step Simple Approach for XSLT Mapping
    http://www.devguru.com/Technologies/xslt/quickref/xslt_element_applytemplates.html
    XSLT Mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
    xpath functions in xslt mapping
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=xslt+mapping&adv=false&sortby=cm_rnd_rankvalue#
    Using XSLT mapping in a ccBPM scenario
    File to Multiple IDocs (XSLT Mapping)
    Comparsion of Different mappings:
    Comparing Performance of Mapping Programs
    Complete mapping guide url:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    cheers

  • How to debug global values in UDF in a graphical mapping

    Hi Every one,
    I  got a situation in PI where i have to use global values in graphical mapping UDF.
    I can't able to get the values in "Display Queue " option.
    Can you please tell me what is the best way of debugging global variable in graphical mapping UDF.
    1. I declare one array list in the global values
    2. store some values using another UDF to the arraylist.
    3. I am traversing the values in the arraylist, but the values are not showing in "Display Queue".
    What is the solution to this.

    Did you try with trace.addInfo?
    https://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/AbstractTrace.html
    Sample code for the setMail UDF (Carrier B2B) - Business Process Expert - SCN Wiki

  • Graphic Mapping:IDOC to File-Avoid Error in Adapter Engine

    Hi all,
    I'm using Graphic Mapping in my IDOC to File scenario in which each segment in source IDOC will generate a ROW in target File with the condition: DATBI >= currentdate (and some other conditions)
    I have a UDF and use the mapping function CREATEIF for this purpose:
                                 DATBI -> UDF -> CREATEIF -> ROW
    Problem scenario: In the source IDOC if all the segments have DATBI < currentdate then there is no ROW created, and I get the error in Adapter Engine
    Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure ...
    How can I avoid this?
    I've tried to put this condition using XPATH in Interface Determination and got the error.
    There is a way to use function current-date() in XPATH condition?
    Thanks for your help,
    Elaine

    Hi all,
    How can I "suppress the row node if condition fails"? I'm new in PI, so please give more details.
    My FCC as follows:
    Record Structure: Record, Row
    Row.addHeaderLine 0
    Row.fieldSeparator ,
    Record.fieldSeparator 'nl'
    Row.endSeparator ; 'nl'
    It works fine if the condition satisfied.
    In Message Mapping, I've use Test to double check my mapping, and in the scenario that conditions fails, there is no Row in the target message.
    Please advise.
    Thanks,
    Elaine

  • Create Attachment within Graphical Mapping using UDF

    Hi!
    We want to create an attachment witihn a graphical mapping using an UDF function.
    I use that function:
    public String addAttachment(String filename, String mimeType, String content, Container container) throws StreamTransformationException{
         BASE64Decoder decoder=new BASE64Decoder();
         try {
              GlobalContainer globalContainer = container.getGlobalContainer();
              OutputAttachments outputAttachments = globalContainer.getOutputAttachments();
              Attachment attachments = outputAttachments.create(filename, mimeType,decoder.decodeBuffer(content));
              outputAttachments.setAttachment(attachments);
              return "Adde1: "+filename;
         } catch (Exception e) {
              return e.toString();
    (SDN helped me much in creating that
    This function has no compiling errors, anything workes fine:
    It takes 3 input-parameters, see also: http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/OutputAttachments.html
    filename (ok, more or less contentID)
    mimeType (more or less contentType)
    content: Base64-encoded String which should be set as content
    In my sample I use the following constants for that function:
    filename = "fn1.txt"
    mimeType="application/xml"
    content = "UG9seWZvbiB6d2l0c2NoZXJuZCBhw59lbiBNw6R4Y2hlbnMgVsO2Z2VsIFLDvGJlbiwgSm9naHVydCB1bmQgUXVhcms=" --> cames directly from http://de.wikipedia.org/wiki/Base64
    When using the message, I got this error within SXMB_MONI:
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not queue receive for
    message 0022642d-b106-02df-8e8c-f41c243bd112(INBOUND). Reason: java.lang.NullPointerException: while trying to
    invoke the method com.sap.aii.af.sdk.xi.lang.Binary.getBytes() of an object returned from
    com.sap.aii.af.sdk.xi.mo.xmb.XMBPayload.getContent()</SAP:AdditionalText>
    This looks pretty much the same as Add Attachment from ABAP Mapping but this tread is also not answered.
    Adding attachment from PI level looks also in that direction, again, no answer.
    So, I was wondering if someone has solved such problem?

    Hi Divyesh!
    We did it that way:
    1. Choosing the XML-Mailstructure as Destination as described in Configuring the Receiver Mail Adapter - Advanced Adapter Engine - SAP Library -  Example (XI payload with mail package)
    2. now we have created a UDF for creating the "content"
    public void getContent(String[] text, String[] attFname, String[] attType, String[] attContent, ResultList result, Container container) throws StreamTransformationException{
    // vergleich ob alle att-Arrays selbe anzahl haben
    if (attFname.length!=attType.length || attFname.length!=attContent.length) {
        result.addValue(Integer.parseInt("Fehler: alle Attachment-Eingänge müssen die selbe Anzahl an Elementen haben!"));
        String CRLF = "\r\n";
        String output="This is a multi-part message in MIME format."+CRLF+CRLF+
        "--"+getBoundary(container)+CRLF+
        "Content-Type: text/plain; charset=UTF-8"+CRLF+
        "Content-Disposition: inline" + CRLF + CRLF +
        text[0]+CRLF;
    for (int i=0;i<attFname.length;i++) {
        output+="--"+getBoundary(container)+CRLF+
        "Content-Type: "+attType[i]+"; name="+((char)34)+attFname[i]+((char)34)+CRLF+
        "Content-Disposition: attachment; filename="+((char)34)+attFname[i]+((char)34)+CRLF+
        "Content-Transfer-Encoding: Base64"+CRLF+CRLF+attContent[i]+CRLF;
    output+="--"+getBoundary(container)+CRLF;
    result.addValue(output);
    This UDF is configured as "QUEUE"
    We have configured this input-structure
    The Content itself is allready base64.
    So we can call this mapping and it creates a Multipart-Mail for us.

  • ABAP mapping Vs Graphical mapping

    Hi
    I have an inbound scenario to R/3 where the purchase requisition has 300 line items. I was wondering if it is easier to do ABAP mapping for such scenarios instead of Graphical mapping as it would be better performace as ABAP mapping is executed on ABAP engine?
    I would appreciate valuable inputs.
    Thanks,
    Arjun.

    Hi Arjun
    As mentioned above in the comparison Blog between 2 mappings, i dont think it gives clear picture, if you have some specific work which getting Dynamic Configuration stuff for example, then you will have to Look for ABAP mapping Class, my thinking is that it depends completely on the requirment.
    For ABAP mapping you can go to
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    Let me know if you want any further clarifications
    Piyush
    Pl:reward points if found helpful.

  • How to delete target field in graphical mapping

    Hi all,
            i have a field called failedsubject in my target my requirement is if their is no value in this field then it has to be deleted means it should not be shown iam using graphical mapping. please help me
    thanks in advance

    Hi,
               Please try with the below logic.
    public String failedSubject(String sub1, String sub2, String sub3, Container container) throws StreamTransformationException{
    if (Integer.parseInt(sub1) >= 40)          //assuming 40 as passmark
              if (Integer.parseInt(sub2) >= 40)
         if (Integer.parseInt(sub3) >= 40)
               return false;
                          else
                                return true;
              else
                      return true;
    else
           return true;
    failedSubject---->ifWithoutElse-->failedSubject
    pass all subjects as input to the UDF.
    Regards
    Priyanka
    Edited by: priyanka.anagani on Sep 16, 2011 3:26 PM

  • Java code for Graphical Mapping

    Hi,
    I am new to the XI world.I read that when we do graphical mapping a java code is generated in the background.
    Can any one tell me how to access that code ?
    Any help would be appreciated.
    Thnx.

    hi,
    you can find it in the XI server folders
    have a look at my previous response:
    Re: Access to Java mapping code?
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Use RFC Lookup in Graphical Mapping for Database Update

    Hello,
    I am wondering whether the RFC Lookup function in graphical mapping provides the same functionality as a general RFC function call.
    In detail I would like to update a database table using a RFC which just takes some input parameters but does not use any output parameters. Would this work too as the name "lookup" implies that it might just be possible to read something?

    HI,
    Refer these links:
    RFC Lookup by michal
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
    DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    Regards,
    Nithiyanandam

  • Problem in  Graphical Mapping

    Hi all,
         i have a Graphical mapping logic here
    Source Structure:
    GS
    GP[1]
      F1-     QI
      SDQ
        F2-     2
    GP[2]
      F1-     QD
      SDQ
        F2-     3
    GP[3]
      F1-     PC
      CTP
        F2- 5.3
    GP[4]
      F1-     AI
      SDQ
        F2-     4
    GS
    Target structure:
          MT
         Material[1]
           Qty
         Material[2]
           Qty
         Material[3]
           Qty
         Material[4]
           Price
          MT
    Here the Material node  occurences is 0 to Unb.
    For values QI,QD and AI should be a seperate mapping ie) three nodes will be created.
    For values 'PC' seperate mapping ie. last node will be created only if F1 receives 'PC' beacause i need to implement the separate mapping logic for a value 'PC'.
    If i send the data sequence QI,QD,AI and PC  my mapping is working correctly.
          MT
         Material[1]
           Qty 2
         Material[2]
           Qty 3
         Material[3]
           Qty 4
         Material[4]
           Price 5.3
           MT
    But if i send the the data sequence QI,QD,PC and AI my mapping is not working properly for 'AI'. But for QI,QD and PC mapped correctly.
    Output:
          MT
         Material[1]
           Qty 2
         Material[2]
           Qty 3
         Material[4]
              Price 5.3
          MT
    Note: For Value 'AI' , target node Material[3] is completly ignored/not coming.
    We used createif function to create the target node in the target structure based on the value 'PC'.
    we think that once if mapping executed the value for 'PC', mapping for 'AI' is not executed i.e. it doesn't go back and execute the mapping for 'AI'.
    Can you please help me to solve this problem,
    Thanks and Regards
    Kamal

    Hi Kamal,
    I understand that your src is
    GS
    GP
    F1
    SDQ/CTP
    F2
    and depending on the value of F1 the target nodes has to be created.
    here, by using the createif, u can generate the nodes properly, but the problem arises when u have to get the corressponding values in the feild QTY of your target.
    in such a situation, writing a UDF would be better a better option.
    Thanks
    Hari.

  • Mapping Help/UDF needed.

    Hi my source looks something like this
    Recordset.      0-Unbounded.               
         Record           0-Unbounded
    Value1
    Value2
    DOCNO
    MatNo
    target
    =====
    MT_Target
    Recordset 0-Unb
    Header
    Val1
    Val2
    DOCNO
    Material 0-Unb
    Matno     
    Example Mapping
    =============
    Recordset.      .               
         Record           
    XXX
    YYY
    100
    01
         Record           
    XXX
    YYY
    100
    02
         Record           
    AAA
    ZZZ
    200
    22
         Record           
    AAA
    ZZZ
    200
    33
    Then My Target would be like
    MT_Target
    Recordset
    Header
    XXX
    YYY
    100
    Material
    01
    02
    Recordset
    Header
    AAA
    ZZZ
    200
    Material
    22
    33
    Please notice the Grouping of DOCNo and Corresponding material numbers
    So I am trying to group the Materials in the Target structure based on the DOCNO field. So all the materials falling under the same DocNo are listed  under that DOCNo,Like if Matno 01,02 fall under Docno 100 so they are listed Under DOCNO :100
    So if there are 3 DOCNo’s then we will have 3 Recordset in the target and each Recordset will have the corresponding MATNO for that DocNo. Hope u understand.
    Could anybody please help me out with this, I have tried using SplitByValue Changing and Collapse Conetxt, it works for the Header but not for the "Material" Node. Help needed, Points Guaranteed.

    John,
    DO you know the  DOCNO value before runtime? Will it have only values 100 and 200? If so, then it is easy to do this using graphical mapping.
    You need to evaluate the condition at recordset level in target.
    Have a look at this thread for evaluating the condition at root level
    Re: How to get access to sub-node elements with a UDF?
    If the value of DOCNO is unknown at design time, then it is better to handle the mapping using JAVA mapping.
    Regards,
    Jai Shankar

Maybe you are looking for

  • Larger font in executable than in source code

    The object to the left originates from the executable , and the object to the right is the same, but from the source code. It seems when I compile, LabVIEW 2013 converts from font size 14 to 15 in this front panel. I have never experienced anything s

  • Login / Location timeout?

    I just encountered the following situation which prompted what I think is a really good question. On my laptop, I have 3 locations set. Automatic (default) Home (Manually set up; lan uses 10.10.1.x) Office (Manually set up; lan uses 20.20.1.x) At hom

  • Word 2013 Crashes randomly

    Craziness ! This is such a random issue and has been such a pain that we actually reformatted the entire PC attempting to fix the problem. It has been ongoing for about 1.5 months now and we cannot seem to find a resolution. Below is a email from the

  • How do I Stop Automatic Purchases?

    How do I stop automatic purchases through my i tunes account?

  • Why is Flash Player constantly buffering

    When playing movies, the player is constantly buffering and taking ages to play the movie ??