on 10-08-2015 12:23 PM
Hi Everyone,
I'm having a bit of trouble with a flat file to IDoc ORDERS05 scenario and I would appreciate any advice you could give.
I have an incoming flat file and my message type which this file translates to is in the following format
Record 1:Unbounded
----- ID 1:1
----- Material 1:1
----- Quantity 1:1
----- UOM 1:1
----- etc.
For every change of ID I need to create a new ORDERS05 IDoc. I'm using Split by Value to achieve this and that does seem to work fine.
ID-->removeContexts-->SplitByValue[Value Change]-->collapseContexts->IDOC (IDoc Node 0:Unbounded)
The problem I have is the subsequent mapping of the line item segment E1EDP01 in the IDoc and it's occurrence. I'm not sure what maps this this. I'm currently mapped it to Constant 1 which isn't correct. Fields like Material will be mapped in this segment
In an example where we have different IDs the scenario appears to work. When the ID's are the same only the first Material is populated into E1EDP01 - which is course is becuase the occurence is 1. If I map Record node to E1EDP01 it create's all instances of the segment in the first IDoc.
I know I probably need some sort of context mapping here and I've tried a few things but I'm failing to see what that is. I assume I can achieve this with the Record format above ? I'm hoping I've not overlooked something obvious but the penny isn't dropping on this.
Here is an example to illustrate what I'm looking for
Record
----- ID 800
----- Material 1234
----- Quantity 10
----- UOM EA
Record
----- ID 800
----- Material 5678
----- Quantity 10
----- UOM EA
Record
----- ID 810
----- Material 1234
----- Quantity 10
----- UOM EA
For the above example I want two ORDERS05 IDocs.
+ First IDoc with two E1EDP01 segments (one each for Material 1234 and 5678 respectively)
+ Second IDoc with one E1EDP01 segment (Material 1234)
Any help you can give is much much appreciated.
Thanks you
JE
Hi Joel,
You are right when using SplitByValue on ValueChange.
Just check if you are using the right context in the below fields.
Material, quantity and UOM must use the ID context.
Let me know the results.
Regards,
Diego
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Everyone,
It appears I have solved this. I needed to use formatByExample when mapping node E1EDP01
So the mapping I've used is
Input 1: Record-->removeContexts--> formatByExample --> E1EDP01
Input 2: ID-->removeContexts-->SplitByValue[Value Change]
Diego's prompt is what helped me so marking as correct answer.
Thanks to you all guys.
Thanks
JE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Joel,
Can you tell me to which target node you have mapped the material and in which way?
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 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.