on 04-07-2009 6:02 PM
I seem to be missing a trick here because from what I've read this should work...
My source looks like:
MT
+HEADER
+DETAIL
++SHIPMENT:1
++LINE:1
+DETAIL
++SHIPMENT:1
++LINE:2
+DETAIL
++SHIPMENT:2
++LINE:1
+FOOTER
My source file is very flat so thats why each line of detail includes header type information like Shipment Number.
I'd like to post a new IDOC for each changing value in Shipment number. So in this case I would want 2 IDOCS. I try mapping like this but I only get 1 IDOC:
SHIPMENT => SPLITBYVALUE: VALUECHANGED => IDOC
I see 3 IDOCS if I map DETAIL => IDOC (not what I want but shows I can post multiple idocs)
I've tried adding a <RemoveContext> to the equation with no joy.
Is there a trick to using SplitByValue in this way to pick up on a data value change in a detail row of flat file source and use to trigger a new IDOC segment to the message?
Many thanks for your suggestions...
Aaron
Well, it turns out this function is more complex than the simple examples in normal documentation. Stefan Grube's blog post really explained how to do what I was wanting.
[/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13|/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13]
The mapping goes something like:
Shipment => removeContext => SplitByValue (Value) => collapseContext => IDOC root
Then a similar mapping for sub-segments in the IDOC heirarchy keep related records under the correct IDOC branch:
Shipment => RemoveContext => SplitByValue (Value) => FormatByExample (upper input is Shipment) => E1 IDOC segment
If you need a resetting counter underneath one of the segments use:
Shipment => RemoveContext => SplitByValue (Value) => Index => SplitByValue (Each) => ITEM_NUMBER
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
I'm not aware of the ContextChange option, where would I find this? I don't see it as a node function or option on the Split function. By the way, we are on version XI 3 service pack 23 so I'm not sure if this changes the game.
Regards,
Aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, after checking the queue I see the Shipment numbers 5 times, presumably 1 for header iteration and one for footer, pluse 3 for my detail rows. I'm hoping to only show 2 times because my test data has 3 rows and two unique shipments.
Forcing the context to a higher level didn't correct the results.
Thank you for the ideas!
-Aaron
This example on page 70 of XI Mapping PDF on SDN seems to be close to what I'm doing. However I cannot get it to work, I wonder if it is a typo to have two things mapping to the new context?
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638]
Does anyone have another example of this SplitByValue working with a ValueChange condition?
Failing this, maybe I could go through a two level mapping if necessary. Any advice is really appreciated.
Regards,
Aaron
did you tried splitByValue contextChange option
for generating idocsbased on shipment context
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.