Creating Project Tasks with pa_project_pub - Issue when parent task created in form vs. create with API
The Oracle Projects public APIs pa_project_pub.create_project and pa_project_pub.update_project have the ability to, among other things, load multiple tasks in a single API call, including tasks with parent-child relationships. For example, you can create 10 tasks, each with 5 sub-tasks, and those sub-tasks might have 3 sub-sub-tasks, etc. When loading multiple tasks in a single API call, the 'task_id' of the tasks are not yet generated, so in order to allow the creation of parent-child relationships, the projects API has a mandatory parameter called 'pm_task_reference'. When you want to create a task as the child of another task, you can pass the pm_task_reference of the parent into a second parameter called 'pm_PARENT_task_reference' for the child. This works well.
However, when a task is entered through the forms, the pm_task_reference is not populated, so you cannot use that value in the pm_PARENT_task_reference parameter to create a child using the API. In this case, you must use the another parameter, 'pa_PARENT_task_id', which is the task_id of the parent task. In this case, since the parent task has previously been created; the task_id exists and can be used.
As it turns out, the task_id (passed to the pa_PARENT_task_id parameter) can be used for both parent tasks created through the API and for parent tasks created through the forms as long as the parent task already exist. So if you are adding sub-tasks to existing tasks, you should use the pa_PARENT_task_id.
This is explained in the Oracle Note: PA_PROJECT_PUB.Add_task Errors - Parent Tasks Must Be Specified Before The Child Task (Doc ID 1108470.1)
As an FYI, tasks can also be created and updated using the create_task, add_task, load_task, update_task, delete_task procedures - these use scalar parameters rather than the table-types used in create_project and update_project.
Working with Oracle APIs, Open Interfaces, Reports, Excel, BI to get stuff done! API Wizard (www.api-wizard.com) is a productivity tool for Oracle EBS data entry, data updates, and reporting for Oracle and Oracle EBS using a Microsoft Excel user interface and a powerful Oracle backend. The purpose of this blog is to share our knowledge working with Oracle APIs and interfaces - so that whether you're using API Wizard or building custom integrations, you can leverage what we've been working on.
Friday, January 25, 2019
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Oracle Projects API (PA_PROJECT_PUB) and Function Security A customer wanted to work with project module APIs to perform standard project ...
-
Working with Purchase Order Import (Import Standard Purchase Orders - POXPOPDOI) A prospective customer wants to use API Wizard to load pu...
-
Where do I find info about Oracle EBS Public APIs? This is a question that I get multiple times each week in my role at API Wizard (a soft...
-
Oracle EBS API to create a Phone Number (contacts) in R12 HZ_CONTACT_POINT_V2PUB.CREATE_PHONE_CONTACT_POINT This API is relatively easy to...
-
WIP Discrete Jobs and wip_job_schedule_interface / Allow Explosion and Scheduling One of our customers was working with a process to creat...
-
Vendor Site trx failed: Inconsistent data entered as compared to TCA records. Working with supplier site API ap_vendors_pub_pkg.create_ven...
-
At long last, EBS customers can enter physical inventory counts and adjustment approvals through a new public API. Phyiscal Inventory count...
-
NLS_LANGUAGE what a pain... Oracle EBS issue I have a customer who has a report that works great in the U.S. but when they rolled the repo...
-
Creating Project Tasks with pa_project_pub - Issue when parent task created in form vs. create with API The Oracle Projects public APIs pa...
-
Controlling Accounting when Creating Receipt via AR_RECEIPT_API_PUB.CREATE_CASH A prospect asked this question during an API Wizard Demo: ...
The blog is informative and I understood that pa_PARENT_task_id is a better option to use than pm_PARENT_task_reference when you are creating a sub task because pm_PARENT_task_reference is not populated when a task is created through oracle forms.
ReplyDelete