cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove repeating values from queue (XI 3.0)

Former Member
0 Kudos

Hi,

I have problems with queue after reading database view with JDBC. In the result list I get all information from 3 databases stored (Header, Group, detail). So for each detail line I have also the header information repeated. This causes problems when I want to create an IDoc per Header. What do I have to do so that only one IDoc is created per "real" Header information?

For example:

Header Group Detail

1212 4 8854569

1212 4 5545855

1212 5 45556498

5555 1 6656954

So in the example above I want to create only 2 IDocs. The first one with 3 detail segements and the second one just with one detail segment. In the moment I get in the queue the header 1212 repeated 4 times - so XI wants to create 4 IDocs. How can I prevent that?

Thanks for any hint!

Best regards

M. Machata

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can handle it in your mapping very well like this...

Header(set the context to root node) ---> Sort ---> SplitByValue (on value change) ---> CollepseContext -


> IDOC.

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks to all! This was it. After implementing the "SplitByValue" and "CollapseContext" I have just one value per number :). Great forum!

Former Member
0 Kudos

Hi ,

you can achieve this by using the nodal function " SPLIT BY VALUE ( Value Change )" and "COLLAPSECONTEXT "

Regards,

Jude

Former Member
0 Kudos
Former Member
0 Kudos

I think you can better handle this witing mapping.

Create a 1:n mapping and map the header to Idoc node(0..1) with node function 'Split By Value'. The property of 'Split By Value'

should be given as 'Value changed'. but care should be taken at detail record level to match them properly with header segment.

Else you need to write a UDF to compare values(header) and create target node accordingly.