on 04-25-2012 9:56 AM
Hello Guru’s,
I have a text file for Orders with following data :
OrderNum
CliNum
Product
Quantity
In the same file, we can have several order, several Client, several Line per Order.
The file is correctly sorted on OderNum-CliNum-Product
With this file I have to create one Idoc per OrderNum-CliNum
I’m using Idoc Orders05.
In the mapping, I have used the SplitByValue, and it works fine, I have the right number of Idoc with the correct product in segment E1EDP01
My Mapping is :
OrderNum ---> removeContexts --->SplitByValue (Value Changed) --->collapseContexts --->Idoc
But in segment E1EDKA1 (BELNR) and E1EDK02 (LIFNR) I have always the data from the first record of my Txt file.
My mapping is :
OrderNum ---> Belnr
CliNum ---> Lifnr
Can someone could give me the solution to this ?
Thanks a lot.
JC
Hi Jean-Claude, this happens because you mapped BELNR directly from OrderNum. Like this, the values are read from the queue one by one, and in case of x order lines per order, the first x Idocs will have the same order number.
You might reuse the logic for Idoc in order to map BELNR with an additional SplitByValue (EachValue):
OrderNum ---> removeContexts --->SplitByValue (Value Changed) --->collapseContexts ---> SplitByValue (EachValue) --> BELNR.
Do you have exactly 1 CliNum per OrderNum? Than you can use the same approach for LIFNR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Martin,
I have already tested this, and it dosn't work.
Do I have to make the split also on the Idoc line like for OrderNum.
OrderNum ---> removeContexts --->SplitByValue (Value Changed) --->collapseContexts --->Idoc
CliNum ---> removeContexts --->SplitByValue (Value Changed) --->collapseContexts ---> Idoc
But how can we make this ? We can have only one source for IDOC
JC
Hi Jean,
In addition to above pointers given by Greg and Martin, u can always use "display queue" option to chk what all values you are passing and then probably u can play around with the context of the values to get the desired result.
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JC,
Since you need a context change after each order number and client number, use the following mapping:
OrderNum -> SplitByValue(Each Value) -> Belnr
CliNum -> SplitByValue(Each Value) -> Lifnr
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear JC,
Good to know that . Now I had one more thought: it is not only a matter of the belnr and lifnr fields themselves, but also their parent nodes (E1EDK02 and E1EDKA1) where you should use SplitByValue(Each Value). So here is how to map them:
Source -> SplitByValue(Each Value) -> E1EDK02 and
Source -> SplitByValue(Each Value) -> E1EDKA1.
Did you try that as well (together with SplitByValue for the belnr and lifnr fields, of course)?
Hope this helps,
Greg
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.