cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC Message Splitting with Logic

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Refer following link,

same issue discussed in following link.

Regards,

Rohit.

Reward points if helpful.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

You can generate multiple Idocs from single idocs uisng MultiMapping concept of XI.

without BPM........

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

IDOC tunelling is an option in which , you can avoid this conversion of IDOC into an XML format.

Say, you need to do an IDOC to IDOC scenario where XI will jus be used for monitoring.

In these cases, by using IDOC tunelling, we can avoid the conversion of IDOC in to XML and therby imrove perfromance.

Take a look at these blogs,

/people/michal.krawczyk2/blog/2005/11/21/xi-idoc-to-idoc-tunneling--how-fast-and-easy-can-you-get

/people/alessandro.guarneri/blog/2006/03/05/managing-bulky-flat-messages-with-sap-xi-tunneling-once-again--updated

************Reward points,if found useful

sunil_singh13
Active Contributor
0 Kudos

Hi raj,

You have to cahnge the Occurence of target idoc Structure to 0.......Unbounded.

Create multiple instances of Idoc at Target Side (No Of instances will be as per your requirment).

Count the no. of lines (use count function) and if it exceeds the fixed value map it with next instance of node.

For more help you can look for Blog given by Michal

Reward points Helpful

Thanks

Sunil Singh

vijay_b4
Active Contributor
0 Kudos

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.