Message split based on Element value

Hi all,
I am looking for a way to split my source message into multiple target messages based on the Material element.
My Source and Target structures are exactly the same.
What i am trying to do is read from a order related flat file with multiple Materials and then create multiple flat files based on each material. So basically, each target file will have all the order info for EACH material.
In MM i tried to change the occurance of the target message from 1 to 0..unbounded but was not succesful.
Any help is appreciated. Please see below example source and desired target messages
Source Message:
   <Header>
      <GUID1>E663336789</GUID1>
   </Header>
   <Data>
      <Order>50000890</Order>
      <Material>Mat1</Material>
   </Data>
   <Data>
      <Order>50000891</Order>
      <Material>Mat2</Material>
   </Data>
   <Data>
      <Order>50000892</Order>
      <Material>Mat1</Material>
   </Data>
   <Data>
      <Order>50000892</Order>
      <Material>Mat2</Material>
   </Data>
Expected Result ->First Split Message
<Header>
      <GUID1>E663336789</GUID1>
   </Header>
   <Data>
      <Order>50000890</Order>
      <Material>Mat1</Material>
   </Data>
   <Data>
      <Order>50000892</Order>
      <Material>Mat1</Material>
   </Data>
Expected Result ->Second Split Message
<Header>
      <GUID1>E663336789</GUID1>
   </Header>
   <Data>
      <Order>50000891</Order>
      <Material>Mat2</Material>
   </Data>
   <Data>
      <Order>50000892</Order>
      <Material>Mat2</Material>
   </Data>

Hi Lekshmi,
I tried your suggestion but am facing some problems. Based on certain combinations of Material#'s that i enter, sometimes the message split works correctly and sometimes it does not work correctly. At times, it would even create an empty 'Inbound_Msg1_MT' element. In the below example, i should be seeing 2 messages - one for 'Mat1' and the other for 'Mat2', but i just see 1 message split for 'Mat1'.
Any suggestions? TIA
Source
<ns0:Message1>
<ns1:Outbound_Msg1_MT xmlns:ns1="http://Test/Test">
<Header>
<GUID1>HDR</GUID1>
</Header>
<Data>
<Order>1</Order>
<Material>Mat1</Material>
</Data>
<Data>
<Order>2</Order>
<Material>Mat2</Material>
</Data>
</ns1:Outbound_Msg1_MT>
</ns0:Message1>
</ns0:Messages>
Result
<ns0:Message1>
<ns1:Inbound_Msg1_MT xmlns:ns1="http://Test/Test">
<Header>
<GUID1>HDR</GUID1>
</Header>
<Data>
<Order>1</Order>
<Material>Mat1</Material>
</Data>
</ns1:Inbound_Msg1_MT>
</ns0:Message1>
</ns0:Messages>
Mapping
Inbound_Msg1_MT
Material>removeContexts>sort>SplitByValue(Value Change)>Inbound_Msg1_MT
Header
Material>removeContexts>sort>SplitByValue(Value Change)>Header
GUID1
Material>removeContexts->useOneAsMany>SplitByValue(Each value)-->GUID1
Data
Data>removeContexts>formatByExample(1)
Material>removeContexts>sort>SplitByValue(Value Change)>formatByExample(2)
formatByExample-->Data
Order
Material>removeContexts>SortByKey(1)
Order>removeContexts>SortByKey(2)
SortByKey-->formatByExample(1)
Material>removeContexts>sort>SplitByValue(Each value)>formatByExample(2)
formatByExample->Order
Material
Material>removeContexts>sort>SplitByValue (EachValue)>Material

