Creation of multiple nodes in target IDOC as per field from sender file

Hi SapAll.
here i have  got a requirement in an File To Idoc Interface.
the requirement is there will be one field under sender  file which will be repeating for multiple records(ItemCount),here pi need to check the value of this field for each record and if the value is 'x' THEN it should create the target node under idoc for the same no .of times as the occurance of this field(if the condition is true).
i just used the if Condition,text function(Equals) in the message mapping but it was not working for the
Case 1 :
if the condition in the first record fails  but if it passes for the remaining records its not creating for the remaining records as it fails for the first record itself
Case 2: it is only working when the condition for the first record is sucess .
can any body help me in this.
regards.
Varma

Could be a problem of context, are you queue display is in one context or different context. You can use the SplitByvalue
regards,
lpbuff

Similar Messages

  • To create 5 different files in target for each record in the sender file

    Hi SapAll,
    i have got a a requirement where pi need to create 5 different files with data of each record from the sender side.
    Its an file to file scenario
    suppose there are 5 rows in a file , then in target side i need to create 5 diff with each one record in it.
    Can we do it without using 3 comm channels
    Thanks&regards,
    Sai

    Hey,
    As a more generic solution, can you try using MultiMapping. It is supposed to generate multiple instances of messages on receiver side.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    You just need to put a simple logic in Message Mapping to generate new Node for every occurence of source field.
    Thanks
    Aamir

  • Why idoc number is different from sending to target?

    The number of the same idoc is different from source system and target system...do you know why?
    what's it the procedure to calculate the new number?

    Hi Sleep,
      The Idoc number is specific to the system . It is unique inside a system.
    For example, the sales Order for a vendor will become a Purchase order for the company. Also, the Idocs are not always sent by SAP systems, non sap systems can send IDOCS as well, so to avaoid confusion, SAP generates a uniques number everytime it recieves a IDOC.
    Regards,
    Ravi

  • EDI Outbound IDOC Remove unused fields from segment

    Hi All,
    I am configuring a outbound idoc scenario for Message type ORDERS. The basic type for this message type is ORDERS05.
    The segment E1EDKA1 has 44 fields, I need only the first field and the last field of this segment.
    How do I remove the unused fields in this segment ?  I Tried BD56 and BD32 But they are for removing the complete segment and so does not serve my purpose.
    Any pointers to this issue is appreciable .
    Regards,

    Hi,
    Segmetns of standard message types can be deleted from BD53. But I don't think deleting fields would be possible from segments of standard idoc type. What you can do is you can create your own custom idoc type with the fields you want and allign it with the standard message type ORDERS. This should solve your purpose.
    BR,
    Atanu Mukherjee

  • Creation of multiple files as per  segment repeating multple times  in IDOC

    Hi SapAll.
    i have got a  requirement where in an IDOC to File Interface pi need to create 3 different files with same content but with different names based on single Idoc-Segment.
    its an IDOC to 3 File Inteface.
    the file names will be determined by the IDOC-SEGMENT(Zregion)-Field (where Zregion Which will repeate for 3 times )
    for achiving this
    i just created 3 message (Service )Interfaces and one message mapping,3 Interface(Operation) mappings in the design and In the configuration i created three reciever communication channels with one reciever detarmination ,one Interface determination and 3 reciever agreements (with 3 communication channels 1 for each)
    in the Interface Determination i just defined 3 operation mappings,3 reciever Service Interfaces with one condition each.
    the condition is like below
    (/ZARTMAS05/IDOC/Z1EDRMDFRH_REGION01/REGION = JNB) then Rec Interface1
    (/ZARTMAS05/IDOC/Z1EDRMDFRH_REGION01/REGION = DBN) then Rec Interfacde2
    (/ZARTMAS05/IDOC/Z1EDRMDFRH_REGION01/REGION = CPT) then Rec Interface 3 where (/ZARTMAS05 is the sender idoc.
    but iam getting only one file in the reciever side instead of 3 files.
    can any body help me in providing me the differnt solutions for this without use of any script executions.
    will be waiitng for response.
    regards.
    Varma

    what ever you designed if you want to create always three files then your approach is correct.
    if you want create multiple files based on all the condition you you have to change the logic as like below.
    your message mapping sould me - one source target message type -> three traget message type all are occurance is 0..1
    and check the message type level contion if the region=ABCD create the first message type..
    same thing in your interface determination one source interface -> target three interface occrance is 0..1
    ID Steps - 1 RD, 1 ID, 3 Receiver coom channesl and 3 receiver aggreee...
    after develope this scenario it will split different message types in SXMb_MONI under the Technical Routing...payload level.
    hope it will help you to solve your requirement...
    Regards,
    Venu.

  • Multiple inbound interfaces (xml) but one target (idoc)

    Hi Experts,
    I am trying to setup in ID four inbound interfaces (eg. MessageType1-MesageType4) and each has an interface mapping having the same target idoc (eg. Shpmnt05).
    Also, there is a condition set per interface mapping. 
    Should I create four sender agreements that is one per message type? If so, how many interface determination is needed? Any advise please.
    IR
    Message Interfaces:
    OA_MessageType1
    OA_MessageType2
    OA_MessageType3
    OA_MessageType4
    Interface Mappings:
    OA_MessageType1_to_Shpmnt05
    OA_MessageType2_to_Shpmnt05
    OA_MessageType3_to_Shpmnt05
    OA_MessageType4_to_Shpmnt05
    ID
    Receiver Determination:
    |Party1|Shpmnt05
    Interface Determination:
    Sender Agreement:

    However, how are we going to handle the interface determination?  I believe in the interface determination setup it asks for the message interface suppose MessageType1.
    Now, I need to set-up the condition (eg. operationtype=Create)  for that message interface and set interface mapping.  For this one the interface mapping to be used is OA_MessageType1_to_Shpmnt05. 
    But in this case, i need to add another condition (eg. operationtype=dummy) so that the first condition will be saved, correct? I think if I only have one condition in the interface determination, once activated the condition is gone.
    Having said, are you suggesting that i need four interface determinations?
    Or is it possible to just have one int. det.?

  • Mapping Issue: Target IDoc structure not getting created properly

    Hi Experts,
    I am stuck with a strange problem in my mapping. It is a M:N scenario mapping where we have multiple IDocs in source as well as in target.
    For example, in source Queue-1 I am getting values as [SUPPRESS, true, true, true, true] and in the in source Queue-2 I am getting the values as [1,2,3,4,5]. I used MapWithDefault function to match the number of values in both the queues but in the target IDoc the node (say TMPN) is created only 4 times because of the condition put at the target node. So, the target node should have values as [1,2,3,4] but it gets values as [2,3,4,5] because the first target TMPN node is not created in the first target IDoc. I can provide you with the skeleton of the map. Hope this will give you a fair idea. Let me know if you require more details.
    1. Target Structure:
        IDoc - No TMPN Node
        IDoc - 1 TMPN Node
        IDoc - 2 TMPN nodes
        IDoc - 1 TMPN node
    Condition put on target TMPN_Node ---> (created only 4 times due to condition)
    2. Mapping Skeleton:
    Values coming from Q1 (SUPPRESS, true, true, true, true) --->
                                                                                    \===>FORMATBYEXAMPLE+SPLITBYVALUE==> TMPN-F0 [2]
                                                                                    /                                                                              TMPN-F0 [3]
    Values coming from Q2 (1,2,3,4,5) -
    >                                                                               TMPN-F0 [4]
                                                                                    TMPN-F0 [5]
    Where F0 is  the field which is created when TMPN Node is created. So, if TMPN gets created 6 times, the F0 gets created 6 times.
    Please let me know if there is an alternative to this problem. How can I have values as [1,2,3,4] in field F0 instead of [2,3,4,5]

    hi,
    i got the email.
    as i can see your mapping seams to be rigth, but there is sometrhing i dont get. in a previuos post you said:
    I am stuck with a strange problem in my mapping. It is a M:N scenario mapping where we have multiple IDocs in source as well as in target.
    For example, in source Queue-1 I am getting values as SUPPRESS, true, true, true, true and in the in source Queue-2 I am getting the values as 1,2,3,4,5. I used MapWithDefault function to match the number of values in both the queues but in the target IDoc the node (say TMPN) is created only 4 times because of the condition put at the target node. So, the target node should have values as 1,2,3,4 but it gets values as 2,3,4,5 because the first target TMPN node is not created in the first target IDoc. I can provide you with the skeleton of the map. Hope this will give you a fair idea. Let me know if you require more details.
    1. Target Structure:
    IDoc - No TMPN Node
    IDoc - 1 TMPN Node
    IDoc - 2 TMPN nodes
    IDoc - 1 TMPN node
    lets asume you define as default value "1"
    now, the result of the formatByExample taking the example you sent to me is:
    1,T1,T2,T3,T4 without context change. and the result of the function splitByValue should be what you are specting.
    but its something that is not clear still,
    could you post the result of the mapWithDefault? i think your problem is there.
    Rgds
    RP-.

  • Handeling mapping with multiple nodes

    Hi,
                We are doing an IDOC to SOAP scenario, in which we have multiple nodes in source structure. In destination structure we have one node having multiple occurences (1..99). We are trying to do the mapping in such a way that on the basis of no. of nodes at source side, nodes at destination side should be created.
                                  Any idea how to perform this mapping? Is it necessary to use BPM for this?

    1. Node 1 -> count ->
    2. Node 2 -> count ->
    3. Use ADD(std function) 1 and 2
    4. then after step 3 use UDF given below and then mapp to target node
    create advance UDF function and click on radio button "Queue".
    in the imports section enter java.lang.;java.util.;java.lang.reflect.;java.io.;
       //write your code here
    String e = a[0];
      int b = Integer.parseInt(e);
    for(int i=0;i<b;i++)
    result.addValue("1");
    result.addContextChange();
    This is working for me...
    suppose node1 occurs 3 times and node2 occurs 2 times the target node will occur 3 + 2 = 5 times
    Giving points is another way to say thanks
    Edited by: Tarang Shah on Mar 4, 2009 2:06 PM

  • BW 3.5 works with multiple nodes for authorizations

    Hi,
    Does BW 3.5 allow to do authorizations on mutiple nodes? It seems that from the How to wotk with hierarchy authorizations paper, the variable can only allow filtering 1 node. for 2.0B. We have requirements to allow viweing multiple nodes in a hierarchy.
    Thanks
    Will

    Hi Will,
    creat a hierarchy-node variable fill by authorizations in the frontend. The type has to be multiple entries (not single value). In RSSM at the hierarchy authorization creation you have to use the F4 for selecting nodes. The F4 allows to drag more nodes into the right frame.
    Cheers
    Peter

  • Split file into multiple Instance of an IDoc .

    My file (only one file) in the file system contains multiple entities(lets say sales order).Now using File adapter I want to transfer this file into XI and want XI to create multiple instance of an IDoc(for each sales order) and send them to the target system one by one.
    Alternatively can I split the file into multiple entities(sales order) in the file adapter (using dispatcher for e.g) and send multiple message to the configured XI automatically.
    Is any of the alternative possible in XI20.
    Any responce would be highly appreciated.
    Regards,
    Bikky.

    Hi,
    You can get the file adapter to split the file without the need for a dispatcher user exit.  The config goes a little like this:
    mode=FILE2XMBWITHSTRUCTURECONVERSION
    xml.recordsetStructure=SALES_ORDER,1
    xml.recordsetsPerMessage=1
    This last parameter ensures each sales order is posted to the integration engine as a separate message.  Therefore a separate Idoc is created for each.
    Hope this helps.
    Jason

  • Drag and drop of multiple nodes between 2 trees

    Hi,
    I am trying to implement a drag and drop of multiple nodes between two different trees. A simple drag drop written on the lines of the demo code RSDEMO_DRAG_DROP_TREE_MULTI works perfectly fine. But my requirement is, when a child (leaf) node is dragged, if its parent is not present in the target tree, that too has to be dragged and dropped from left to right. When I try to manually add nodes to the target tree, it dumps because the node key table and drag drop object have fewer nodes than what I am trying to add. So it always dumps in the drag_drop_complete method.
    I have also tried putting this code in the PBO of my screen, calling a subroutine to refresh my tree with all nodes required. But I realise that the PBO does not get called after a drag drop. Is there a way to achieve this? Any help would be greatly appreciated. Thank you.
    Regards,
    Nithya

    There's a Multi-Select TreeView sample on the WindowsClient.com, you can download it. Then you can drag multi nodes as follows:
    Code Snippet
    private void Form2_Load(object sender, EventArgs e)
                this.listBox1.AllowDrop = true;
                this.listBox1.DragOver += new DragEventHandler(listBox1_DragOver);
                this.listBox1.DragDrop += new DragEventHandler(listBox1_DragDrop);
                this.multiSelectTreeView1.ItemDrag += new
                     ItemDragEventHandler(multiSelectTreeView1_ItemDrag);
            void multiSelectTreeView1_ItemDrag(object sender, ItemDragEventArgs e)
                this.multiSelectTreeView1.DoDragDrop(this.multiSelectTreeView1.SelectedNodes,
                     DragDropEffects.Move);
            void listBox1_DragDrop(object sender, DragEventArgs e)
                ArrayList selectNodes = e.Data.GetData(
                    e.Data.GetFormats()[0]) as ArrayList;
                foreach (TreeNode node in selectNodes)
                    this.listBox1.Items.Add(node.Text);
            void listBox1_DragOver(object sender, DragEventArgs e)
                 e.Effect = DragDropEffects.Move;

  • Cluster Apex MS's across multiple nodes for load balancing?

    Can Cluster Apex MS's across multiple nodes for load balancing? If Yes/No, any supportive doc's will be much appreciated.
    Here is what I did ..........
    I tried multiple MS's on different nodes for Apex Domain (clustered)
    Deployed apex.war, i.war with targets pointing to cluster.
    Apex listener techstack is shared filesystem $HOME/apex, where apex-config.xml and bdb are available
    Anyone of the MS's whichever started up first is locking up bdb and 500 server shows up when internal workspace is being launched with host specific url, where as it works fine for the host which actually locked up bdb (first MS that was started)
    2nd MS shows errors as below in log files ..
    Caused By: com.sleepycat.je.EnvironmentLockedException: (JE 4.0.103)$HOME/apex/bdb The environment cannot be locked for single writer access. ENV_LOCKED: The je.lck file could not be locked. Environment is invalid and must be closed.
    Its expected behavior until here .....
    ++++ I tried something to get it working ++++
    Whilst both MS's are up and running, delete $HOME/apex/bdb but let apex-config,xml be as it is...now the internal workspace urls for both hosts work fine. I logged into host specific urls and navigated, created/edited users.,etc and it is all looking good but it did not create new bdb directory under $HOME/apex ...!!
    Having said its working fine, the same issue repeats after the MS's bounce. So I did put a command line to delete bdb dir once the MS comes up to avoid the issue but really not sure if this is the right way at all?
    Geek's ...awaiting your advice!!

    Hey there,
    I managed to fulfill my requirement..
    If its a cluster on same machine or across machines, this should work
    1. Login to machine, cd $DOMAIN_HOME
    2. mkdir -p Apex_lsn_config/AdminServer Apex_lsn_config/<MS1> Apex_lsn_config/<MS2> # MS1 and MS2 are the Managed Server names as appropriate
    #If you are planning for cluster spawning MS's across machines, make sure you create the dir's on step 2 for each machine respectively. (in my case $DOMAIN_HOME is not shared)
    3. Copy apex-config.xml from the /tmp/apex or whatever location you have it currently to Apex_lsn_config/<MS1> Apex_lsn_config/<MS2>
    4. cd $DOMAIN_HOME/bin; cp -p SetDomainEnv.sh SetDomainEnv.sh.orig #Backup the file
    5. Append -Djava.io.tmpdir in SetDomainEnv.sh as below for JAVA_OPTIONS # Do it on both machine if you are not sharing DOMAIN_HOME and planning cluster across machines
    -Djava.io.tmpdir=$DOMAIN_HOME/APEX_CONFIG/${SERVER_NAME}
    Hint: Search for "iterativeDev" and append the same line with -Djava.jo.tmpdir
    6. Modify "java.io.tmpdir" from the web.xml file of apex.war as below and re-deploy the war
    <context-param>
         <param-name>config.dir</param-name>
         <param-value>${java.io.tmpdir}</param-value>
    </context-param>
    7. Bounce Weblogic Admin and Manged Servers. Make sure to tail the Managed Server log to see apex-config.xml is picked from the new location.
    8. Brew a Coffee for yourself :)
    - You find the instructions on creating a cluster from weblogic documentation, the steps mentioned above are only to overcome the bdb locking issue whilst creating a cluster.
    Did it help?
    Edited by: Oratime on Mar 25, 2013 2:44 AM

  • Deploying EJBs on multiple nodes

    Hi,
    Our Application works when we deploy it on a single node. But the moment we deploy
    it with multiple nodes,we are getting a exception:
    java.lang.NoClassDefFoundError: javax/xml/bind/UnmarshalException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    Our deployment looks correct for me.
    We have specified each node in the target like:
    <EJBComponent Name="ecommerce" Targets="monode3,monode2,monode1,monode4,monode5,monode6"
    URI="ecommerce.jar"/>
    Any clues from anyone?
    Thanks,
    Jeeva

    You didn't give the full stack trace. No thread starts executing at
    Class.forName ;-)
    What's happening is that you are dealing with XML, probably in your
    clustered EJBs or in your HTTP session, and so it's getting replicated. The
    XML pops out onto the other end of the wire, the code loaded from the system
    classpath tries to deserialize it, but can't find your application classes.
    That's a common problem with object transfer protocols.
    Do you know where you are using javax/xml?
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Jeeva" <[email protected]> wrote in message
    news:3c3a8401$[email protected]..
    >
    Hi,
    Our Application works when we deploy it on a single node. But the momentwe deploy
    it with multiple nodes,we are getting a exception:
    java.lang.NoClassDefFoundError: javax/xml/bind/UnmarshalException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    Our deployment looks correct for me.
    We have specified each node in the target like:
    <EJBComponent Name="ecommerce"Targets="monode3,monode2,monode1,monode4,monode5,monode6"
    URI="ecommerce.jar"/>
    Any clues from anyone?
    Thanks,
    Jeeva

  • Problem : IDoc to file Senario, multiple segments in the IDoc.Intresting !!

    Hello People,
    Just a very good problem, to put your brains work.
    The senario is Idoc to File.
    Now Suppose the structure of IDoc is in such a way.
    segment1 -  fields A, B, C, D --- >> Single
    segment2 - fields E,F            --->> This segment can come multiple times.
    segment3 - fields G, H          -
    >> Single
    segment4 - filds I, J, K          -
    >> Multiple.
    Now the format of the file is Fixed Length.
    The record will be inserted Row wise.
    Let us assume that the number of segments are.
    segment1
    segment2
    segment2
    segment3
    segment4
    segment4
    All segments are at the same level.
    Example of file :-
    A  B  C  D  E1  F1  G H I1  J1 K1
    A  B  C  D  E2  F2  G H I2  J2 K2
    So please let me know, what kind of structure should i create in my repository for the Target and also let me know , the File content Conversion part ..
    Thanks in Advance.
    Harpreet.

    hi,
    Repeat the row for each segment and in the (i)th iteration of the map it to the (i)th segment from the input. Now in your FCC, it will be like writing a normal fixed length conversion.
    For e.g. you target structure will look somewhat like this.
    Document
      Recordset
         Record(i)
           FieldA
           FieldB
           FieldC
           FieldD
           FieldE(i)
           FieldF(i)
    and so on....
    Cheers,
    Sarath.
    Award if helpful.

  • Create a empty node in target structure

    Hi,
      The scenerio is idoc(HRMD_A07) to file
      my target structure is
      <Record>
        <Record1>
          field 1
          field 2
          field 3
       <Record1/>
       <Record2>
          field 5
          field 6
       <Record2/>
        <Record3>
          field 7
       <Record3/>
    <Record/>
    Record is mapped to EP1LOGI ,
    Record1 is mapped to E1P0001 and the fields from this segment are mapped to field 1, 2 and 3
    Record2 is mapped to E1P0002 and the fields from this segment are mapped to field 5 and 6
    Record3 is mapped to E1P0105 and the fields from this segment are mapped to field 7.
    Say in one EP1LOGI i do not have E1P0105 in the source. NOW i would like to get a empty node
    <Record3> <Record3/> in target structure.
    Please advice...
    Regards
    Niladri

    My content conversion is
    Record.fieldFixedLengths         0
    Record.endSeparator              'nl'
    Record1.fieldFixedLengths     8,4,10,2,8
    Record1.endSeparator           ','
    Record2fieldFixedLengths    40,40
    Record2endSeparator           ','
    Record3fieldFixedLengths     241
    Record3endSeparator          'nl'
    My source idoc does not have email id ( field7) for the first employee and has email id for teh second employee.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_ELEARNING_dummy xmlns:ns0="http://TFL.com/E-learning/Kallidus">
       <Record>
          <Record1>
             <PERNR>01221690</PERNR>
             <BUKRS>1010</BUKRS>
             <KOSTL>0000040063</KOSTL>
             <PERSK>35</PERSK>
             <ORGEH>50022222</ORGEH>
          </Record1>
          <Record2>
             <VORNA>Barry</VORNA>
             <NACHN>Tredinnick</NACHN>
          </Record2>
          <Record3/>
       </Record>
       <Record>
          <Record1>
             <PERNR>01221793</PERNR>
             <BUKRS>1010</BUKRS>
             <KOSTL>0000040083</KOSTL>
             <PERSK>35</PERSK>
             <ORGEH>50295392</ORGEH>
          </Record1>
          <Record2>
             <VORNA>David</VORNA>
             <NACHN>Sinclair</NACHN>
          </Record2>
          <Record3>
             <USRID_LONG>email addtress</USRID_LONG>
          </Record3>
       </Record>
    </ns0:MT_ELEARNING_dummy>
    Now i get the file as ---ALL IN one line
    01221690101000000400633550022222' ,'Barry                                   Tredinnick                              ' ,'                                                            ' ,'01221793101000000400833550295392' ,'David                                   Sinclair                                   ' ,' email address
    I cannot figure out why i am getting ',' before the second employee number 01221793...
    I want to get the file as:
    01221690101000000400633550022222' ,'Barry   Tredinnick          ' ,'              
    '01221793101000000400833550295392' ,'David    Sinclair            ' ,'email address
    Kindly help

Maybe you are looking for