1 Reply Latest reply: Mar 1, 2014 3:29 AM by user12879396 RSS

    Project Task Upload

    user12879396

      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