I have a table with activites that are created at the purchase order item level. Each purchase order have a supplier. I would like to see what ratio of activites is deleted for given supplier. But not at the line item level but at the purchase order level.
I work with EKKO , EKPO Tables (EBELN, EBELP) and have both EBELN (Header) and EBELP (Position) in my activites table
for example::
PO Nr
Position
Supplier
Activity PO Deleted
101
10
A
X
101
20
A
X
101
30
A
X
101
40
A
X
102
10
A
-
103
10
B
X
104
10
B
In that Case on Line Item level I get the Ratio for Supplier A - 80% Deleted and for B 50 % deleted. Actually the purchase order would always be deleted at the header level . So both A and B should have 50 %. I have tried that with pull activities but I do not get the right results.
I thought something in the direction:
PU_COUNT_DISTINCT(EKKO, MATCH_ACTIVITIES(NODE_ANY[PO deleted] ))
and to bind it to supplier in the table.
Any help would be appreciated.
@urszula.jesse If I understand correctly, you want to count on header level how many Items have change activities?
If this is the case then a PU function is the correct way to go. Something like PU_COUNT(EKKO, EKPO.EBELN, ...) classifies one order based on the condition you want. After that you can think about using a CASE WHEN to get the SUM of all these orders. So something like this should work SUM(CASE WHEN PU_COUNT(EKKO,EKPO.EBELN,...) > 0 THEN 1 ELSE 0 END)
Hope this helps
Best,
Kevin
Hi Urszula,
To get the ratio, add as dimension EKKO.LIFNR and the KPI as a ratio between your POs with certain activity / total POs
KPI formula
SUM(
CASE WHEN PU_COUNT(EKKO, MATCH_ACTIVITIES(NODE_ANY['PO deleted'] )=1) > 0 THEN 1 ELSE 0 END
)
/
COUNT_TABLE(EKKO)
Best,
Gabriel
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.