Wednesday, March 13, 2013

Oracle Projects API (PA_PROJECT_PUB) and Function Security

Oracle Projects API (PA_PROJECT_PUB) and Function Security

A customer wanted to work with project module APIs to perform standard project tasks (create and update projects, create and update project tasks, add key members to projects, etc).


Oracle provides a number of APIs within the pa_project_pub API for just that purpose, those include:


pa_project_pub.create_project
pa_project_pub.update_project
pa_project_pub.create_task
pa_project_pub.update_task  

These APIs are actually pretty straightforward and when I tested them in my system, they worked great.  When my customer ran these APIs, he received the following error:

PA_PA_FUNCTION_SECURITY_ENFORCED_--Your current responsibility does not have access to this function

We were running the API in API Wizard (an Excel software product which works dynamically with Oracle EBS APIs) but we also tested at the command line and received the same issue.  In both cases, we were running following initialization:

    fnd_global.apps_initialize (
        user_id         => 19616,
        resp_id         => 52896,
        resp_appl_id    => 275

        );

This responsibility (resp_id 52896) had the ability to create and update project tasks via the Oracle forms.  It took as a while to figure this out but the issue was that the customer had created a custom menu for projects that did not include the Activity Management Gateway functions, such as:

PA_PM_CREATE_PROJECT - Activity Management Gateway:Create Project
PA_PM_UPDATE_PROJECT - Activity Management Gateway:Update Project
PA_PM_ADD_TASK       - Activity Management Gateway:Add Task 
PA_PM_UPDATE_TASK    - Activity Management Gateway:Update Task

So we went to the Menus form (System Administrator > Application > Menu) and added them.  Viola!  Everything worked.

I verified that this is the same in R11 and R12.  

While our issue was due to custom responsibility with a custom menu, not all of the delivered responsibilities using the standard menus have access to these functions, for example the Project Manager Super User does have access by default while the Project Costing Super User does not.  So you can definitely run into this issue using a seeded responsibility.  The key is making sure that the functions listed above are available.

Another thing to note is that if you use a responsibility based on a menu that has these functions, you must also ensure that there none of these are part of a function exclusion for the target responsibility.

A last note, Projects is the only module I have seen so far where access to be able to use APIs is restricted by a function assigned (or in this case unassigned or excluded) to a menu.  If you've run into this in any other modules, please let me know!

You can use API Wizard to create and update your projects, tasks, and more!

API Wizard has pre-built Loaders for common projects activities, including creating and updating projects and tasks.  This ready-to-go solution will save you from investing time and development effort into a custom solution.  Here is are a couple of screenshots of API Wizard Project Loaders:

Create Full Project:  

This Loader allows you to create Projects, tasks, key members, structure details, and more all in one Excel worksheet:




Add or Update Project Tasks:

This Loader allows you to easily add or update project tasks.  This 'Task-Only' Loader is perfect for projects that have lots of tasks and you need an easy way to manage them all.













Project Assets and Assignments:


This Loader allows you to easily create your Project Asssets and Assignments.  



Project Budgets:

This Loader allows you to easily create your project budgets.  For those organizations that budget at the task or sub-task level this can be a time-consuming process.  With API Wizard, it's simple and efficient.



If you want to build your own Projects solution, good luck!  If you want to use API Wizard for your Project creation and maintenance, contact us at info@api-wizard.com

See more about what API Wizard can do at:

www.api-wizard.com




No comments:

Post a Comment

Please add your feedback, experience, or questions!

Popular Posts

Total Pageviews