Hi All,
I am new to sap sourcing.
I am trying to customize a query for (Sourcing Report for all supplier registrations showing the cycle times for each
approval phase of the process)which I have added two filter prompts(phase and document name).
When I try to execute the query, I don't get the required output for the phase filter prompt.
Also phase is a value list and when I select the phase from the drop down, the report doesn't give any value.
Please find the query as mentioned.
SELECT <%RESULTS%>
FROM <%SCHEMA%>.FCI_WORK_ITEM
T1
INNER JOIN <%SCHEMA%>.FCI_WORK_PROCESS T2 ON T1.PARENT_OBJECT_ID =
T2.OBJECTID INNER JOIN (
SELECT
OBJECTID,
10002203 AS
CLASSID,
CREATED_BY_USER_OBJECT_ID,
CREATED_BY_USER_CLASS_ID,
CREATED_BY_USER_OBJECT_NAME,
CREATED_AT,
EDIT_AT_DATETIME, MODIFIED_AT
FROM
<%SCHEMA%>.ODP_ODP_VEN_MODIFICATION_WF
WHERE
CONTEXTID=<%CONTEXT(odp.vendormgmt.wf_vendor_modification)%>
UNION
ALL
SELECT
OBJECTID,
10002213 AS
CLASSID,
CREATED_BY_USER_OBJECT_ID,
CREATED_BY_USER_CLASS_ID,
CREATED_BY_USER_OBJECT_NAME,
CREATED_AT,
EDIT_AT_DATETIME, MODIFIED_AT
FROM
<%SCHEMA%>.ODP_ODP_VEN_REGISTRATION_WF
WHERE
CONTEXTID=<%CONTEXT(odp.vendormgmt.wf_vendor_registration)%>
)
T3 ON
T3.OBJECTID = <%COALESCE%>(T1.ROOT_PARENT_OBJECT_ID,
T1.BIZ_DOC_OBJECT_ID) AND
T3.CLASSID = CASE WHEN
T1.ROOT_PARENT_OBJECT_ID IS NULL THEN T1.BIZ_DOC_CLASS_ID ELSE
T1.ROOT_PARENT_CLASS_ID END
WHERE
T1.CONTEXTID=<%CONTEXT(workflow.process)%> AND
(T2.PHASE_SUB_REF_OBJECT_NAME like ?OR T2.BIZ_DOC_OBJECT_NAME like
?)
<%ORDERBY%>
Please suggest how can I change the query accordingly.
Also , please suggest how can add the result fields for calculating the duration(created at - Action date).
Please do the needful.
Thanks and Regards
Ganga