Call to pa_project_pub.add_task

Dear Experts,
I am Trying to Add Task ..That Procedure Runing Everything Fine..
I am Trying to Assign the Attribute Value Through Add Task Program ..That Values are not Updated...
Kindly Advice Me..
Given Below The source Code
Body {
pa_project_pub.add_task (
p_api_version_number => l_api_version_number,
p_commit => l_commit,
p_init_msg_list => l_init_msg_list,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_pm_product_code => l_pm_product_code,
p_pm_project_reference => l_pm_project_reference,
p_pa_project_id => l_pa_project_id,
p_pm_task_reference => l_pm_task_reference,
p_pa_task_number => l_pa_task_number,
p_task_name => l_task_name,
p_task_description => l_task_description,
p_carrying_out_organization_id => l_carrying_out_organization_id,
P_task_manager_person_id => l_task_manager_person_id,
p_task_start_date => l_task_start_date ,--- SIXTY,
p_attribute1 => l_attribute1,
p_pa_project_id_out => l_pa_project_id_out,
p_pa_project_number_out => l_pa_project_number_out,
p_task_id => l_task_id_out);
I am Struggle in this point - p_attribute1
Thanks in Advance...
Thanks and Regards,
Kumar

To update this thread, we found that the issue has appeared because the NOCOPY hint has been added to many parameters and we were using the same variable for p_pa_project_id and p_pa_project_id_out.
In 11i, where the NOCOPY hint is not used, thre is no problem.
In R12, where the NOCOPY hint is used, there is a problem due to the way the NOCOPY hint is processed. When the API is called and the same variable is used for p_pa_project_id and p_pa_project_id_out, the memory location of the variable is flushed. Since the same variable is passed, the memory location is the same. Thus, the procedure does not see the value supplied in the variable before calling the API.
The solution for us was to use 2 different variables for the IN and OUT parameters. With this change, the value provided for p_pa_project_id is not wiped out and the task is added.
This issue could present itself for any call to a function or procedure where the same variable is used as a parameter in the call, if the NOCOPY hint is used on one or more parameters that the variable is assigned to. This is not specific to EBSO, but applies to all Oracle PL/SQL. I was able to reproduce the situation on an earlier DB version using the NOCOPY hint

Similar Messages

  • Not able to access pa_project_pub.add_task API

    Hi,
    I am not able to execute pa_project_pub.add_task. I get "*Your current responsibility does not have access to this function*" message when i execute my custom procedure from toad. I also tried for other responsibility but i get same error.
    I was able to create budget with same responsibility "Projects, Vision Operations (USA)".
    BEGIN
         fnd_global.APPS_INITIALIZE(1005151,20420,275,0);
         DBMS_APPLICATION_INFO.SET_CLIENT_INFO (204);
    --custom procedure which calls pa_project_pub.add_task api
         pkg_task_upload.tasks_main;
    END;
    Can any one please let me know what could be the problem.
    Regards,
    Sonali

    Are you using a vision instance? Which release are you in?
    If the issue is yet to be resolved after checking and compiing the invalid objects, as suggested by Hussein, then you can do the following:
    - Check the responsibility ID of "Projects, Vision Operations (USA)", the one you are using. In vision instances the responsibility ID 20420 (as provided in apps_initialize) is little odd. In 11.5.10.x and R12 vision instances the responsibility ID is normally 56486. Though it can be different in your instance.
    - If the responsiblity ID is correct OR you are using a different responsibility then check whether responsibility Menu is having "Open Integration Toolkit Funtions Menu" submenu (without any prompt) assigned and active (grants checkbox). Please also check within this submenu whether "Activity Management Gateway:Add Task" function is assigned and active (grants checkbox)
    - For seeded Project responsibilities the submenu & underlying function is seeded, but if you using a non project responsibility for creating project/ task etc then that responsibility should have "Open Integration Toolkit Funtions Menu" submenu (without any prompt) assigned and active.
    Thanks
    Supro

  • Can we debug the package pa_project_pvt.add_class_categories which is called in Pa_project_pub.create_project?

    We are trying to create a project using the api code pa_project_pub.create_project. But we are unable to create due to some unexpected error status flag when pa_project_pvt.add_class_categories is executed. We  tried by going through the code but it was in vain.
    So couple of questions from our side.
    1) Can we debug the package procedure pa_project_pvt.add_class_categories by any chance?
    2) If yes, then what is the debugging process?
    Any help in this regard would be helpful.
    Thanks in advance.

    Hi,
    you may try to enable debugging via Sysadmin responsibility by setting following profile options, either for a certain user (preferred) or a certain responsibility:
    - "FND: Debug Log Enabled" set it to yes
    - "FND: Debug Log Level" set it to 1 (but only temporarily, as it generates lots of loggings)
    - "FND: Debug Log Module" set it to "pa" or "PA"
    You'll have to log off and login to apps again for the profile options to come into effect.
    Before you start your process, have a look at fnd_log_messages table (write down last value LOG_SEQUENCE,
    so you can identify the loggings for your process easier) by filtering column log_sequence, module and user_id
    (which is the user_id coming from fnd_user table).
    Make sure that you set apps context (fnd_global.apps_initialize) correctly before the logic of your api call starts.
    Regards.

  • Error in calling pa_project_pub.UPDATE_TASK to update attribute8 of pa_task

    Hi All,
    I am calling procedure pa_project_pub.UPDATE_TASK to update attribute8 od pa_tasks, it runs fine if one setup WORKPLAN is disabled, but when it is enabled, this API gives me following error
    The flex field values you have entered are invalid.
    User-Defined Exception in Package PA_PROJ_TASK_STRUC_PUB Procedure update_task_structure
    Do any body have any ideas, how to tackle this setup in API. I want to run this API successfully irrespective of this setup.
    I found one parameter p_structure_type in this API pa_project_pub.UPDATE_TASK, i tried to pass 'WORKPLAN' for this. but then it gives me error
    Wrong structure type provided. Either the Workplan structure does not exist for this project.
    Any idea would help..
    Thanks

    Hi All,
    Thank you All.
    Actualy I was watching the thread and got no Reply.this enable me to search more for the cause and eventually for the solution.
    The Error "The flex field values you have entered are invalid" was because of DFF values only. I found this solution from API code only. It takes me to PA_PROJECTS_PVT where I Found the Error Code and then to flex field validation and then to Task utility Package.
    Actually when you are not passing any value for Attributes, It will take the Old values only. and If the old values fails to Validate, this issue may arise. Same was the cause in this case. For An attribute the Value Set was "Standard Date" and it was accepting "DD-MON-RRRR" from Front End, but keeping "DD-MON-RRRR HH:MI:SS" as a value in the Attribute. For Eg. 12-DEC-2012 will be stored as 12-DEC-2012 00:00:00. It was there for almost all the Tasks.
    And when it was passed internally to API, It was causing the Error that Value enterted are Invalid.
    I came to know only after running the Desc Flex Field Validate API, which PA_PROJECTS_PVT was using.
    Got the Solution and feel like sharing with you all.
    Thanks,
    Amit

  • API pa_project_pub.UPDATE_TASK is not updating attributes

    Hi All,
    I am facing a strange problem in calling API pa_project_pub.UPDATE_TASK. It updates fields like task name, description etc, but it doesn;t updates attribute8, or any attribute fields. The DFF which is on this table pa_tasks, is context basis, and we are updating it for 'Shipping' context, and I am giving this value means 'Shipping' in attribute_category fields, becasue in table pa_tasks, it stores this value in attribute_category only.
    Below is the code, i m using... Please let me know if I am missing any parameter, becasue this API is giving SUCCESS, so I dont know why the values are not getting updated.
    pa_project_pub.UPDATE_TASK(p_api_version_number => 1.0,
    p_commit => FND_API.G_TRUE,
    p_init_msg_list => FND_API.G_TRUE,
    p_msg_count => l_msg_count,
    p_msg_data => l_msg_data,
    p_return_status => l_return_status,
    p_pm_product_code => 'SERVICE REQUEST',
    p_pa_project_id => '18090',
    p_pm_task_reference => '90000',
    p_pa_task_id => p_task_id,
    p_service_type_code => 'NORDIC_EMLP_PROJECT',
    p_attribute_category => 'Shipping',
    p_attribute8 => 'test1',
    p_out_pa_task_id => p_out_pa_task_id,
    p_out_pm_task_reference => p_out_pm_task_reference,
    p_update_task_structure => 'Y');
    Thanks and Regards,
    Nidhi

    Are you using a vision instance? Which release are you in?
    If the issue is yet to be resolved after checking and compiing the invalid objects, as suggested by Hussein, then you can do the following:
    - Check the responsibility ID of "Projects, Vision Operations (USA)", the one you are using. In vision instances the responsibility ID 20420 (as provided in apps_initialize) is little odd. In 11.5.10.x and R12 vision instances the responsibility ID is normally 56486. Though it can be different in your instance.
    - If the responsiblity ID is correct OR you are using a different responsibility then check whether responsibility Menu is having "Open Integration Toolkit Funtions Menu" submenu (without any prompt) assigned and active (grants checkbox). Please also check within this submenu whether "Activity Management Gateway:Add Task" function is assigned and active (grants checkbox)
    - For seeded Project responsibilities the submenu & underlying function is seeded, but if you using a non project responsibility for creating project/ task etc then that responsibility should have "Open Integration Toolkit Funtions Menu" submenu (without any prompt) assigned and active.
    Thanks
    Supro

  • ADD_TASK

    HI ,
    I'm using PA_PROJECT_PUB.ADD_TASK to add a new task
    API returns error status E but error information as only *'PA'*
    can anyone please help me what the error means
    following is my code
    BEGIN
    PA_PROJECT_PUB.ADD_TASK(p_msg_count => x_msgcount
    ,p_msg_data =>x_msgdata
    ,p_return_status =>x_retstatus
    ,p_pa_project_id_out => x_projectid
    ,p_pa_project_number_out => x_projectNum
    ,p_api_version_number => 1.0
    ,p_commit => FND_API.G_TRUE
    ,p_pa_project_id =>ln_projectid
    ,p_pa_task_number =>rec.TASK_NUMBER
    ,p_task_name =>rec.TASK_NAME
    ,p_long_task_name =>rec.LONG_TASK_NAME
    ,p_task_description =>rec.TASK_DESC
    ,p_task_start_date =>rec.TASK_START_DATE
    ,p_task_completion_date =>rec.TASK_END_DATE
    ,p_pa_parent_task_id =>ln_taskid
    ,p_carrying_out_organization_id =>ln_orgid
    ,p_service_type_code => lc_servicetype_code
    ,p_task_manager_person_id=>ln_taskmgr_id
    ,p_billable_flag => rec.BILLABLE_FLAG
    ,p_chargeable_flag=>rec.CHARGABLE_FLAG
    ,p_actual_start_date=>rec.ACTUAL_START_DATE
    ,p_actual_finish_date => rec.ACTUAL_FINISH_DATE
    ,p_early_start_date => rec.EARLY_START_DATE
    ,p_early_finish_date => rec.EARLY_FINISH_DATE
    ,p_late_start_date => rec.LATE_START_DATE
    ,p_late_finish_date => rec.LATE_FINISH_DATE
    ,p_scheduled_start_date => rec.SCHEDULED_START_DATE
    ,p_scheduled_finish_date => rec.SCHEDULED_FINISH_DATE
    ,p_pm_product_code => 'MIGRATION'
    ,p_task_id =>x_taskid
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Return Status :'||x_retstatus||' x msg Count '||xmsgcount||' x_msg dat : '||x_msgdata);
    IF x_msgcount>0 THEN
    FOR j IN 1..x_msgcount LOOP
    PA_INTERFACE_UTILS_PUB.get_messages(p_msg_count => x_msgcount
    ,p_msg_index=>j
    ,p_encoded => 'F'
    ,p_msg_data => x_msgdata
    ,p_data => l_data
    ,p_msg_index_out => l_msg_index_out);
    FND_FILE.put_line(FND_FILE.OUTPUT,'Validation Error ->'||substr(l_data,1,250)||' x_msg data '||x_msgdata); --||' for project Number '||i.project_number);
    --- x_retcode:=-1;
    END LOOP;
    END IF;
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' Exiting API program ..... ');
    EXCEPTION
    WHEN OTHERS THEN
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' Sql Error : '||SQLERRM);
    END;
    Output File
    Return Status :E x msg Count 1 xmsg dat : PA
    Thanks For Your Help
    Thanks
    Ravi

    Hi hsawwan,
    Sorry for the duplicate post. As I couldnt get the reply from the other category. I thought posting in general category may help me, so I posted here
    Do you have any thoughts on why it is showing the error as just PA
    Also,when I print x_msgdata, No other lines after that line will get printed in output file
    Like the following line is not seen in output file
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' Exiting API program ..... ');
    Thanks For Your Help
    Thanks
    Ravi

  • Error Project ID is invalid(pa_project_assets_pub.add_project_asset)

    Dear All(s)
    Whenever i try to run pa_project_assets_pub.add_project_asset API. it gives me error Project ID is Invaild. Any body can help me in this regards.
    declare
    v_MSG_COUNT number;
    v_MSG_DATA varchar2(1000);
    v_return_status varchar2(1000);
    v_PA_PROJECT_ID_OUT NUMBER;
    v_PA_PROJECT_NUMBER_OUT VARCHAR2(1000);
    v_PA_PROJECT_ASSET_ID_OUT NUMBER;
    v_PM_ASSET_REFERENCE_OUT VARCHAR2(1000);
    begin
    FND_GLOBAL.APPS_INITIALIZE(1013472,55653,275); User Id rep ID--APP Id
    /*pa_interface_utils_pub.Set_Global_Info(p_api_version_number => 1,
    p_responsibility_id => 55653,
    p_user_id => 1013472,
    p_resp_appl_id => 275,
    p_operating_unit_id => 1448,
    p_msg_count => v_msg_count,
    p_msg_data => v_msg_data,
    p_return_status => v_return_status
    -- Call the procedure
    pa_project_assets_pub.add_project_asset(p_api_version_number => '1.0',
    p_commit => FND_API.G_FALSE,
    p_init_msg_list => FND_API.G_FALSE,
    p_msg_count => v_MSG_COUNT,
    p_msg_data => v_MSG_DATA,
    p_return_status => v_return_status,
    p_pa_project_id_out => v_pa_project_id_out,
    p_pa_project_number_out => v_pa_project_number_out,
    p_pa_project_asset_id_out => v_pa_project_asset_id_out,
    p_pm_asset_reference_out => v_pm_asset_reference_out,
    p_pm_product_code => 'PA',--*
    p_pa_asset_name => 'z2',
    p_asset_number => null,--'zAsif2',
    p_asset_description => 'z2',
    p_pa_project_id => 1842,
    p_depreciate_flag => 'Y',
    p_amortize_flag => 'N',
    p_project_asset_type => 'ESTIMATED',
    p_estimated_asset_units => 1
    dbms_output.put_line('v_return_status '||v_return_status);
    dbms_output.put_line('v_msg_data '||v_msg_data);
    dbms_output.put_line('v_msg_count '||v_msg_count);
    dbms_output.put_line(APPS.FND_MSG_PUB.GET(p_msg_index => APPS.FND_MSG_PUB.G_LAST, p_encoded => APPS.FND_API.G_FALSE));
    end;
    Regards
    Muhammad Asif

    Please see these docs.
    AMG PA_PROJECT_PUB.ADD_TASK or UPDATE_TASK Fails With Project ID is Invalid [ID 337694.1]
    LINKING PROJECT WITH WORK ORDER GIVES ERROR [ID 1063407.1]
    Cannot Sync Projects From Primavera P6 To Oracle Projects For Two Operating Units [ID 1282632.1]
    Software Updates for Oracle Projects Rollup Patch 4 for Oracle Projects Family Pack M (11i.PJ_PF.M) [ID 423428.1]
    Thanks,
    Hussein

  • Project Task Upload

    which api I can use to create task in already created project I am using this api PA_PROJECT_PUB.ADD_TASK to create task in already create prject before
    I use the following query  and query run successfully but not task add in project please guide me
    the out put of query is given below
    anonymous block completed
    Set Global status ->S
    Return Status =
    in procedure task_id is a output parameter but it did not prin (Return Status =  )
    declare
    L_API_VERSION_NUMBER number := 1.0;
    L_COMMIT varchar2(1) := 'F';
    L_INIT_MSG_LIST varchar2(1) := 'F';
    L_MSG_COUNT number;
    L_MSG_DATA varchar2(2000);
    L_RETURN_STATUS varchar2(1);
    L_PM_PRODUCT_CODE varchar2(10);
    L_PM_TASK_REFERENCE           varchar2(25);
    L_PA_TASK_NUMBER    varchar2(100);
    L_TASK_NAME varchar2(240);
    L_PM_PARENT_TASK_REFERENCE varchar2(25);
    L_TASK_DESCRIPTION varchar2(2000);
    L_PA_PROJECT_ID  number;
    L_PM_PROJECT_REFERENCE varchar2(1000);
    L_MSG_INDEX_OUT number;
    L_DATA varchar2(2000);
    API_ERROR EXCEPTION;
    L_PA_PROJECT_ID_OUT number;
    L_PA_PROJECT_NUMBER_OUT varchar(1000);
    L_TASK_ID number;
    begin
    --Fnd_global.apps_initialize(user_id,resp_id, resp_appl_id);
    FND_GLOBAL.APPS_INITIALIZE(1509,22593,275);
    L_PM_TASK_REFERENCE := '1';
    L_PA_TASK_NUMBER   := '1';
    L_TASK_NAME  := 'Construction';
    L_PM_PARENT_TASK_REFERENCE :='';
    L_TASK_DESCRIPTION :='Plant function';
    L_PA_PROJECT_ID :=5001;
    l_PM_PROJECT_REFERENCE:='';
    -------calling global parameters---
    pa_interface_utils_pub.set_global_info
    p_api_version_number =>1.0,
    p_responsibility_id =>22593,
    p_user_id =>1509,
    p_msg_count =>l_msg_count,
    p_msg_data =>l_msg_data,
    P_RETURN_STATUS =>L_RETURN_STATUS
    DBMS_OUTPUT.PUT_LINE ('Set Global status ->' || L_RETURN_STATUS);
    l_pm_product_code := '';
    PA_PROJECT_PUB.ADD_TASK
    (P_API_VERSION_NUMBER=>L_API_VERSION_NUMBER,
    P_COMMIT => L_COMMIT,
    P_INIT_MSG_LIST => L_INIT_MSG_LIST,
    P_MSG_COUNT =>L_MSG_COUNT,
    P_MSG_DATA => L_MSG_DATA,
    P_RETURN_STATUS => L_RETURN_STATUS,
    P_PM_PRODUCT_CODE => L_PM_PRODUCT_CODE,
    P_PM_PROJECT_REFERENCE =>L_PM_PROJECT_REFERENCE,
    P_PA_PROJECT_ID =>l_PA_PROJECT_ID,
    P_PM_TASK_REFERENCE =>L_PM_TASK_REFERENCE,
    P_PA_TASK_NUMBER  =>L_PA_TASK_NUMBER,
    P_TASK_NAME =>L_TASK_NAME,
    P_TASK_DESCRIPTION =>l_task_description,
    P_PM_PARENT_TASK_REFERENCE =>L_PM_PARENT_TASK_REFERENCE,
    P_PA_PROJECT_ID_OUT =>L_PA_PROJECT_ID_OUT,
    P_PA_PROJECT_NUMBER_OUT =>L_PA_PROJECT_NUMBER_OUT,
    P_TASK_ID =>l_TASK_ID
    dbms_output.put_line('Return Status = ' ||l_TASK_ID);
    EXCEPTION WHEN api_error THEN
    dbms_output.put_line('An error occured duing project creation');
    if (L_MSG_COUNT > 0 ) then
    for I in 1..L_MSG_COUNT
    LOOP
    apps.PA_INTERFACE_UTILS_PUB.get_messages(
    p_msg_count => l_msg_count,
    p_encoded => 'F',
    p_msg_data => l_msg_data,
    p_data => l_data,
    p_msg_index_out => l_msg_index_out);
    dbms_output.put_line('Error message l_data ->'||l_data);
    dbms_output.put_line('Error message l_msg_data ->'||l_msg_data);
    END LOOP;
    end if;
    WHEN OTHERS THEN
    dbms_output.put_line('An error occured duing conversion, SQLCODE ->'|| SQLERRM);
    IF (l_msg_count >=1 ) THEN
    FOR i IN 1..l_msg_count LOOP
    PA_INTERFACE_UTILS_PUB.get_messages(
    p_msg_count => l_msg_count,
    p_encoded => 'F',
    p_msg_data => l_msg_data,
    p_data => l_data,
    p_msg_index_out => l_msg_index_out);
    dbms_output.put_line('Error message ->'||l_data);
    end LOOP;
    end if;
    end;
    and what is the differnce between  procedure for task
    PA_PROJECT_PUB.ADD_TASK and PA_PROJECT_PUB.LOAD_TASK

    PA_PROJECT_PUB.ADD_TASK

  • Issue with update_task API for updating Scheduled Dates for Task..

    Hi All,
    We have a requirement to update the project and task dates to a specified period from the current dates. I dont want to update all the tasks, and hence using the update_task API. The scheduled_finish_Date is the column from "pa_proj_elem_ver_schedule" which we want to update. As, this is the date which is shown on the Workplan tab for the tasks for (Scheduled Start and Scheduled Finish Date). I want to extend this scheduled_finish_Date to some days , say for eg. 60 days.
    To achieve, that update_task api is being used and the parameter for the scheduled_date is : p_scheduled_finish_date, this is passed as call to pa_project_pub.update_task API.
    We are also updating the completion data, which is happening fine and is updating the pa_tasks : completion_date column.
    Problem is with scheduled date, Please let me know how to go about this issue.
    Here is the sample code for calling the API :
    pa_project_pub.update_task
    (p_api_version_number => l_api_version_number_i,
    p_commit => l_commit,
    p_init_msg_list => l_init_msg_list,
    p_msg_count => l_msg_count,
    p_msg_data => l_msg_data,
    p_return_status => lt_return_status,
    p_pm_product_code => l_pm_product_code,
    --p_structure_updates_flag      => g_no,
    p_pm_project_reference => l_proj_reference,
    p_pa_project_id => p_project_id_i,
    p_pm_task_reference => p_pm_task_reference_i,
    p_pa_task_id => p_task_id_i,
    p_task_name => p_task_name_i,
    p_task_number => p_task_number_i,
    p_pa_parent_task_id => p_parent_task_id_i,
    p_task_completion_date => p_tsk_actual_finish_date_i,
    --Transaction Date (shown on the screen)
    p_scheduled_finish_date => p_tsk_sched_end_date_i,
    -- Scheduled Date (shown on the screen)
    p_out_pa_task_id => l_pt_task_id,
    p_out_pm_task_reference => l_pt_task_ref
    I am really not sure if I am missing anything here, please suggest as to how to update the Schedule Start and Finish Dates using the API.
    Waiting in anticipation!
    Thank you
    Anand.

    Hello,
    Make sure the wf is active in QA (re-activate if possible), check the transport for errors, check authorizations for WF-BATCH perhaps delete and recreate via SWU3?), refresh the buffers (SWU_OBUF).
    Please let me know if any of this helps.
    regards
    Rick Bakker
    Hanabi Technology

  • Create project task

    Hi,
    I wanted to know if there is an API to insert project tasks through pl/sql or we can do it through base tables directly. My requirement assumes inserting task for an existing project.
    Through my research, I came to find the api as pa_project_pub.add_task. But still looking into load/create a task.
    Edited by: Nel Marcus on Oct 3, 2011 3:48 PM

    Hi
    The API you have found - ADD_TASK is used to add new tasks to existing project.
    Dina

  • Pa_projects doesnt return any data

    HI,
    I'm using API PA_PROJECT_PUB.ADD_TASK to insert tasks data to PA_TASKS table
    The API returns me ' Invalid Project ' error message
    On exploring the procedure code I found that it is querying pa_projects table
    Also when I used the following in my toad
    begin
    fnd_client_info.set_org_context('204');
    end;
    select * from pa_projects -- it doesnt return any rows
    However the following query returns rows
    select * from pa_projects_all where org_id=204
    Can any one please help me how to populate pa_projects table or what data will be there in pa_projects
    Thanks for your help
    Regards
    Ravi

    Hi Sandeep,
    I followed the instructions mentioned , but I still get no rows returned
    Any more Suggestions ?
    Thanks
    Ravi

  • Pa_projects not getting populated

    HI,
    I'm using API PA_PROJECT_PUB.ADD_TASK to insert tasks data to PA_TASKS table
    The API returns me ' Invalid Project ' error message
    On exploring the procedure code I found that it is querying pa_projects table
    Also when I used the following in my toad
    begin
    fnd_client_info.set_org_context('204');
    end;
    select * from pa_projects -- it doesnt return any rows
    However the following query returns rows
    select * from pa_projects_all where org_id=204
    Can any one please help me how to populate pa_projects table or what data will be there in pa_projects
    Thanks for your help
    Regards
    Ravi

    Don't ask me why but try this
    Put this in toad
    begin
    fnd_client_info.set_org_context('204');
    end;
    And then hit F9 and then hit F5. And then try select * from pa_projects.
    Hope this answers your question
    Sandeep Gandhi
    Omkar Technologies Inc.
    Independent Techno-functional Consultant
    513-325-9026

  • Error while creating Project using API - PA_PROJECT_PUB.CREATE_PROJECT

    I am working on Projects conversion and currently trying to create a project using the API.
    I have recetified all the errors it was giving and struck at 1 error. please find the error message below.
    "You have submitted invalid parameters to this process, preventing its successful completion. Please contact your system administrator."
    It gives me this error and I was not able to know the cause for this error. Please let me know how to bypass this error and go ahead with projects conversion???
    Attached below is my package:
    Thanks,
    Kesava
    =====================================================================================================================
    CREATE OR REPLACE PACKAGE xxbwp.xxbwp_pa_proj_conv_pkg AUTHID CURRENT_USER
    IS
         PROCEDURE xxbwp_pa_proj_conv_proc(errbuf           OUT      VARCHAR2
                             ,retcode           OUT      VARCHAR2);
    END xxbwp_pa_proj_conv_pkg;
    CREATE OR REPLACE PACKAGE BODY xxbwp.xxbwp_pa_proj_conv_pkg
    IS
         PROCEDURE xxbwp_pa_proj_conv_proc(errbuf           OUT      VARCHAR2
                             ,retcode           OUT      VARCHAR2)
         IS
    v_data VARCHAR2(2000);
    v_index_out NUMBER;
         v_msg_count               NUMBER;
         v_msg_data               VARCHAR2(2000);
         v_return_status               VARCHAR2(1);
         v_api_version_number          NUMBER          :=     1.0;
         v_commit               VARCHAR2(1)     :=     apps.fnd_api.g_false;
         v_init_msg_list               VARCHAR2(1)     :=      apps.fnd_api.g_false;
         v_workflow_started          VARCHAR2(1)      :=      'Y';
         v_pm_product_code          VARCHAR2(30)      :=      NULL;
         v_op_validate_flag          VARCHAR2(1)      :=      'Y';
         v_project_in               apps.pa_project_pub.project_in_rec_type;
         v_project_out               apps.pa_project_pub.project_out_rec_type;
         v_customers_in               apps.pa_project_pub.customer_tbl_type;
         v_key_members               apps.pa_project_pub.project_role_tbl_type;
         v_class_categories          apps.pa_project_pub.class_category_tbl_type;
         v_tasks_in               apps.pa_project_pub.task_in_tbl_type;
         v_tasks_in_rec apps.pa_project_pub.task_in_rec_type;
    v_tasks_out               apps.pa_project_pub.task_out_tbl_type;
         v_org_roles               apps.pa_project_pub.project_role_tbl_type;
         v_structure_in               apps.pa_project_pub.structure_in_rec_type;
         v_ext_attr_tbl_in          apps.pa_project_pub.pa_ext_attr_table_type;
         v_deliverables_in          apps.pa_project_pub.deliverable_in_tbl_type;
         v_deliverable_actions_in     apps.pa_project_pub.action_in_tbl_type;
    -- Variables declaration related to project_in_rec_type
    l_pm_project_reference VARCHAR2(25);
    l_pa_project_id NUMBER;
    l_pa_project_number VARCHAR2(25);
    l_segment1 VARCHAR2(25);
    l_project_name VARCHAR2(30);
    l_description VARCHAR2(250);
    l_long_name VARCHAR2(240);
    l_department_mapping VARCHAR2(50);
    l_department_mapping_c VARCHAR2(50);
    l_department_mapping_e VARCHAR2(50);
    l_created_from_project_id NUMBER;
    l_carrying_out_organization_id NUMBER;
    l_proj_start_date DATE;
    l_completion_date DATE;
    l_temp_project_type VARCHAR2(30);
    l_company_id VARCHAR2(10);
    l_company_id_c VARCHAR2(10);
    l_company_id_e VARCHAR2(10);
    l_proj_type VARCHAR2(30);
    l_cnt NUMBER := 0;
    l_task_cnt NUMBER := 0;
    l_responsibility_id NUMBER;
    l_application_id NUMBER;
    l_user_id NUMBER;
    l_global_info_msg_count NUMBER;
    l_global_info_msg_data VARCHAR2(2000);
    l_global_info_return_status VARCHAR2(1);
    CURSOR C1 IS
    SELECT *
    FROM xxbwp.xxbwp_pa_proj_conv_tbl
    WHERE proj_type = 'STORAGE';
    begin
    FOR C1_REC in C1
    LOOP
    SELECT APPS.pa_projects_s.nextval
    INTO l_pa_project_id
    FROM DUAL;
    BEGIN
    SELECT description
                   INTO     l_proj_type
                   FROM apps.fnd_lookup_values
                   WHERE lookup_type = 'BWP_PROJECT_TYPES_LKP'
                   AND     lookup_code = C1_REC.proj_type
                   AND     1 = 1;
    END;
    BEGIN
    SELECT project_id, project_type, carrying_out_organization_id
    INTO l_created_from_project_id, l_temp_project_type, l_carrying_out_organization_id
    FROM apps.pa_projects_all
    WHERE project_type = l_proj_type
    AND template_flag = 'Y';
    END;
    BEGIN
    SELECT rt.responsibility_id, rt.application_id
    INTO l_responsibility_id, l_application_id
    FROM apps.fnd_responsibility_tl rt
    WHERE rt.responsibility_name = 'BWP PA Projects Superuser';
    EXCEPTION WHEN OTHERS THEN
    RETURN;
    END;
    BEGIN
    SELECT u.user_id
    INTO l_user_id
    FROM APPS.fnd_user u
    WHERE u.user_name = 'CHUNDURK';
    EXCEPTION WHEN OTHERS THEN
    RETURN;
    END;
    -- Set the environment
    APPS.pa_interface_utils_pub.set_global_info
    (p_api_version_number => 1.0
    ,p_responsibility_id => l_responsibility_id
    ,p_user_id => l_user_id
    ,p_resp_appl_id => l_application_id
    ,p_msg_count => l_global_info_msg_count
    ,p_msg_data => l_global_info_msg_data
    ,p_return_status => l_global_info_return_status);
    --Assign values to project_in_rec_type
    v_project_in.pm_project_reference := C1_REC.PROJ_NUM;
    v_project_in.pa_project_id := l_pa_project_id;
    v_project_in.pa_project_number := C1_REC.PROJ_NUM;
    v_project_in.project_name := C1_REC.PROJ_NAME;
    v_project_in.description := NULL;
    v_project_in.long_name := C1_REC.PROJ_LONG_NAME;
    v_project_in.created_from_project_id := l_created_from_project_id;
    v_project_in.carrying_out_organization_id := l_carrying_out_organization_id;
    v_project_in.start_date := C1_REC.trans_start_date;
    v_project_in.completion_date := C1_REC.trans_end_date;
    v_project_in.scheduled_start_date := C1_REC.trans_start_date;
    v_project_in.scheduled_finish_date := C1_REC.trans_end_date;
    v_project_in.project_status_code := 'APPROVED';
    FOR x IN (SELECT person_id, project_role_type, start_date_active, end_date_active
    FROM apps.pa_project_players
    WHERE project_id = 262)
    LOOP
    APPS.fnd_file.put_line(APPS.FND_FILE.LOG,'PERSON ID '||x.person_id);
    APPS.fnd_file.put_line(APPS.FND_FILE.LOG,'PROJECT ROLE TYPE '||x.project_role_type);
    l_cnt := l_cnt + 1;
    v_key_members(l_cnt).person_id := x.person_id;
    v_key_members(l_cnt).project_role_type := x.project_role_type;
    v_key_members(l_cnt).start_date := x.start_date_active;
    v_key_members(l_cnt).end_date := x.end_date_active;
    END LOOP;
    -- Retrieving and assigning tasks from template to a project
    FOR x IN (SELECT task_id, parent_task_id, task_name, long_task_name, task_number, description,
    billable_flag, cint_eligible_flag, chargeable_flag
    FROM apps.pa_tasks t
    WHERE t.project_id = l_created_from_project_id
    START WITH parent_task_id IS NULL CONNECT BY PRIOR task_id = parent_task_id)
    LOOP
    l_task_cnt := l_task_cnt + 1;
    v_tasks_in_rec.pm_task_reference := x.task_id;
    v_tasks_in_rec.task_name := x.task_name;
    v_tasks_in_rec.long_task_name := x.long_task_name;
    v_tasks_in_rec.pa_task_number := x.task_number;
    v_tasks_in_rec.task_description := x.description;
    v_tasks_in_rec.task_start_date := C1_REC.trans_start_date;
    v_tasks_in_rec.task_completion_date := C1_REC.trans_end_date;
    v_tasks_in_rec.scheduled_start_date := C1_REC.trans_start_date;
    v_tasks_in_rec.scheduled_finish_date := C1_REC.trans_end_date;
    v_tasks_in_rec.pm_parent_task_reference := x.parent_task_id;
    v_tasks_in_rec.billable_flag := x.billable_flag;
    v_tasks_in_rec.cint_eligible_flag := x.cint_eligible_flag;
    v_tasks_in_rec.chargeable_flag := x.chargeable_flag;
    v_tasks_in_rec.tasks_dff := 'Y';
    v_tasks_in_rec.attribute1 := l_pa_project_id;
    v_tasks_in(l_task_cnt) := v_tasks_in_rec;
    END LOOP;
    v_class_categories(0).class_category := 'Reimbursable';
    v_class_categories(0).class_code := 'No';
    APPS.FND_MSG_PUB.initialize;
    apps.pa_project_pub.create_project
    (p_api_version_number => v_api_version_number
    ,p_commit => v_commit
    ,p_init_msg_list => v_init_msg_list
    ,p_msg_count => v_msg_count
    ,p_msg_data => v_msg_data
    ,p_return_status => v_return_status
    ,p_workflow_started => v_workflow_started
    ,p_pm_product_code => v_pm_product_code
    ,p_op_validate_flag => v_op_validate_flag
    ,p_project_in => v_project_in
    ,p_project_out => v_project_out
    ,p_customers_in => v_customers_in
    ,p_key_members => v_key_members
    ,p_class_categories => v_class_categories
    ,p_tasks_in => v_tasks_in
    ,p_tasks_out => v_tasks_out
    ,p_org_roles => v_org_roles
    ,p_structure_in => v_structure_in
    ,p_ext_attr_tbl_in => v_ext_attr_tbl_in
    ,p_deliverables_in => v_deliverables_in
    ,p_deliverable_actions_in => v_deliverable_actions_in
    APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_return_status||' '||v_msg_count);
    IF v_msg_count > 0 THEN
    FOR i in 1 .. v_msg_count
    LOOP
    apps.pa_interface_utils_pub.get_messages
    (p_encoded => 'F'
    ,p_msg_count => v_msg_count
    ,p_msg_index => i
    ,p_msg_data => v_msg_data
    ,p_data => v_data
    ,p_msg_index_out => v_index_out);
    APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_data);
    END LOOP;
    END IF;
    END LOOP;
    end xxbwp_pa_proj_conv_proc;
    end xxbwp_pa_proj_conv_pkg;
    show errors;
    Edited by: user644005 on Sep 11, 2009 11:02 AM

    Hi Kesava,
    I notice that in the package you used the application user_name=CHUNDUK calls the API pa_project_pub.create_project.
    I wonder if you used chunduk as database user to execute the package Or you used APPS to execute the package?
    The APi document states that it is a requirement to create a db username as the same name with the application username.
    I have been running the problem to execute API 's delete project and try to figure what could be my problem.
    TIA

  • Error in executing PA_PROJECT_PUB package

    HI All,
    The "Create_Project" API of the package PA_PROJECT_PUB is invoked by the BPEL process : CreateProjectListOrderEbiz through "Oracle Applications Adapter", which would initiate the process of projects creation in EBS Projects. The BPEL is initiated by providing the xml source input and executed by "java delivery api"
    The API is erroring out with the following message :
    +com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault}+
    +messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}+
    +parts: {{code=1086+
    +,summary=file:/app/oracle/product/soa/bpel/domains/default/tmp/.bpel_CreateProjectListOrderEbiz_2.0_f8b3864fa9480f5334fcd28de33e4f27.tmp/CallSampleAPI.wsdl [ CallSampleAPI_ptt::CallSampleAPI(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CallSampleAPI' failed due to: Error while trying to prepare and execute an API.+
    An error occurred while preparing and executing the APPS.XX_BPEL_CALLSAMPLEAPI.PA_SAMPLE_API$CREATE_PROJECT API. Cause: java.sql.SQLException: ORA-01086: savepoint 'CREATE_PROJECT_PUB' never established
    ORA-06512: at "APPS.PA_SAMPLE_API", line 5649
    ORA-01086: savepoint 'ADD_KEY_MEMBERS_PVT' never established
    ORA-06512: at "APPS.PA_SAMPLE_PVT", line 500
    ORA-01086: savepoint 'CREATE_PROJECT_PARTY' never established
    ORA-06512: at "APPS.PA_PROJECT_PARTIES_PUB", line 351
    The xml source input for the bpel which is used while calling the API  from bpel is given below:
    +<InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/BPEL_TEST/PA_PROJECT_PUB-24CREATE_PROJECT/">+
    +<P_API_VERSION_NUMBER>1.0</P_API_VERSION_NUMBER>+
    +<P_COMMIT>F</P_COMMIT>+
    +<P_INIT_MSG_LIST>F</P_INIT_MSG_LIST>+
    +<P_PM_PRODUCT_CODE>PJM</P_PM_PRODUCT_CODE>+
    +<P_PROJECT_IN>+
    +     <PM_PROJECT_REFERENCE>Sample_proj7</PM_PROJECT_REFERENCE>+
    +     <PA_PROJECT_ID></PA_PROJECT_ID>+
    +     <PA_PROJECT_NUMBER>Sample_proj7</PA_PROJECT_NUMBER>+
    +     <PROJECT_NAME>Sample_proj7</PROJECT_NAME>+
    +     <LONG_NAME>Sample_proj7</LONG_NAME>+
    +     <CREATED_FROM_PROJECT_ID>2777</CREATED_FROM_PROJECT_ID>+
    +     <CARRYING_OUT_ORGANIZATION_ID>204</CARRYING_OUT_ORGANIZATION_ID>+
    +     <PUBLIC_SECTOR_FLAG>N</PUBLIC_SECTOR_FLAG>+
    +     <PROJECT_STATUS_CODE>UNAPPROVED</PROJECT_STATUS_CODE>+
    +     <DESCRIPTION>Sample_proj3</DESCRIPTION>+
    +     <START_DATE>2012-02-15</START_DATE>+
    +     <COMPLETION_DATE>2012-02-16</COMPLETION_DATE>+
    +     <CUSTOMER_ID>1004</CUSTOMER_ID>+
    +     <PROJECT_RELATIONSHIP_CODE>CLIENT</PROJECT_RELATIONSHIP_CODE>+
    +     <ENABLE_TOP_TASK_INV_MTH_FLAG>Y</ENABLE_TOP_TASK_INV_MTH_FLAG>+
    +     <ENABLE_TOP_TASK_CUSTOMER_FLAG>Y</ENABLE_TOP_TASK_CUSTOMER_FLAG>+
    +</P_PROJECT_IN>+
    +<P_OP_VALIDATE_FLAG>F</P_OP_VALIDATE_FLAG>+
    +<P_CUSTOMERS_IN>+
    +               <P_CUSTOMERS_IN_ITEM>+
    +<CUSTOMER_ID>1004</CUSTOMER_ID>+
    +<PROJECT_RELATIONSHIP_CODE>CLIENT</PROJECT_RELATIONSHIP_CODE>+
    +</P_CUSTOMERS_IN_ITEM>+
    +</P_CUSTOMERS_IN>+
    +<P_KEY_MEMBERS>+
    +<P_KEY_MEMBERS_ITEM>+
    +<PERSON_ID>25</PERSON_ID>+
    +<PROJECT_ROLE_TYPE>PROJECT MANAGER</PROJECT_ROLE_TYPE>+
    +</P_KEY_MEMBERS_ITEM>+
    +</P_KEY_MEMBERS>+
    +<P_CLASS_CATEGORIES>+
    +</P_CLASS_CATEGORIES>+
    +<P_TASKS_IN></P_TASKS_IN>+
    +<P_ORG_ROLES>+
    +<P_KEY_MEMBERS_ITEM>+
    +<PERSON_ID>453866</PERSON_ID>+
    +<PROJECT_ROLE_TYPE>PROJECT MANAGER</PROJECT_ROLE_TYPE>+
    +<PROJECT_ROLE_MEANING></PROJECT_ROLE_MEANING>+
    +<START_DATE>2012-02-20</START_DATE>+
    +<END_DATE>2012-02-21</END_DATE>+
    +</P_KEY_MEMBERS_ITEM>+
    +</P_ORG_ROLES>+
    +<P_STRUCTURE_IN>+
    +</P_STRUCTURE_IN>+
    +<P_EXT_ATTR_TBL_IN></P_EXT_ATTR_TBL_IN>+
    +<P_DELIVERABLES_IN></P_DELIVERABLES_IN>+
    +<P_DELIVERABLE_ACTIONS_IN></P_DELIVERABLE_ACTIONS_IN>+
    +</InputParameters>+
    Any inputs on debugging the api would be really appreciated
    Thanks and Regards
    Pavitra

    Run a level 12 trace. Then execute the call to the API from SQL*Plus. This issue will be much easier to debug in SQL*Plus than from your BPEL process.

  • Invoke E-Business Suite  PA_PROJECT_PUB.Update API via apps adapter

    Hi,
    I am trying to invoke an R12 API called PA_PROJECT_PUB.Update Project with the help of the apps adapter in J developer. I have set the context settings too in the invoke activity's properties, jca.apps.Username, jca.apps.Responsibility, jca.apps.RespApplication and jca.apps.ORG_ID.
    Is there a need to call the pa_interface_utils_pub.set_global_info or this will taken care of by the invoke parameters itself?
    any help would be much appreciated
    Thanks

    Hi,
    Instead of using PA_PROJECT_PUB. UPDATE API call use Ebiz SOAGateway to expose the PL/SQL API as service and it will take care of setting required apps context setting. Refer EBSR12 SOAGateway documentation.
    Regards,
    Ravisankar

Maybe you are looking for

  • SQL Dev 2.1 connected to a SQL Server query

    I use SQL developer to query oracle db's and from the Query result, if i right click i get the following options; Save grid as report... Single record view... Count Rows... Find/Highlight... Export Data However when i do this against an SQL server I

  • Why won't latest iTunes sync well with latest iPhoto albums?

    After doing extensive updates of iOS, iTunes and iPhoto today, iTunes now can't see all the photos in some iPhoto albums when syncing my iPhone 4S. Anybody having a similar problem?  Solutions? 

  • Question re: list of phone contacts

    hi there all i just got my iPhone, and i am kind of clueless on using it- but one question i have is regarding the way my phone list is alphabetized. my former phone (razor) had it by first name which is how i like it, but on the iPhone it is by last

  • Can't open imovie file!

    Oh please help! I am at my wits end. I created a 13 min short movie in Imovie 5.0.2, then copied it and made a shorter version of the film. But now whenever I try to open my original long version, it loads, pops open for a second then shuts down. I t

  • HT4623 I cannot access appstore in my iPad after updating to iOS7. How can I access it? Pls.help

    i just updated my iPad to iOS7 but when I try to access appstore to dowload, I get message"cannot accesss appstore". I cannot even update the apps that shows need to updates and cannot download games. what am I gonna do to access my appstore. I never