Similar Messages

  • 1 to unbounded in Message Split

    Hi Experts,
    We have a requirement where we need to do a message split
    based on the number of line items in the source message.
    I have sucessfully managed to achieve the message split,
    but the problem is trying to map the "1 to unbounded"
    list section in the source message header to the
    "1 to unbounded" list section in the target message
    lineItem. If possible, please can you help me to achieve the
    following result:
    Source message:
    <source>
    <header>
    <list>
    <ref>
    <rec1>r1<rec1>
    <rec2>r2<rec2>
    <ref>
    <ref>
    <rec1>r3<rec1>
    <rec2>r4<rec2>
    <ref>
    <list>
    <lineItem>
    <item1>i1<item1>
    <item2>i2<tem2>
    <lineItem>
    <lineItem>
    <item1>i3<item1>
    <item2>i4<item2>
    <lineItem>
    <source>
    Target Message:
    <target>
    <lineItem>
    <item1>
    <item2>
    <list>
    <ref>
    <rec1>
    <rec2>
    <ref>
    <list>
    <lineItem>
          <target>
    Required Result After message split:
    <target>
    <lineItem>
    <item1>i1<item1>
    <item2>i2<item2>
    <list>
    <ref>
    <rec1>r1<rec1>
    <rec2>r2<rec2>
    <ref>
    <ref>
    <rec1>r3<rec1>
    <rec2>r4<rec2>
    <ref>
    <list>
    <lineItem>
    <target>
    <target>
    <lineItem>
    <item1>i3<item1>
    <item2>i4<item2>
    <list>
    <ref>
    <rec1>r1<rec1>
    <rec2>r2<rec2>
    <ref>
    <ref>
    <rec1>r3<rec1>
    <rec2>r4<rec2>
    <ref>
    <list>
    <lineItem>
    <target>
    At the moment the "1 to unbounded" list section is not mapping correctly.
    I need a function similar to the useOneAsMany function to achieve this
    because I cant get the useOneAsMany to work with the "1 to unbounded"
    list section. I have tried creating my own UDF but for some reason it
    only generates 1 reference record in the second target message instead of 2.
    I have been struggling for ages to achieve the required result above
    but still have not been successful. Any help will be appreciated very much.
    Thanks and regards,
    Brendon

    Brendon,
    I hope the given solution will work for you! If any issues, please let us know
    Mapping
    http://www.flickr.com/photos/8764045@N06/4514926701/sizes/o/
    http://www.flickr.com/photos/8764045@N06/4515563978/sizes/o/
    http://www.flickr.com/photos/8764045@N06/4514926759/sizes/o/
    http://www.flickr.com/photos/8764045@N06/4514926895/sizes/o/
    UDF's
    http://www.flickr.com/photos/8764045@N06/4515564064/sizes/o/
    http://www.flickr.com/photos/8764045@N06/4514926851/sizes/o/
    Result
    http://www.flickr.com/photos/8764045@N06/4515564202/sizes/l/
    UDF code's for your reference
    zuseOneAsMany
    for(int i=0;i<LineItem.length;i++)
    for(int j=0;j<Ref.length;j++)
    result.addValue("");
    result.addContextChange();
    z1useOneAsMany
    for(int i=0;i<LineItem.length;i++)
    for(int j=0;j<Record.length;j++)
    result.addValue(Record[j]);
    result.addContextChange();
    Thanks!

  • Mapping-based message splits in PI7.0

    We have developed an integration scenario on XI 3.0 that uses mapping-based message splits (1:n transformation without BPM). This is available since SP14 I think.
    Now we want to upgrade to PI 7.0: Are mapping-based message splits a standard feature of PI 7.0 or do we need a certain SP as well?

    Hi,
    It should be available with Pi 7.0 with default
    And also compare the SP's and do finalization
    in 2004 - in 2004s
    SP12 & < - SP04
    SP13 + 14 - SP05
    SP15 - SP06
    SP16 - SP07
    SP17 - SP08
    SP18 - SP09
    Xi's Latest SP is SP 21 and PI's is SP 14
    Regards
    Seshagiri

  • Message split on adapter engine for the java based IDoc adapter

    Hi Guys,
    Do you know if message split on adapter engine is available for the java based IDoc adapter on the single stack (PI 7.31)?
    I'm getting such exception when I try to post 3 IDocs
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.idoc.exception.IDOCAdapterException: Error before sending due to idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: Invalid XML 1.0 character encountered within IDocXML for type <ns0:Messages>:
    state=EXPECTING_IMMEDIATE_TAG_END, charPosition=68, lineNumber=1, columnNumber=69, invalidChar=U+0078,
    sourceSnippet=...UTF-8" standalone="no"?><ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1><...
    ^
    Mapping is one to many.
    Each IDoc content has been compared manually against the xsd schema and it was fine.  
    I know that old way of modifying xsd is still possible.
    Best regards,
    Wojciech

    Did you find a solution to this? Having a similar error right now.
    Thanks and kind regards
    Jens

  • Directing workflow transition based on form element value

    Question 1
    =======
    How can workflow change values in a form element?
    Example: We have an expense aproval form.
    If the form transits from state ManagerA to state Reject, I want the form element Rejected by: to be automaticaly set to value ManageA.
    How ho achieve this?
    Question 2:
    ========
    How can a workflow read a form element and based on the element value automatically transit to other state?
    Example: An expense aproval form is in state ManagerA.
    If a user set the form element Rejected by manually to the value ManagerA, I want the form to be automatically transited from state ManagerA to state Rejected.
    How ho achieve this?

    Originally Posted by dangross
    Answer to question 2 is: Add a transition of type "Transition on Entry Data Value" and configure it accordingly.
    Dangross, thanks for the reply. Yeah, that Transition on Entry Data Value will do the job.

  • Multi-Mapping and Message Split using BPM

    Hi All,
    Could anyone pls let me know clearly how message mapping can be done for this weblog
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    Thanks,
    Ram

    Hi,
    When you are doing Message mapping after adding the Messaget types for source and target messages. You can click on the "" button in the target message and add one more tab. You can go to Message tab as shown in the 5th image and click "" button to add one more message type. Then do the mapping as usual.
    <b>Based on the value of the element(name), the node of input(details)should be directed to one of the two message types</b>
    Here in this blog it is done based on the Name.
    You need to use IFTHENELSE boolean function and do the mapping.
    Thanks,
    Prakash

  • IDOC Message Splitting with Logic

    Hi,  I have a business requirement for IDOC to IDOC mapping where the incoming IDOC line item should be split in to multiple line items based on a field value and also the resulting IDOC will be split in to multiple IDOCs based on a limitation on the number of line items. Without using BPM, have anybody used SAP XI to efficiently perform the above logics with proper check logics and error controls ? Appreciate your responses.

    Hi Raj,
    Try this:
    You can use Split by Value node function and set the properties of the split by value as: Each Value.So the for every different number,different item will be created.
    Using the Node Functions you can solve your problem.
    1.SplitByValue:
    The SplitByValue() function is the counterpart to removeContexts(): Instead of deleting a context, you can insert a context change in the source value queue. You then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccurs must be >0. You can insert a context change in the queue after each value, after each change to the value, or after each tag without a value.
    2.RemoveContexts:
    You use removeContexts () to delete all the top contexts for an element. This removes all top hierarchy levels, so that all elements of the target queue are assigned to a root element of the source queue.
    Advanced user-defined functions can import either just one context into the input arrays, or complete queues. Make your selection by selecting or deselecting the Save Entire Queue in Cache checkbox in the function editor.
    3.CreateIf:
    CreateIf node function is used to create a node if true value is passed to it otherwise suppress it.
    4.collapseContext
    To remove the context in between the value and transfer only one value at a time
    5.useOneAsMany
    First Input:
    The value which is needed to be repeated.
    Second Input:
    It defines how many times the first input should be repeated.
    Third Input:
    It define when the context should be changed (on the basis of the required output
    Please go through the given link hope it will be helpful to you.
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Message Mapping Simplified – Part II
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Replication of Nodes Using the Graphical Mapping Tool
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    Message Splitting Using the Graphical Mapping Tool
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
    Also check this weblogs:
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Split by value
    http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm
    For value mapping check this video presentation and weblog:
    /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#xi [original link is broken]
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    Function formatByExample:
    /people/sundararamaprasad.subbaraman/blog/2006/02/21/real-example-for-formatbyexample
    Split by value, remove context and collapse context:
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Reward points if this helps
    Regards
    Pragathi.

  • Mapping target based on a value and grouping

    I’m having a problem with mapping a source IDOC to a target XML.
    The main problem is with mapping the output based on a value in the each segment and then grouping them properly.
    Here is the format of the source and target (There are more fields used, I am only showing these to explain my problem.)
    The Source IDOC is PPCC2RECORDER01
    We are using the E1BP_PP_PDC_OPERA2 segment which can repeat basically unbounded.
    example
    PPCC2RECORDER01
         EDI_DC40
         E1PPCC2RECORDER
              E1BP_PP_PDC_OPERA2
                   OrderID
                   OperationID
              E1BP_PP_PDC_OPERA2
                   OrderID
                   OperationID
    The Target XML looks like the folowing
    <Workorders>
         <WorkOrder> <!-- Occurs 0 - unbounded -->
              <WorkOrderHeader> <!-- Occurs 1 per Workorder -->
                   <WorkOrderID></WorkOrderID>
              </WorkOrderHeader>
              <WorkOrderOperation> <!-- Occurs 0 - unbounded -->
                   <OperationID></OperationID>
              </WorkOrderOperation>
         </WorkOrder>
    </WorkOrders>
    WorkOrder in the target repeats for each unique OrderID
    and WorkOrderOperation should repeat for each Operation ID contained within a WorkOrder
    Here is sample input
    PPCC2RECORDER01
         EDI_DC40
         E1PPCC2RECORDER
              E1BP_PP_PDC_OPERA2
                   OrderID          0000111
                   OperationID     0010
              E1BP_PP_PDC_OPERA2
                   OrderID          0000111
                   OperationID     0020
              E1BP_PP_PDC_OPERA2
                   OrderID          0000111
                   OperationID     0030
              E1BP_PP_PDC_OPERA2
                   OrderID          0000222
                   OperationID     0015
              E1BP_PP_PDC_OPERA2
                   OrderID          0000222
                   OperationID     0025
              E1BP_PP_PDC_OPERA2
                   OrderID          0000333
                   OperationID     0100
    This is the output I am getting
    <Workorders>
         <WorkOrder>
              <WorkOrderHeader>
                   <WorkOrderID>0000111</WorkOrderID>
              </WorkOrderHeader>
              <WorkOrderOperation>
                   <OperationID>0010</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0020</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0030</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0015</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0025</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0100</OperationID>
              </WorkOrderOperation>
         </WorkOrder>
         <WorkOrder>
              <WorkOrderHeader>
                   <WorkOrderID>0000222</WorkOrderID>
              </WorkOrderHeader>
         </WorkOrder>
         <WorkOrder>
              <WorkOrderHeader>
                   <WorkOrderID>0000333</WorkOrderID>
              </WorkOrderHeader>
         </WorkOrder>
    </WorkOrders>
    This is the desired output
    <Workorders>
         <WorkOrder>
              <WorkOrderHeader>
                   <WorkOrderID>0000111</WorkOrderID>
              </WorkOrderHeader>
              <WorkOrderOperation>
                   <OperationID>0010</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0020</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0030</OperationID>
              </WorkOrderOperation>
         </WorkOrder>
         <WorkOrder>
              <WorkOrderHeader>
                   <WorkOrderID>0000222</WorkOrderID>
              </WorkOrderHeader>
              <WorkOrderOperation>
                   <OperationID>0015</OperationID>
              </WorkOrderOperation>
              <WorkOrderOperation>
                   <OperationID>0025</OperationID>
              </WorkOrderOperation>
         </WorkOrder>
         <WorkOrder>
              <WorkOrderHeader>
                   <WorkOrderID>0000333</WorkOrderID>
              </WorkOrderHeader>
              <WorkOrderOperation>
                   <OperationID>0100</OperationID>
              </WorkOrderOperation>
         </WorkOrder>
    </WorkOrders>
    How can I get this to map the way I want?  I have tried many different mappings some result in the error message "Cannot produce target element WorkOrders/WorkOrder/WorkOrderOperation[4]/OperationID. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd"
    Thanks,
    Tim

    OK,,, So I'm a little closer.  I have the first OperationID for each Workorder comming out, but the other OperationIDs are being dropped.  Here is a sample of what is coming out now
    <Workorders>
    <WorkOrder>
    <WorkOrderHeader>
    <WorkOrderID>0000111</WorkOrderID>
    </WorkOrderHeader>
    <WorkOrderOperation>
    <OperationID>0010</OperationID>
    </WorkOrderOperation>
    </WorkOrder>
    <WorkOrder>
    <WorkOrderHeader>
    <WorkOrderID>0000222</WorkOrderID>
    </WorkOrderHeader>
    <WorkOrderOperation>
    <OperationID>0015</OperationID>
    </WorkOrderOperation>
    </WorkOrder>
    </WorkOrders>
    Looks like it needs to be a change in the mapping for WorkOrderOperation, any Ideas on what this mapping needs to be?  Right now I have
    OperationID -> RemoveContext -> SplitByValue(each value) -> WorkOrderOperation
    I've trie to use the FormatByExample as shown above only going to WorkOrderOperation instead of OperationID, but get the Error message I mentioned above.
    Thanks,
    Tim

  • Idoc(receiver) message splitting using BPM

    Hi,
    could you provide some blogs which is useful for Idoc (as a Receiver) message splitting (1:N scenario) using BPM.
    I have gone thru some of the Blogs, i didn't find good one according to this scenario.
    Thanks
    Praba

    Hi Michal,
    Thanks for ur reply.
    You said " if you have one message and want to have multiple IDOCs
    there is no need for a BPM -
    you just need to change IDOC occurance - that's all"
    I agree to your point.
    My scenario is more or less same but "With single message , i need to generate multiple Idocs" based on synchronous proxy response from R3. That is the reason we already gone with BPM.
    Already i used the BPM in my interface due to req.  It was working. Earlier i was posting single Idoc to R3 with multiple Header segment (each Header segment has one quantity)
    Now due to req. change, for each single quantity (quantity is my source Message Type field), i need to post single Idoc to R3  if i get response from R3.
    My XI version PI 7.0 SP14
    Idoc structure:
       <xsd:attribute name="SEGMENT" type="xsd:string" fixed="1" use="required"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
       </xsd:complexType>
    - <xsd:complexType name="WPUWBW.WPUWBW01";>
    - <xsd:annotation>
       <xsd:documentation>POS interface: Upload goods movements</xsd:documentation>
       </xsd:annotation>
    - <xsd:sequence>
      <xsd:element name="EDI_DC40" type="EDI_DC40.WPUWBW.WPUWBW01"; />
       <xsd:element name="E1WPG01" type="WPUWBW01.E1WPG01"; minOccurs="0"
       maxOccurs="9999999999" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
       </xsd:sequence>
       <xsd:attribute name="BEGIN" type="xsd:string" fixed="1" use="required"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
       </xsd:complexType>
       </xsd:schema>
    Already I am using this Idoc structure in various interfaces also. If i edit the occurance of the this Idoc and import in External definition with same name, I feel it afffect mapping in other interfaces also.
    Inputs are highly appreciated.
    Edited by: Prabaharan Rangasamy on May 22, 2009 4:14 PM

  • Message-Split in a Sync Scenario

    Hello Experts.
    As i am quite new to Pi, i have some problems with an integration scenario we are about to implement. As i am not really into the topic, i do'nt even know, if the prefered solution can be implemented in PI or if our current approach is nonsense after all.
    The currently preferred solution would look like this:
    1.) The sender system collects the data and sends one message using a synchronous webservice call
    2.) PI splits the message into n parts (one outgoing message per receiving system), sends the message-parts synchronously to the receiving systems, collects the response messages into one big message and sends this message as the response message for the webservice-call, the sender system made.
    3.) The sender system receives the response message and updates the database.
    The problem is, that i have no clue how to do a message-split in a Sync scenario. I already experimented with a message-split in Async scenarios and everything worked fine, but i have no idea, how to do the trick in a Sync scenario.
    As the incoming message represents a table (only one kind of element; occurence 0...unbounded), i would have to do the following:
    1.) Split the incoming message line by line (or childnode by childenode)
    2.) Collect the lines for the single receiver systems (each receiver should get only one message)
    3.) Send the messages
    4.) receive the results
    5.) Join the results into one response message / Handle timeouts, if a receiver could not be reached in time
    6.) Send the response message to the sender system
    When experimenting with the async scenario, i used BPM to split the message into parts, but an integration process seems to need asynchronous abstract interfaces. At least PI did not accept my synchronous message-Interface and even if it would do so, i would have no idea how to send the message parts synchronously and how to join the results.
    Of course we could also send one record per message - in this case everything would be easy and clear, but unfortunatelly this is not the preferred solution, but the "Plan B"...
    Does anybody know how to do what we want? Any suggestions would be highly appreciated.
    And by the way: We are using PI 7.0.
    Regards, Jörg

    Thanks for your reply.
    I was already afraid, that the preferred approach could be a dead end. If the described scenario is impossible to implement, i could immagine two alternative solutions:
    1.) Our "Plan B":
    -> Single records
    -> One record per message
    -> Synchronous communication
    PI would only have to do a quite stupid routing based on a certain field in the message.
    2.) Something totally different:
    -> Asynchronous communication
    -> The sender still send the data for n receivers in one message
    -> PI splits the message and sends the n parts to n receivers
    -> The receiver sends a response after processing the data
    -> PI simply forwards this message to the sender
    I think scenario #2 could have a better performance, as the total number of messages is limited to the necessary minimum, but as i'm not experienced in PI, i'm not actually sure about this.
    Any recommendations?
    regards, Jörg

  • Message Split using BPM for Multiple SOAP Receivers

    hi,
    I have a scenario where in i have to split the message coming from IDOC(SOURCE) to multiple SOAP(TARGET) receivers through BPM
    I took a single file as a scenario and tested it. It worked fine.
    I am using only a single output interface.
    I have followed this weblog
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    but this blog has 2 output interfaces whereas in my case i just only one output interface that i want to route to multiple receivers based on the value in the PARVW in the IDOC.
    Thanks,
    Tirumal

    hi ,
    this is done using CONDITIONAL RECEIVER DETERMIANTION.
    While doing your reciver determiantion, you can specify multiple receivers and also specify the condition on which the receiver is to be choosen.
    Also, just check the last path of this blog for the same,
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
    Regards,
    Bhavesh

  • Message Splitting

    Hello,
      I am currently using XI 2.0 and I have a message that needs to be split and sent to multiple interfaces but the same receiver system.
      XML Message --> BAPI 1
      .......and........ --> BAPI 2
      I have put in a condition that says based on a flag in the payload set to 1 or 2 direct this message to bapi1 or bapi2 respectively.  The condition works and the messages are sent to the right bapis however the entire message it sent the bapis whose conditions were met, not just the one chunk which should be sent.
      In the XI 2.0 documentation that I have found, it specifically says message "split" not just route but the documentation fails to show you how to do it.
      Has anyone had any experience with this or no anything about it?
    ... Here are the links to the documentation which specifically talk about message "splitting" to multiple interfaces.
    https://www.sdn.sap.com/content_documents/SAP%20Exchange%20Infrastructure%20-%20Use%20Cases%20and%20Usage%20et%20SAP.pdf
    http://help.sap.com/saphelp_xi20sr1/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Thanks
    Packetloss

    If the source file is already an XML document then you cannot split it at the adapter (as far as I know - perhaps with the dispatcher???).  I should have been more specific.  Splitting from the adapter is possible for flat files.
    No problem though.  Your adapter should use mode "FILE2XMB" and post one document XI.
    Your receiver determination should have multiple receivers.  The condition should check for the color on each receiver.  The mapping should extract only the records with the appropriate color.
    With the graphical mapping tool the mapping should create the dest structure only of the color is correct.  Eg. it should look something like this:
    /ns0:Y_JASTEST=createIf([]equalsS([]removeContexts([]/ns:dataroot/tx/color) , Constant([value=Blue])))
    I tested this and it seems to work fine.  The only question then becomes, can your destination BAPI handle more than one record per call.  This approach will filter out each of the "Blue" records but they will all go to the one BAPI call.
    If not, then you have a different problem.  You may need to use the dispatcher in the adapter.  Have not used that yet so cannot advise.  But the doco seems to suggest such things can be done.

  • IDOC to be triggered based on Lookup value

    Hi all,
       There is a requirement where in we wil have to trigger IDOCon the receiver  based on certain value which will be coming from RFC lookup during mapping runtime.
    So the entire scenario goes like this
    If look up result is 1 trigger IDOCX to receiverA,
    if look up result is 2 trigger IDOCY to receiverA.(receiver is same for both the cases).
    1. I think its not possible by using the combination of multimapping and enhanced interfacedetermiation,because multimapping doesnot support IDOC choosing , as it creates the second IDOC with error .even tough occurances have been changed.
    2. To apply condition in the interface determination to select required IDOC receiverinterface. The valueis not coming from source structure but coming from look up.
    Please suggest the better solution to acheive it.
    Thanks,
    Amar.

    Hi Amar,
    Yes It is Possible.
    1.Export the both IDOcs in XSD format and Change the Occurance of like (<xsd:element name="IDOC" minOccurs="0"   maxOccurs="unbounded" type="MessageType.BasicType"/>)
    2.Create Two External Definitions(ED_IdocOne & ED_IdocTwo) and Import (Modified) XSD format (No need to Create any Message Type & Service Interface)
    3.Message Mapping(MM_MultiMapp), Import the Both External Definitions(ED_IdocOne & ED_IdocTwo), using CREATEIF Node function Complete your Mapping, and under Signature Tab Change the both of External Definitions Occurence like 0......unbound
    4. Operational Mapping(OM_MultiMapp),Import the Both Idocs(which is importhe from ECC) and Change the Signatures like 0.......unbound and Import the MultiMapping(MM_MultiMapp).
    5. Then Complete Your RFC LookUps.
    Configurations
    1.Create Business Systems and Communication Channel
    2.Create one Sender Agreement
    3. Create Two Receiver Agreements
    4. Create Interface Determination
    5. Create Receiver Determination
    but, whether u execute the both IDOcs same time the Monitoring Time(SXMB_MONI) it displays Black Flag but doesn't display the PAYLOAD, then Go ECC and check (TCode   we02)

  • Multiple keyfigure from different planning area based on attribute value

    Multiple keyfigure from different planning area based on the attribute value of Cost element charac.
    I need to obtain the value of the attribute in a fox function. Let me explain it further.
    Background :
    Planning area -
    Charac----
    KF
    area1 -
    Payscale group--- Amount
    Cost element------AmountVR
    area2--Payscalegroup----KF1
    KF2
    KF3
    Cost Element has an attribute "Type"
    Value for attribute "Type" = 1,2,3
    Based on the value of the attribute, the corresponding KF needs to be multiplied.
    Logic :
    If type = 1.
    AmountVR = Amount * KF1.
    elseif type = 2.
    AmountVR = Amount * KF2.
    elseif type = 3.
    AmountVR = Amount * KF3.
    endif.
    The problem I'm facing is that I'm not able to read the data of attribute "Type". None of the below statement retrieve the value of the "Type".
    TYPE = ATRV(Attribute,COSTELEMENT,CO_AREA)
    or
    TYPE = ATRV(Attribute,COSTELEMENT)
    Could you please help me in reading from a time dependent compounding InfoObject?
    Regards,
    Raghu

    Hi..
    Thanx Bindu..
    I have actual data for Month days..if i am craeting in same layout it is too large.
    that's why i am creating two layouts.
    below example for better undersatnding.
    Actual:
    D1 :D2: D3  :D4 : D5  :D6 : D7   :  FULLACT (sume of C(1)  sum of d1 to d7))
    10  :8  :12 :  10 : 14   : 6  : 10    :  70     
    Plan:
    D1EST : D2EST: D3EST :D4EST :D5EST: D6EST: D7EST:  FULLEST (sum of d1 to d7)
    10         :10        :  10      :  10      :10       :    10    :     10  :         70
    How can i read FULLACT value and that value i have to distribute  equally in planing layout and always FULLEST is equal to FULLACT.if not equal i have to throug error message hoe can i setup if you have sample code can you send it to me.
    what is your idea....
    Edited by: Eyda rose on Jun 4, 2008 4:59 PM

  • Show or Hide Items based on radio value

    I am trying to show and hide various Items based on the values of a radio button item. I have see the code and examples like
    function Show_On_Radio_Value(pThis, pThat, pValue){
    var rv = html_RadioValue(pThis);
    if (rv == pValue) {
    html_ShowItemRow(pThat);
    } else {
    html_HideItemRow(pThat);
    The problem I am having is that I have 3 different values of the radio item and I want to display certain items based on each different value.
    For example:
    radio_value = 'Yes'
    Show Item1, Item3, Item4
    or
    radio_value = 'No'
    Show Item2, Item5, Item6
    or
    radio_value = 'Maybe'
    Show Item1, Item2, Item4
    I am fairly new to this so it might be easy, I just don't know how.
    Any help would be appreciated.
    --DG                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Arie,
    Thanks for the reply. I have tried it using the Show_On_Radio_Value function but I still can't get it to do exactly what I want. I have a working version here http://apex.oracle.com/pls/otn/f?p=25290 ,
    The code I used for this demo app is:
    [script language="JavaScript1.1" type="text/javascript"]
    <!-- Hide
    function Show_On_Radio_Value(pThis, pThat, pValue){
    var rv = html_RadioValue(pThis);
    if (rv == pValue) {
    html_ShowItemRow(pThat);
    } else {
    html_HideItemRow(pThat);
    function Hide_On_Radio_Value(pThis, pThat, pValue){
    var rv = html_RadioValue(pThis);
    if (rv == pValue) {
    html_HideItemRow(pThat);
    } else {
    html_ShowItemRow(pThat);
    // End Hide -->
    [script]
    In the HTML Form Element Attribute for the radio button:
    onchange="Show_On_Radio_Value('P1_RADIO','P1_TEXTAREA','Maybe');
    Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD1','Maybe');
    Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD2','Maybe');
    Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD3','Maybe');
    Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD4','Maybe');
    Hide_On_Radio_Value('P1_RADIO','P1_RADIOBUTTON','Maybe');
    Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD2','No');
    Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD4','No');
    Hide_On_Radio_Value('P1_RADIO','P1_RADIOBUTTON','No');
    The problem I see is that in the onchange event, the 'No' options are working because they appear last in the event.
    Can you possibly provide an example using a Case statement?
    Thanks,
    DG

Maybe you are looking for