Message Mapping Split Function Problem

Hi All,
Could somebody plz help me on this problem of splitting the messege:
Source Field:
-MATMAS
  -Idoc
     -EMARAM
       -MTART: 1,
                        2,
                        3
Target Required:
Based on the occurrence of  Mtart, the target Idoc should be generated:
-MATMAS
  -Idoc
     -EMARAM
       -MTART: 1
-MATMAS
  -Idoc
     -EMARAM
       -MTART: 2
-MATMAS
  -Idoc
     -EMARAM
       -MTART: 3.
Should I use a User-def function for the same or a split by value is sufficient.
I want to generate several idocs in my target if there are several Emaram segments in a single file in the source...!
Thanks & Regards,

Hi,
You cannot use Multi Mapping as you have the Idoc adapter on the inbound side. There is a work around though.
Use SAP note :  814393  and change the occurence of your IDOC from 1..1 to 0 to unbounded.
Your mapping requirement is notvery clear though. Can you give some more detail?
Regards,
Bhavesh

Similar Messages

  • Concern on Message Mapping - Concat function

    Hello Experts,
    We have a concern in our message mapping structure. The target field is "Sold-To id" at line level and source filed is "Customer No" which appears in the header node. We are using a series of concat functions while mapping these two fields. Now,  the issue is that the second concact function's input queue does not read all the values passed from the first concat function's output queue. We have checked their respective contexts but could not find the cause of this behaviour.
    Due to this the mappiing fails and the target field is not populated with the required values.
    Kindly advice.
    Thanks in advance,
    Elizabeth Jacob.

    Hi Elizabeth,
    You have
    1 KUNNR value
    2. VTWEG values
    2  SPART values
    And you wan two output to be generated (1 for each concatenated value of KUNNR, VTWEG and SPART). Is this right??
    If yes then use the node function useoneasmany with KUNNR, so that KUNNR get repeated twice(one for each value of VTWEG and SPART)
    Your mappign shoudl be like this
    KUNNR --------------------------------|
    VTWEG (context line)----------------| useoneasmany---------------------------------------| concat -----------------------------------| concat
    VTWEG( do not change context) --|                      VTWEG( do not change context) --|      SPART do not change context) --|
    Regards
    Suraj

  • Message Mapping Split

    Hi,
    following task is 2 high 4 me:
    <root>
       <fieldA/>
       <fieldB/>      optional
    </root>
    should be mapped to
    <root>
       <elm>
         <constant>A</constant>
         <value>A</value>
       </elm>
       <elm>
         <constant>B</constant>
         <value>B</value>
       </elm>
    </root>
    If only field A exist then only one result elm.
    If field B exist then two result elm.
    Any ideas?
    Udo

    Hi,
    its prety staight forward, if you were to do the message mapping using custom ABAP mapping or java mapping.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use abap-mapping in xi 3.0.pdf
    Naveen

  • Message Mapping-Node Function

    Dear All,
    This is a problem in mapping, we are facing.
    Source Structure
    Item------Occurance= 1 to Unbounded  (Level 1)
               Garment--- Occurance=1 to 1     (Level2)
    Target Structure
    target_Item--- Occurance = 3 to 5 (Level1)
                 target_Garment--- Occurance=1 to 1    (Level2)
    Source Data
    <Item>
          <Garment> Blazer </Garment>
    </Item>
    <Item>
          <Garment> Blazer </Garment>
    </Item>
    <Item>
          <Garment> Blazer </Garment>
    </Item>
    <Item>
          <Garment> Shirt</Garment>
      </Item>
    <Item>
          <Garment> Trouser </Garment>
    </Item>
    Expected Target Data
    <target_Item>
              <target_Garment> Blazer </ target_Garment>
    </target_Item>
    <target_Item>
              <target_Garment> Shirt </target_Garment>
    </target_Item>
    <target_Item>
              <target_Garment> Trouser</ target_Garment>
    </target_Item>
    Mapping Done:-
    Item -
    > target_Item
    Garment -
    >. Remove Context -
    > Split By Value(Value Change) -
    > Collapse Context -
    > Split By Value(Value Change) -
    > target _Garment
    But we are getting the following error.
    Cannot produce target element /ns0:sdntarget/target_Item[4]/target_Garment. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    But when we see in “DISPLAY QUEUE” in the mapping Editor, every thing is showing as desired.
    Can some body suggest, where we are wrong.
    Regards,
    Navneet

    Hi,
    As correctly said by Swarup change the occurrence.
    What u did wrong is:
    Item -
    > target_Item -this mapping is not correct as from source u r getting four item hence the target_item will be generated 4 times.
    Garment -
    >. Remove Context -
    > Split By Value(Value Change) -
    > Collapse Context -
    > Split By Value(Value Change) -
    > target _Garment - this will generate only 3 times based on ur logic.
    because of this u r getting error target_item[4].
    use the below logic:
    item-target_item
    garment->splitbyvalue(value change)->collapse context-> target_item.
    garment-target_garment
    garment->splitbyvalue(value change)->collapse context->splitbyvalue(eachvalue)->target-garment.
    chirag
    Edited by: Chirag Gohil on Apr 18, 2008 5:34 PM

  • Message Mapping:: Java Function issue

    we have PI7.1 SPS 07 & JDK version as JDK15.
    I am using following program to calculate the Total of payments ( Put constants so it would be easy for others to test in their ESR )-->
    BigDecimal sum = new BigDecimal("0.00");
    BigDecimal bd = new BigDecimal("144.44");
    BigDecimal hund = new BigDecimal("100");
    for(int i=0;i<3028;i++)
    sum = sum.add(bd);     
    //sum=sum.divide(hund);
    String res=sum.toString();
    result.addValue(res);
    (Expression) 3028 * 144.44 = (CalculatorResult)437364.32 -
    (PI Code result)437364.30
    (Expression) 947 * 144.44     = (CalculatorResult)136784.69 -
    (PI Code result) 136784.68
    With numbers like 1347, 1047 etc I got difference of 1 Cent ( so like to call them as Magic numbers here). But numbers like 1119, 3026, 3027, 3028, 1100 etc give correct results.
    One of my friend executed the same code in his Java environment & got correct results with magic numbers too with no 1 cent of difference.
    Can you pls. test the same code in your environment & share the result and if it provides correct result then pls. share version of your JAVA environment too.
    Thanks
    Lalit

    Sarvesh
    I have to use the ADD function only, as I need to sum the payments made in whole context & queues.
    I left the "hund" variable because I even tested following -->
    Multiplied the number by 100 to remove the decimal places
    Add them together "magic number" times
    Multiplied result with 100
    But still got the difference of 1 cent.
    I will appreciate if you can execute the code given by me in you environment, you have to import java.math.BigDecimal

  • Regarding Message Mapping in JDBC Scenario

    Hello Experts,
            I got struct up in message mapping. In message mapping we can able to see different types of Functions. So I need some clarifications on it. Functions are available like...
    Conversions
    Boolean
    Node Functions
    Constants
    Date
    Text
    Static
    Arithmetic
    So please explain in simple for each functions.
    Points will be rewarded.
    Thank you

    Hi
    *Boolean*:-
    And -- checks for 2condition, return a true value if both condition are satisfied
    Or --checks for 2condition, return a true value if one condition is true.
    Not - checks if the condition is not equal to.
    Equals - Check whether 2 Boolean values are equal
    NotEquals
    If u2013 Returns second value if the first argument is true. otherwise returns third argument
    If WithoutElse u2013 Returns value of second argument, if first argument is true.
    Node Functions:-
    createIf - Produces empty value if argument is true; Resultlist.SUPPRESS otherwise
    removeContexts u2013 Produces plain stream of values with No context changes
    replaceValue u2013 replaces value of source field to value specified in Function Properties.
    Exists u2013 Returns true, if Node exists otherwise false
    SplitByValue u2013 inserts context changes after event specified
    collapseContexts u2013 Produces one empty string value out of each arguments context. All arguments are in one context
    useOneAsMany u2013 Use First Argument as IS on same level as third argument. second argument defines when next value of first argument is used
    sort u2013 sorts values in each context
    sortByKey u2013 Sorts values in second queue by keys from first queue
    mapwithDefault u2013 Inserts default values specified in the function properties into empty contexts
    formatByExample u2013 Takes values from the first queue and inserts them in the structure of second queue.
    Constants:-
    Constant u2013 Generates constant value
    CopyValue u2013 Takes specified value in argument stream and copies it an infinite number of times
    Sender u2013 Sender System
    Receiver u2013 Receiver System
    Date:-
    CurrentDate u2013 Return current date in specified format
    DateTrans u2013 Transforms date from input format to output format
    Dateafter u2013 Returns True if first date is after second otherwise false
    DAteBefore - Returns True if first date is before second otherwise false
    CompareDates u2013 Compares two dates
    Text:-
    Substring u2013 Returns substring depending upon the given parameters
    Concat u2013 concatenates 2 strings inserting delimiter string parameter between them
    Equals u2013 Check whether Strings are equal
    indexOf2 u2013 returns the index where the second string is found for the first time in the first string
    indexOf3 u2013 As with indexOf with 2 parameters, But starting search at the specified position
    lastindexOf2 u2013 Returns the index where the second string is found for the last time in the first string
    lastIndexOf3 u2013 As with lastIndexOf with 2 parameters starting search at the specified position
    compare u2013 compares 2 strings lexicographically
    replaceString u2013 Replaces each occurrence of pattern(2nd argument ) of source string(1st arg). By third string
    length u2013 returns length of string
    endsWith u2013 Tests whether string ends with specified suffix
    startsWith2 u2013 Tests whether string starts with specified prefix
    startsWith3 u2013 Tests whether string starts with specified prefix beginning at specified location
    toUpperCase u2013 Converts all characters in string to upper case
    trim u2013 Removes white space from both ends of string
    toLowerCase u2013 Converts all characters in String to Lower case
    Statistic:-
    sum u2013 calculates sum of all numbers in each context
    average u2013 calculates the average of all numbers in each context
    count u2013 Counts number of values in each context
    Index u2013 For each incoming value, this Function returns the index number of the incoming value in the context, String from the initial index and increasing by the increment defined in the parameters.
    Arithmetic:-
    Add u2013 add two values
    Subtract u2013 subtracts second value from the first value
    equalsA u2013 Returns true; If float numbers represented by argument strings are equal otherwise returns false
    abs u2013 returns Absolute value of argument
    sqrt u2013 Returns square root of the number
    sqr u2013 Returns square of the number
    sign u2013 Returns -1 if number is negative, +1 if positive, 0 if 0
    neg u2013 Multiplies number to -1
    1/x u2013 calculates 1/x
    Power u2013 Returns value of the first argument to the power of the second argument
    Less u2013 Returns true if the first number is less than the second number otherwise false
    Greater - Returns true if the first number is greater than the second number otherwise false
    Multiply u2013 Multiplies 2 values
    Divide u2013 Divides first value by the second value
    Max u2013 Returns maximum of 2 numbers
    Min u2013 Returns Minimum of the 2 numbers
    Ceil u2013 Returns the smallest (closest to the negative infinity) initial value that is not less than the argument and it is equal to the mathematical integer.
    Floor - Returns the largest (closest to the negative infinity) initial value that is not Greater than the argument and it is equal to the mathematical integer.
    Round u2013 Returns closest initial value to the argument
    Counter u2013 Counts number of invocations. Initial value and increment defined by Parameters.
    FormatNum u2013 Formats Number with given pattern.
    Conversions:-
    FixValues u2013 Creates a Local Table to perform a value Mapping
    ValueMapping u2013 Define jump to Value Mapping table of Integration Directory.
    Message Mapping(Node Function) Part-1
    Message Mapping Simplified - Part I
    Sravaya Talanki- Message Mapping(Node Function) Part-2
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Standard Functions
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    Advanced mapping function(mapwithdefault,formatbyexample,sort,sortbykey)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    Hope this is useful
    Saiyog
    Edited by: Saiyog Gonsalves on Jul 11, 2008 1:14 PM

  • Problem in message Mapping SAP PI 7.1

    Hi Experts,
    I have a problem in my Message Mapping,
    Design: [Design|http://www.life-4-music.de/prob.jpg]
    Messagemapping: [MappingTest|http://www.life-4-music.de/probII.jpg]
    The Problem is, that ElementC from SourceMessage occours "0 to n" times in Element A, but I need to check every ElementC in ElementA to TargetElementA with a IF Statement.
    I tried a lot of things, like change the CONTEXT of the ELEMENT or use SPLIT BY VALUE but without success.
    Rgds,
    Steffen

    Hello, thanks a lot for the fast awnser. I tried this allready to change the Context of the Elements "system" in this Mapping: Changed Context
    For Example in one field I check for Entry "ERP" in Source Field "system" , if "ERP" is in the first ELEMENT then it will be mapped correctly: Example ERP works
    But If "ERP" is in an element below, then it doesn´t work, so it seems to be, that he only map the first occurrence of the Elements. : Example SCADA don´t work
    Here is the View of the QUEUE from the don´t working Example: Show QUEUE of not working Example
    maybe u have a tip for me again , because I´m allready desperate
    Thanks a lot.
    Rgds,
    Steffen

  • Accessing container variable of BPM in Message Mapping function

    Hi,
    I have a scenario in BPM where i have a container variable that is used as a loop counter.I want to access that counter defined , every time when i go around the loop and perform certain actions based on that counter. so how can i access that variable in my message Mapping function.

    Hi Sudharshan,
    check these links, hope they give you the required information (i think there is some problem with SDN site, check these links after a while)
    Re: How to use Container Variable across Maps
    Container object in Message Mapping
    Copy value of container (abstract interface) to an other container
    Regards
    Vishnu

  • Count-Function in Message Mapping

    Hey, trying to map following structures:
    message
    -m1
    --m11
    -m2
    --m22
    -m3
    --m33
    to
    message
    -m1
    --m11
    -m2
    --m22
    -m3
    --m33
    -f1
    --countItems
    The nodes m1,m2 and m3 can appear 1..unbounded. In target structure I would
    like to have the numbers of all nodes (m1,m2,m3).
    For example: In this source structure m1,m2,m3 appear only one time. In the
    field countItems I would like to have the number 3.
    I tried the count function, but it could only count the structure where I used it (in
    this case: f1).
    How can I count the above-mentioned nodes?
    thanks
    chris

    Hey,
    thanks for your answers.
    But I still couldn't understand how to do this. I open the message mapping for field f1, but the count function could only be set on an target-element, so where to set the counters for m1,m2,m3? Do I have to insert extra fields under m1..m3?
    If I do the counter would increment with every node, so if I have two times m1, in second tree of m1 a two will be insert. If I use the add function, only for these two tree the result would be three!
    @Gangisetty Vijaya Bhaskarudu
    Is this just one UDF? From where he knows, which nodes he have to count, if I have more than m1..m3, but only want to count this three?
    @ sasitharan
    same problem as mentioned above:
    this doesn't work:
    m1--count---\
    I can't use m1 as input for count! Or do I have a wrong count function?
    <b>....au damm, answered my own question. Of course. I use COUNTER and you use
    COUNT!!!!!!!!!!!! I will try this with COUNT!!</b>
    thanks
    chris

  • [RFC to File]Problem about Changing file name in message mapping.

    Hi,
    my problem:
        Type:RFC to File
        I change the file name in message mapping.
    when I call the RFC to send the data twice at the same time, both of the output file names are changed while I only want to change the second output file name.
        thanks
    Sam

    In my MM, the input values to these variables (var1, var2 and var3) are (<ZZCOMBI>array,G499999,END_FIFC0029) ,
    var1 is an array of input <ZZCOMBI> item list;
    var2 is get from a property file by call another UDF;
    var3 is constant value.
    the test input data :
    I send the data for the first time:
    - <rfc:Z_IFCFR821_ZIFCTT82100010 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    - <T_ZIFCTS82100010>
    - <item>
    <ZZCOMBI>G000002G000002</ZZCOMBI>
    <ZZKYKBN>*</ZZKYKBN>
    <ENAME_VE />
    <ENAME_Z5 />
    </item>
    </T_ZIFCTS82100010>
    </rfc:Z_IFCFR821_ZIFCTT82100010>
    so the input values to these variables (var1, var2 and var3) are (G000002G000002,G499999,END_FIFC0029)
    the output file name(File1) :END_FIFC002920090413-171534-053.dat
    output record: G000002G000002
    because the data what I send is the last record, the system send the dummy data for the second time by program.
    - <rfc:Z_IFCFR821_ZIFCTT82100010 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    - <T_ZIFCTS82100010>
    - <item>
    <ZZCOMBI>G499999</ZZCOMBI>
    <ZZKYKBN />
    <ENAME_VE />
    <ENAME_Z5 />
    </item>
    </T_ZIFCTS82100010>
    </rfc:Z_IFCFR821_ZIFCTT82100010>
    so the input values to these variables (var1, var2 and var3) are (G499999,G499999,END_FIFC0029)
    the output file name(File2) :END_FIFC002920090413-171533-928.dat
    output record: G499999
    I find that File2(20090413-171533-928) was ouput before File1(20090413-171534-053 ) from the time stamp.
    I am not sure about that "XI will create a message ID for each message and the messages are independent." as you mentioned above.
    Best regards
    Sam
    Edited by: YONGHE ZHOU on Apr 15, 2009 3:59 AM

  • Problem in 1toN message mapping,payload not populated but file created

    I am doing 1:N multimapping From Proxy  to File scenario .Proxy send three types of data all having same stucture but depending on the value of First field we split the whole stucture in 3 parts on target side and generating three files on taget side.During testing values get Passed from the SXMB_MONI(processed) and we get whole payload data upto
    "Message Branch Acording to Reciever List" .But when i check payload data in 'Request Message Mapping" we donot get any data in Payload.Taget File is generated but when we try to oen the file I get message " Unable to display the File".
    can any expert help me resolve this problem.

    I need to generate 3 files each having similar structures depending upon the first field 'listcode' values whose values are  'N0','MA','MY' coming in a proxy structure.The source structure is as follows::
    MT_Source
    >Detailrecord..0..unbounded
    >listcode..0.1...xsd:string
    >itemcode...0.1...xsd:string
    >description1...0.1..xsd:string
    >description2...0.1..xsd:string
    The target stuctures are:
    MT_Target_N0
    >Detailrecord..0..unbounded
    >listcode..0.1...xsd:string
    >itemcode...0.1...xsd:string
    >description1...0.1..xsd:string
    >description2...0.1..xsd:string
    MT_Target_MA
    >Detailrecord..0..unbounded
    >listcode..0.1...xsd:string
    >itemcode...0.1...xsd:string
    >description1...0.1..xsd:string
    >description2...0.1..xsd:string
    MT_Target_MY
    >Detailrecord..0..unbounded
    >listcode..0.1...xsd:string
    >itemcode...0.1...xsd:string
    >description1...0.1..xsd:string
    >description2...0.1..xsd:string
    I need to do mapping of such 1:n multimapping mapping.I have done mapping but getting error in moni "Split mapping created no messages".Please suggest me some right way to do mapping

  • Problem with condition IF THEN in Message MApping

    Hi,
    We are not getting correct ouput when we use condition IF THEN without else in message Mapping .We are sending data from File to XI to R/3.
    We are using file adapter and IDOC adapter to create customer in R/3.
    In message Mapping we are creating Segment E1KNB1M and E1KNBKM based on condition.
    IF THEN Condition used in mapping is as below
    find the length of Compnaycode with LENGTH function.Pass that value as one of the parameter to function GREATER.Pass second parameter to function GREATER a constant (0).Pass the result to If without else function.If this is true pass Item to IF THEN function and Map the result to E1KNB1M.
    Our mapping is not giving desired output in below scenario:
    Source  XML
    <?xml version="1.0" encoding="utf-8" ?>
    <ns:CustomerMaster_Request_MT xmlns:ns="http://mazdausa.com/sapr3/fi/masterdata/customermaster">
    <Idoc>
    <Header>
      <ID>H</ID>
      <ACCTGRP>M002</ACCTGRP>
      <CUSTNO>R51563</CUSTNO>
      <NAME1>WAYNE MAZDA</NAME1>
        </Header>
    <Item>
      <ID>L</ID>
      <COMPCODE>US10</COMPCODE>
      <BANKKEY>0000326</BANKKEY>
      <BANKCNTRY>US</BANKCNTRY>
      <BANKACCT>05893</BANKACCT>
      </Item>
      </Idoc>
    - <Idoc>
    - <Header>
      <ID>H</ID>
      <ACCTGRP>M002</ACCTGRP>
      <CUSTNO>51563</CUSTNO>
      <NAME1>WAYNE MAZDA</NAME1>
      </Header>
      </Idoc>
    - <Idoc>
    - <Header>
      <ID>H</ID>
      <ACCTGRP>M002</ACCTGRP>
      <CUSTNO>V51563</CUSTNO>
      <NAME1>WAYNE MAZDA</NAME1>
        </Header>
    - <Item>
      <ID>L</ID>
      <COMPCODE>US10</COMPCODE>
      <BANKKEY>000326</BANKKEY>
      <BANKCNTRY>US</BANKCNTRY>
      <BANKACCT>0305893</BANKACCT>
      </Item>
      </Idoc>
      </ns:CustomerMaster_Request_MT>
    Here 3 Idoc are created under ZDEBMAS06.
    First IDOC contain segment E1KNB1M and E1KNBKM as desired because first idoc in Source XML contains Item data.
    Second IDOC contain segment E1KNA1M only as desired because second Idoc in Source XML does not contains item data.
    Third IDOC does not contain Segment E1KNBKM and E1KNB1M which is not a desired output. It should contain these segments as third idoc in source XML have item data.
    But we are getting right output in case we also have Item data under second IDOC in source XML.
    Please let me know where I am doing wrong.
    Thanks.
    Rekha.

    Hi Rekha,
    I am getting the same problem while checking display Queue in message mapping??
    <i><b>Source code has syntax error: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main Exception in thread "main"</b></i>
    Any ideas to solve this problem...
    Thanks,
    Sekhar

  • Message Mapping Logical Problem

    Hi there I have an issue with my message mapping. My source structure looks like this.
    IDOC
    -Seg1
    ---Element1
    ---Element2
    ---Seg2
    ElementA
    ElementB
    Ok so I have to map the IDOC to a flat file. Seg 1 is the Header and Seg2 is the Details. For each flat file there will only be 1 Seg1 but there can be X amount of Seg2s' in the flat file. My problem is mapping Element 1 to Element A. Element A has the value of Element 1 and 2 combined. It appears I cannot map a lower hierarchy to an higher hierarchy? I tried changing the context but with no luck.
    Any idea?
    Thanx,
    Jan

    My problem is mapping Element 1 to Element A.
    What do you mean by this? I guess you want the Element1 to appear with each Segment occurrence. If yes, you may use standard function useOneAsMany as shown.
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Regards,
    Prateek

  • Function Module Undefined during message mapping.

    Hi,
    My Scenario is Idoc to Multiple Files without any condition i have to drop 2 files at the 2 differient directories of  FTP,
    So we are using PI 7.1 and in the Message Mapping using Signature Tab we have added 2 Target messages and at the source we have used the IDOC.
    When we see the structure under Definition Tab in Message Mapping, We are facing the below error
    "FUNCTION MODEL UNDEFINED"
    So can anyone suggest what could be the problem, do i need to change any occurence in the signature tab for the message types else what shuld i do to get the structures in the Definiton Tab.
    Please suggest how to approach this..
    Thanks,
    --Kishore

    My Scenario is Idoc to Multiple Files without any condition i have to drop 2 files at the 2 differient directories of FTP,
    1. Use multi mapping - /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    2. use two different inbound interfaces, and do two different interface determination without conditions for the same receiver determination

  • Message mapping problem / experts needed / UDF?

    Hello experts,
    I have the following problem in a message mapping:
    Source structure is as follows:
    - Node a (min 1, max 999)
      - Subnode b (min 0, max 999)
      - Each Subnode b has the element "number" (1,1)
    This structure must be mapped to the following target structure:
    - Node c (1,999)
       - Subnode d (0,999)
       - Each subnode d has the following elements:
           - e1
           - e2
           - e3
           - e11
    1 Source node a should create 1 target node c.
    All numbers in all subnodes b of one source node a should be mapped to the e1, e2,...e11 elements of the target structure. As one target node d can only contain up to eleven numbers, there must be several d nodes.
    I have already tried to create a UDF, but it does not work.
    Any experts who would like to share their knowledge?
    Thanks in advance.
    CHRISTOPH
    Edited by: Christoph G. on Apr 23, 2008 10:46 PM

    Hello again,
    meanwhile I have worked hard on it and I have found the solution (just one UDF (queue function) which gets the article numbers as well as constant(targetField). So the UDF covers the creation of the "groups" as well as the mapping of the article numbers.
    It was really interesting and it made me ambitious to find the solution myself I do not have access to the system today, but I will post my solution as far as I have access again. Maybe you still want to search for a solution? It really may be fun, just like some kind of a puzzle game.
    In order to make it more clear, here comes the source and target structure with an example. Let me once more explain it: In the source, there are positions, each with unlimited article numbers. Each position will create a targetPosition. The node "targetPosition" has the subNode "articlenrs" (unbounded). Articlenrs has 11 differnet elements, calles a1, a2, a3, ..., a11. That means, all article numbers from a source postion should be mapped to "groups of 11 target article numbers". Please be aware the there are 11 differnet target fields for article numbers: a1, a2, ... a11.
    I think that' why the solution of  Liang Ji and Rohit Kalugade will not work...
    SOURCE
    <position>
         <articlenr> 123   </articlenr>
         <articlenr> 456   </articlenr>
         <articlenr> 4783 </articlenr>
         <articlenr> 123   </articlenr>
         <articlenr> 456   </articlenr>
         <articlenr> 4783 </articlenr>
         <articlenr> 123   </articlenr>
         <articlenr> 456   </articlenr>
         <articlenr> 4783 </articlenr>
         <articlenr> 123   </articlenr>
         <articlenr> 496   </articlenr>
         <articlenr> 4783 </articlenr>
             . (unbounded)
    </positon>
    <position>
         <articlenr> 543  </articlenr>
         <articlenr> 865  </articlenr>
         <articlenr> 643  </articlenr>
    </positon>
    TARGET
    <targetPosition>
      <articlenrs>
           <a1> 123  </a1>
           <a2> 456  </a2>
           <a3> 4783 </a3>
           <a11> 496 </a11>
      <articlenrs>
      <articlenrs>
           <a1>4783 </a1>
      </articlenrs>
    </targetPosition>
    <targetPosition>
         <articlenrs>
         <a1> 543 </a1>
         <a2> 865 </a2>
         <a3> 643 </a3>
            </articlenrs>
    </targetPosition>
    Thanks,
    Christoph
    Edited by: Christoph G. on Apr 30, 2008 10:20 AM

Maybe you are looking for