Project and Portfolio Management Practitioners Forum
cancel

SQL to know current eligble step for the project

Highlighted
Phanishwar
Honored Contributor.

SQL to know current eligble step for the project

How can we know that what is the name of the current eligible wf name for a project. do anyone have such query or table details for the same?

thanks in advance!!
2 REPLIES
Semenov Alexand
Acclaimed Contributor.

Re: SQL to know current eligble step for the project

Hi.
Use this tables:

PM_Project.PRF_REQUEST_ID=
KNTA_REQUESTS.REQUEST_ID
KNTA_REQUESTS.WORKFLOW_ID=
KWFL_WORKFLOWS.WORKFLOW_ID
Bobby M
Trusted Contributor.

Re: SQL to know current eligble step for the project

Hi,

Can u try this, add the project name if you want to retrieve for individual ones.

SELECT DISTINCT req.request_id reqid, kfp.project_name,
wfs.step_name stepname, wfshe.status,
(SELECT full_name
FROM knta_users
WHERE user_id = wfshe.last_updated_by) fullname,
st.result_value transition_value
FROM kcrt_requests req,
kwfl_workflows wf,
kwfl_step_transactions st,
kwfl_workflow_steps wfs,
kwfl_step_transaction_history wfshe,
kcrt_fg_pfm_project kfp
WHERE req.request_id = st.top_instance_source_set_id
AND wf.workflow_id = wfs.workflow_id
AND st.workflow_step_id = wfs.workflow_step_id
AND wfshe.status = 'ELIGIBLE'
AND st.step_transaction_id = wfshe.step_transaction_id
AND req.request_id = kfp.request_id
-- AND kfp.project_name = 'ACE'
AND st.result_value IS NULL
ORDER BY kfp.project_name

Thanks
Bobby