Discrepancy between PU_COUNT and Case_count

Hello community,

In my datamodel, the case key is “BSEG”.“SID”||“BSEG”.“MANDT”||“BSEG”.“BUKRS”||“BSEG”.“BELNR”||“BSEG”.“GJAHR”
||“BSEG”.“BUZEI”

The LFB1 and the BSEG tables are linked (1:N) with the fields SID, MANDT, BUKRS and LIFNR.

I have filtered my analysis as below:
FILTER “LFB1”.“SID” =‘FC3’;
FILTER “LFB1”.“MANDT” =‘130’;
FILTER “LFB1”.“BUKRS” = ‘CN01’;
FILTER “LFB1”.“LIFNR” = ‘0000115406’;

There are a total of 20 cases: COUNT_TABLE(“BSEG”) = 20.

I am doing a PU_count of the BSEG cases to the LFB1. My understanding is that I should also get 20, but I get 29 ?!?

PU_COUNT(“LFB1”,
“BSEG”.“SID”||“BSEG”.“MANDT”||“BSEG”.“BUKRS”||“BSEG”.“BELNR”
||“BSEG”.“GJAHR”||“BSEG”.“BUZEI”) = 29

Do you know what could explain such discrepancy ?

Thanks in advance for your help !

Clément

Hi,

In PU_COUNT due to field “BUZEI“ , System is considers all the line items of LIFNR ?

My Guess - Count With and Without BUZEI.

Vivek M

Hi,

Thanks for your feedback.

I tried to do a PU_COUNT without the BUZEI as below, but I still get 29 instead of 20.

PU_COUNT(“LFB1”,“BSEG”.“SID”||“BSEG”.“MANDT”||“BSEG”.“BUKRS”||“BSEG”.“BELNR”||“BSEG”.“GJAHR”) = 29.

What do you think ?

Thanks again !

Clément

Hi,

In addition, if I do a PU_COUNT_DISTINCT on the document number, I also get 29:

PU_COUNT_DISTINCT(“LFB1”,“BSEG”.“BELNR”)=29.

That basically tells me it sees 29 different document numbers.

How come is it possible since the number of cases is 20 ?

Thanks in advance !

Clément

Hi,

Problem solved.

There was a load script on the “BKPF”.“BLART”. If I delete the filter, COUNT_TABLE(“BSEG”) = 29 so it’s aligned with the PU_COUNT.

Good to know though: the filters don’t impact the PU functions.

Thanks.
Regards,

Clément