Hi,
you can try to use following formula
COUNT_TABLE("VBAP")
-
((COUNT(DISTINCT CASE
WHEN (PU_COUNT("VBAP","_CEL_O2C_ACTIVITIES"."USER_TYPE","_CEL_O2C_ACTIVITIES"."USER_TYPE" IN (<%= AutoTypes %>)
AND "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN (<%= AutoActivities %>))
= PU_COUNT("VBAP","_CEL_O2C_ACTIVITIES"."USER_TYPE", "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN
(<%= AutoActivities %>)))
THEN "_CEL_O2C_ACTIVITIES"."_CASE_KEY"
ELSE NULL END))
-
(COUNT(DISTINCT CASE WHEN
PU_COUNT("VBAP","_CEL_O2C_ACTIVITIES"."USER_TYPE","_CEL_O2C_ACTIVITIES"."USER_TYPE" IN (<%= AutoTypes %>)) > 0
THEN "_CEL_O2C_ACTIVITIES"."_CASE_KEY" ELSE NULL END)))
Please let me know if this helps.
Best regards,
Viana
v.kalversberg:
COUNT_TABLE("VBAP")
-
((COUNT(DISTINCT CASE
WHEN (PU_COUNT("VBAP","_CEL_O2C_ACTIVITIES"."USER_TYPE","_CEL_O2C_ACTIVITIES"."USER_TYPE" IN (<%= AutoTypes %>)
AND "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN (<%= AutoActivities %>))
= PU_COUNT("VBAP","_CEL_O2C_ACTIVITIES"."USER_TYPE", "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN
(<%= AutoActivities %>)))
THEN "_CEL_O2C_ACTIVITIES"."_CASE_KEY"
ELSE NULL END))
-
(COUNT(DISTINCT CASE WHEN
PU_COUNT("VBAP","_CEL_O2C_ACTIVITIES"."USER_TYPE","_CEL_O2C_ACTIVITIES"."USER_TYPE" IN (<%= AutoTypes %>)) > 0
THEN "_CEL_O2C_ACTIVITIES"."_CASE_KEY" ELSE NULL END)))
Thanks Viana,
I am getting some error in formula.
I did found one way please let me know if this this relevant one and also i do get result but not for all
COUNT_TABLE(VBAP)-COUNT(DISTINCT CASE WHEN _CEL_O2C_ACTIVITIES.USER_TYPE IN (<%= AutoTypes %>) and _CEL_O2C_ACTIVITIES.ACTIVITY_EN IN (<%=AutomationActivities%>)
and
_CEL_O2C_ACTIVITIES.CHANGED_FROM <> _CEL_O2C_ACTIVITIES.CHANGED_TO AND
_CEL_O2C_ACTIVITIES.CHANGED_FROM <> AND _CEL_O2C_ACTIVITIES.CHANGED_TO <>
THEN (VBAP.VBELN)
ELSE NULL
END)
Hi,
you are probably getting an error because I used <%= AutoActivities %> as a variable instead of <%=AutomationActivities%>, can you please check if you are using the correct variables?
In your formula you are counting on the header level as you only count the VBELN - I assume you want to count the items - right? You would need to either use VBAP.VBELN||VBAP.POSNR or _CEL_O2C_ACTIVITIES."_CASE_KEY"
What do you want to calculate using the statement
_CEL_O2C_ACTIVITIES.CHANGED_FROM <> _CEL_O2C_ACTIVITIES.CHANGED_TO AND
_CEL_O2C_ACTIVITIES.CHANGED_FROM <> AND _CEL_O2C_ACTIVITIES.CHANGED_TO <>
? The cases that have changes?
Best regards,
Viana
Thanks
You are correct because of variable i was getting erorr,
But that formula is not giving me an output.
Please find the formula which have build to create the touchless orders , so ideally i need all the counts which are changed by manual user(A) for the activities defined.
So far i get correct output, please let me know if its correct or am i missing anything;
COUNT_TABLE(VBAP)-
COUNT(DISTINCT CASE WHEN _CEL_O2C_ACTIVITIES.USER_TYPE IN (<%= AutoTypes %>) and _CEL_O2C_ACTIVITIES.ACTIVITY_EN IN (<%=AutomationActivities%>)
AND _CEL_O2C_ACTIVITIES.CHANGED_FROM <> _CEL_O2C_ACTIVITIES.CHANGED_TO
OR _CEL_O2C_ACTIVITIES.CHANGED_FROM <> AND _CEL_O2C_ACTIVITIES.CHANGED_TO =
OR _CEL_O2C_ACTIVITIES.CHANGED_FROM = AND _CEL_O2C_ACTIVITIES.CHANGED_TO <>
OR _CEL_O2C_ACTIVITIES.CHANGED_FROM = _CEL_O2C_ACTIVITIES.CHANGED_TO
THEN (VBAP.VBELN||VBAP.POSNR)
ELSE NULL
END)
Hi Viana,
I am still strugling with touchless KPI ,I get result for some and for some its not working,
if we treat header changes as item changes as well (if there is at least 1 header change, then it means that all SO items have been changed).
But if we take into account sales order items only, then the number of changes is lower.
Could you please help on the same.
Formula currently used
COUNT_TABLE(VBAP)-
COUNT( CASE WHEN _CEL_O2C_ACTIVITIES.USER_TYPE IN (A, ') and _CEL_O2C_ACTIVITIES.ACTIVITY_EN IN (<%=AutomationActivities%>)
AND _CEL_O2C_ACTIVITIES.CHANGED_FROM <> _CEL_O2C_ACTIVITIES.CHANGED_TO
OR _CEL_O2C_ACTIVITIES.CHANGED_FROM <> AND _CEL_O2C_ACTIVITIES.CHANGED_TO =
OR _CEL_O2C_ACTIVITIES.CHANGED_FROM = AND _CEL_O2C_ACTIVITIES.CHANGED_TO <>
OR _CEL_O2C_ACTIVITIES.CHANGED_FROM = _CEL_O2C_ACTIVITIES.CHANGED_TO
THEN (VBAP.VBELN)
ELSE NULL
END)
Hey,
Maybe this is a little overcomplicating the problem?
When I calculate No Touch orders, I would try use PU_COUNTS based on your list and compare them with the actual process steps in the same list, which are automated:
100 * AVG(
CASE
WHEN
PU_COUNT("VBAP", "_CEL_O2C_ACTIVITIES"."USER_TYPE","_CEL_O2C_ACTIVITIES"."USER_TYPE" = 'Automated' AND
"T_ACTIVITIES"."ACTIVITY_EN" IN (<%= AutoTypes %>)) =
PU_COUNT("VBAP", "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN", "T_ACTIVITIES"."ACTIVITY_EN" IN (<%= AutoTypes %>))
THEN 1
ELSE 0
END
)
I think this should give you the percentage of fully Automated Processes, that are in the allowed list.
Best regards