cancel
Showing results for 
Search instead for 
Did you mean: 

Combination of values of two infoobjects in query designer - possible?

Former Member
0 Kudos

Have two columns:

Pno Dno Quan

311 45 1000

311 40 2000

641 45 3000

551 40 4000

I want to have only the combination of row 1,3 and 5 (sum of Quan is 8000) extracted in a Query, but I have Challenges on how to do this directly in the Query without making a CONCAT Field in the ADSO.

Any idea how I should do this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Helge;

I think you can do it using RFK but you will need variables for Pno and Dno.

1. RFK with Qty and exclude value of Pno variable (RKF1)

2. RFK with Qty and exclude value of Dno variable (RKF2)

3 CKF with formula: IF (RKF1 = RKF2; RKF1 (or RKF2); MAX (RKF1, RKF2)

The result should be something like this:

Pno Dno Quan RKF1 <> 311 RKF2 <> 40 CKF

311 45 1000 0 1000 1000

311 40 2000 0 2000 0

641 45 3000 3000 3000 3000

551 40 4000 4000 0 4000

Of course, remove Pno or Dno from the structure or multiple combinations to exclude will not work.

Hope it helps;

Regards

Ricardo

kohesco
Active Contributor
0 Kudos

Hi

if Dno always should represent the highest value, this is what you can do

create a formula -> create a formula variable in it, set as replacement path of Dno -> add condition to the query, set as top 1 of the formula and assign only Dno as reference.

Now only the line:

311 45 1000

should remain

grtz

Koen