Skip to Content
0

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

May 03 at 05:55 AM

61

avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Koen Hesters May 07 at 09:09 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member May 14 at 03:20 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded