Hi Rajkumar,
Your error message is:
ORA-00001: unique constraint (NIKU.NBI_PROJECT_FORECAST_PK) violated
Looks like the Datamart is trying to insert a record which is already there (duplicate). We will have to find out which is the erroneous record, why it's there and how to resolve the issue.
The primary key is on: PROJECT_ID and PLAN_TYPE. Please run the query:
select project_id, plan_type, count(*) from (
SELECT PLANS.OBJECT_ID PROJECT_ID,
CASE WHEN CL.LOOKUP_CODE= 'BUDGET' THEN 50343 ELSE 50342 END PLAN_TYPE
FROM
INV_INVESTMENTS INV
JOIN FIN_PLANS PLANS ON (INV.ID = PLANS.OBJECT_ID AND PLANS.IS_PLAN_OF_RECORD = 1 )
JOIN PAC_MNT_PROJECTS pmt ON (pmt.ID=INV.ID AND LOCATIONID IS NOT NULL AND DEPARTCODE IS NOT NULL)
JOIN CMN_LOOKUPS CL ON (PLANS.PLAN_TYPE_CODE =CL.LOOKUP_CODE AND CL.LOOKUP_TYPE = 'FIN_PLAN_TYPE' )
LEFT OUTER JOIN INV_PROJECTS PROJECTS ON INV.ID=PROJECTS.PRID
WHERE NVL(PROJECTS.IS_TEMPLATE,0)=0
)
group by project_id, plan_type
having count(*) >1
See if you have any duplicates, if you do, look in UI to see if you can identify/fix it.
I do recommend you to raise a case with us in Support so we dig deep into this issue and figure it out. When you do, please let me know what the issue number is.
Thank you -Nika