Skip to main content
I need to measure the number of orders within the booking process: anything between Create Quotation and Create Sales Order Item. For background, the # of Sales Orders using COUNT_TABLE("VBAK") is 200k. Using either of the below formulas continues to give me 200k Sales Orders. I have also attempted it with/without many different component filters: COUNT(DISTINCT CASE WHEN "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN ('Create Quotation','Create Sales Order Item') THEN "VBAK"."MANDT" || "VBAK"."VBELN" ELSE NULL END) or COUNT (DISTINCT CASE WHEN (PU_COUNT("VBAK","_CEL_O2C_ACTIVITIES"."USER_TYPE","_CEL_O2C_ACTIVITIES"."USER_TYPE" LIKE '%' AND "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN ('Create Quotation','Create Sales Order Item')) = PU_COUNT("VBAK","_CEL_O2C_ACTIVITIES"."USER_TYPE", "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN ('Create Quotation','Create Sales Order Item'))) THEN "VBAK"."MANDT" || "VBAK"."VBELN" ELSE NULL END ) You guys have been a tremendous help in the past, would love to see what I am missing or any other suggestions.
Hi, Im not sure if I understood your question correctly. So do you want to calculate the number of cases that have gone through Create Quotation and Create Sales Order Item afterwards? Could you clarify this a bit? Thanks and BR David
@d.becher, Not necessarily directly afterwards. Another way of stating it would be the crop selection: For example say I was doing throughput time bucketing for the booking process, the PQL would be: CASE WHEN DATEDIFF(DD, PU_MIN(VBAK, _CEL_O2C_ACTIVITIES.EVENTTIME, _CEL_O2C_ACTIVITIES.ACTIVITY_EN = Create Quotation) , PU_MAX(VBAK, _CEL_O2C_ACTIVITIES.EVENTTIME, _CEL_O2C_ACTIVITIES.ACTIVITY_EN = Create Sales Order Item) ) <= 5 THEN <= 5 Perhaps we can apply something similar to the crop function onto the analysis sheet filter as a whole?
In order to calculate the number of cases that have gone through Create Quotation and eventually through Create Sales Order Item, you can use PROCESS EQUALS: COUNT( CASE WHEN PROCESS EQUALS 'Create Quotation' TO ANY TO 'Create Sales Order Item' THEN 1 ELSE NULL END ) This also respects the cases where the two activities do not follow each other directly, but there can be other activities in between. Best David