Oracle Apps Search

Wednesday, July 14, 2010

Invoice By Bill Transaction Currency Checkbox update with 'FRM-40200: Field is protected against update'



We will be able to modify the 'Invoice By Bill Transaction Currency' Checkbox unless there is baselined funding on the Project and following conditions represent whether this flag is updateable, with the error 'FRM-40200: Field is protected against update',

Non-zero baselined funding amount exists for the project

SELECT sum(nvl(allocated_amount,0))
FROM PA_PROJECT_FUNDINGS
WHERE PROJECT_ID = &p_project_id
AND budget_type_code = 'BASELINE';


Draft funding lines exist for the project

SELECT 'Y'
FROM PA_PROJECT_FUNDINGS
WHERE PROJECT_ID = &p_project_id
AND budget_type_code = 'DRAFT';

PA events exist on the project

SELECT 'Y'
FROM dual
WHERE exists( SELECT project_id
FROM pa_events
WHERE project_id = &p_project_id);


Any expenditure items exist on the project

SELECT 'Y'
FROM dual
WHERE exists( SELECT T.project_id
FROM pa_expenditure_items_all E
, pa_tasks T
WHERE T.project_id = &p_project_id
AND E.task_id = T.task_id);


The project type is flagged for use in InterCompany Billing ( cc_prvdr_flag = 'Y') . This columns is found in pa_project_types_all

SELECT pt.cc_prvdr_flag
FROM pa_projects_all p
, pa_project_types_all
WHERE p.project_id = &p_project_id
AND pt.project_type = p.project_type
AND nvl(pt.org_id, -999) = nvl(p.org_id, -999);


And sometimes there could be a draft invoice being generated in the other than the transaction currency and we want to generate the draft invoice in the transaction currency, then we need to undo the Draft invoice update the 'Invoice By Bill Transaction Currency' Checkbox with the following query,
UPDATE pa_projects_all
SET INV_BY_BILL_TRANS_CURR_FLAG = 'N'
WHERE project_id = &p_project_id;

Print This Post