BizTech_Blog_Header

BizTech Blog

Tips for troubleshooting Purchase Order Import errors with Projects

Posted by Jonathan LeBlanc

Find me on:

Aug 15, 2011 4:00:30 AM

Recently, I received a call from a customer requesting my assistance with troubleshooting Purchase Order Import errors in R12. The customer was trying to import 1000 purchase orders that were related to projects. They were encountering the following error and were having difficulty finding the root cause as the message was vague:

Project information on the distribution is not valid. &PJM_ERROR_MSG

Here are some tips on places to look to resolve such issues:

Pre-requisites

The following setups must be complete prior to importing Purchase Orders tied to projects:

  • Define the expenditure organization
  • Define the expenditure type
  • Define the project
  • Define the tasks and assign to the project

Troubleshooting

Is the Project defined properly within the correct operating unit?

The following query should return a record with the project details for the project within the operating unit. If the query does not return a record, check that the project has been created within the operating unit.

BEGIN

PO_MOAC_UTILS_PVT.SET_ORG_CONTEXT (&org_id);

END;

SELECT pap.*

FROM pa_projects_expend_v pap

WHERE pap.project_id = &project_id

Is the Task defined properly and assigned to the project?

The following query should return a record with the project task details for the project and task within the operating unit. If the query does not return a record, check to see that your project and tasks have been defined within the operating unit you are working in.

BEGIN

PO_MOAC_UTILS_PVT.SET_ORG_CONTEXT (&org_id);

END;

SELECT pat.*

FROM pa_projects_expend_v pap,

pa_tasks_expend_v pat

WHERE pap.project_id = &project_id

AND pap.project_id = pat.project_id

AND pat.task_id = &task_id

AND pat.chargeable_flag = ‘Y’

Is the Expenditure Type defined properly?

The following query should return a ‘Y’. If a ‘Y’ is not returned, check to see that your expenditure type has been set up properly.

BEGIN

PO_MOAC_UTILS_PVT.SET_ORG_CONTEXT (&org_id);

END;

SELECT ‘Y’

FROM pa_expenditure_types_expend_v pet

WHERE pet.expenditure_type = &exp_type

AND pet.system_linkage_function = ‘VI’

Is the Expenditure Organization defined properly?

The following query should return a ‘Y’. If a ‘Y’ is not returned, check to see that your organization has been set up as an expenditure org and that it has been added to your hierarchy.

BEGIN

PO_MOAC_UTILS.PVT.SET_ORG_CONTEXT (&org_id);

END;

SELECT ‘Y’

FROM po_organizations_expend_v pou

WHERE pou.organization_id = &exp_org_id

Is the Expenditure Item Date within the Project and Task dates?

The following should return a ‘Y’. If a ‘Y’ is not returned, check the start and completion dates of the project to ensure that your expenditure date falls within the range. Also check to ensure your date format is correct for the expenditure item date within the distributions interface table.

BEGIN

PO_MOAC_UTILS_PVT.set_org_context(&org_id);

END;

DECLARE

l_temp varchar2(1);

--replace this with your expenditure item date

x_expenditure_item_date date := to_date('25-OCT-10','DD-MON-RR');

BEGIN

SELECT 'Y'

INTO l_temp

FROM pa_projects_expend_v pap,

pa_tasks_expend_v pat

WHERE pap.project_id = &project_id

AND pap.project_id = pat.project_id

AND pat.task_id = &task_id

AND pat.chargeable_flag = 'Y'

AND x_expenditure_item_date BETWEEN

nvl(pap.start_date,x_expenditure_item_date)

AND nvl(pap.completion_date,x_expenditure_item_date)

AND x_expenditure_item_date BETWEEN

nvl(pat.start_date,x_expenditure_item_date)

AND nvl(pat.completion_date,x_expenditure_item_date);

dbms_output.put_line(l_temp);

exception

when others then

dbms_output.put_line(sqlerrm);

null;

END;

Topics: E-Business Suite