小说网站 搜小说 无限网 烟雨红尘 小说爱好者 免费小说 免费小说网站

PA 项目创建任务

---- 创建任务
DECLARE
    p_project_id            NUMBER := 155233;
    p_task_number           VARCHAR2(240) := 'CXYTEST0001';
    p_task_name             VARCHAR2(240) := '接口测试CXYTEST0001';
    p_task_description      VARCHAR2(240) := 'TASKCXYTEST0001';
    p_scheduled_start_date  DATE := SYSDATE + 1;
    p_scheduled_finish_date DATE := SYSDATE + 10;
    P_PARENT_TASK_ID        NUMBER := 244637;
    --
    x_return_status  VARCHAR2(240);
    x_msg_count      NUMBER;
    x_msg_data       VARCHAR2(30000);
    x_project_id     NUMBER;
    x_project_number VARCHAR2(240);
    x_task_id        NUMBER;
    l_msg_index      NUMBER;
BEGIN
    fnd_global.apps_initialize(user_id => 0
                              ,resp_id => 52998
                              ,resp_appl_id => 275);
    mo_global.init('M');
    pa_project_pub.add_task(p_api_version_number => 1.0
                           ,p_init_msg_list => 'T'
                           ,p_msg_count => x_msg_count
                           ,p_msg_data => x_msg_data
                           ,p_return_status => x_return_status
                           ,p_pm_product_code => NULL
                           ,p_pa_project_id => p_project_id
                           ,p_pm_task_reference => p_task_number
                           ,p_pa_task_number => p_task_number
                           ,p_task_name => p_task_name
                           ,p_task_description => p_task_description
                           ,p_scheduled_start_date => p_scheduled_start_date
                           ,p_scheduled_finish_date => p_scheduled_finish_date
                           ,p_pa_parent_task_id => p_parent_task_id
                           ,p_pa_project_id_out => x_project_id
                           ,p_pa_project_number_out => x_project_number
                           ,p_task_id => x_task_id);
    dbms_output.put_line('x_project_id: ' || x_project_id);
    dbms_output.put_line('x_project_number: ' || x_project_number);
    dbms_output.put_line('x_task_id: ' || x_task_id);
    dbms_output.put_line('x_msg_data: ' || x_msg_data);
    dbms_output.put_line('x_return_status: ' || x_return_status);
    dbms_output.put_line('x_msg_count: ' || x_msg_count);
    FOR i IN 1 .. fnd_msg_pub.count_msg LOOP
        fnd_msg_pub.get(p_msg_index => i
                       ,p_encoded => fnd_api.g_false
                       ,p_data => x_msg_data
                       ,p_msg_index_out => l_msg_index);
        dbms_output.put_line('x_msg_data: ' || x_msg_data);
    END LOOP;
END;

posted on 2014-08-27 12:12  王小航  阅读(365)  评论(0编辑  收藏  举报

导航