cancel
Showing results for 
Search instead for 
Did you mean: 

SplitByValue - Wrong data in target Idoc

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hello Martin,

Thanks, It works fine for BELNR with your mapping.  Because, I have the split on Idoc on OrderNum.

But, I have no split on LIFNR on Idoc, and then it doesn't work if I add this mapping on LIFNR.

Have other ideas ?

JC

Former Member
0 Kudos

Hi again, is the CliNum the same for all lines of an order? Then you can use the same approach for LIFNR:

CliNum ---> removeContexts --->SplitByValue (Value Changed) --->collapseContexts ---> SplitByValue (EachValue) --> LIFNR.

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

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

former_member184681
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Greg,

Thanks for your quick answer, I had already tested this, but it's always the same result.

Thanks

JC

former_member184681
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Greg,

I had already tested this, and it's the same result.

Thanks a lot.

JC