DECLARE
l_object_ver_num jtf_tasks_v.object_version_number%TYPE := 1;
l_task_status_id jtf_tasks_v.task_status_id%TYPE := 9;
l_task_status_name jtf_tasks_v.task_status%TYPE;
l_task_id jtf_tasks_v.task_id%TYPE := 1333920;
l_task_number jtf_tasks_v.task_number%TYPE;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
BEGIN
JTF_TASKS_PUB.UPDATE_TASK (p_api_version => 1.0
, p_init_msg_list => fnd_api.g_true
, p_commit => fnd_api.g_false
, p_object_version_number => l_object_ver_num
, p_task_id => l_task_id
, p_task_number => l_task_number
, p_task_status_id => l_task_status_id
, p_source_object_type_code => 'TASK'
, p_source_object_id => l_task_id
, p_source_object_name => l_task_id
, x_return_status => l_return_status
, x_msg_count => l_msg_count
, x_msg_data => l_msg_data
);
IF l_return_status <> fnd_api.g_ret_sts_success
THEN
IF l_msg_count > 0
THEN
l_msg_data := NULL;
FOR i IN 1 .. l_msg_count
LOOP
l_msg_data := l_msg_data || ' ' || fnd_msg_pub.get (1, 'F');
END LOOP;
fnd_message.set_encoded (l_msg_data);
DBMS_OUTPUT.put_line (SUBSTR (l_msg_data
, 1.1
, 200
));
END IF;
ROLLBACK;
ELSE
DBMS_OUTPUT.put_line ('Task Id = ' || l_task_id);
DBMS_OUTPUT.put_line ('Task Status = ' || l_task_status_id);
DBMS_OUTPUT.put_line ('Return Status = ' || l_return_status);
COMMIT;
END IF;
END;
/
l_object_ver_num jtf_tasks_v.object_version_number%TYPE := 1;
l_task_status_id jtf_tasks_v.task_status_id%TYPE := 9;
l_task_status_name jtf_tasks_v.task_status%TYPE;
l_task_id jtf_tasks_v.task_id%TYPE := 1333920;
l_task_number jtf_tasks_v.task_number%TYPE;
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (1000);
BEGIN
JTF_TASKS_PUB.UPDATE_TASK (p_api_version => 1.0
, p_init_msg_list => fnd_api.g_true
, p_commit => fnd_api.g_false
, p_object_version_number => l_object_ver_num
, p_task_id => l_task_id
, p_task_number => l_task_number
, p_task_status_id => l_task_status_id
, p_source_object_type_code => 'TASK'
, p_source_object_id => l_task_id
, p_source_object_name => l_task_id
, x_return_status => l_return_status
, x_msg_count => l_msg_count
, x_msg_data => l_msg_data
);
IF l_return_status <> fnd_api.g_ret_sts_success
THEN
IF l_msg_count > 0
THEN
l_msg_data := NULL;
FOR i IN 1 .. l_msg_count
LOOP
l_msg_data := l_msg_data || ' ' || fnd_msg_pub.get (1, 'F');
END LOOP;
fnd_message.set_encoded (l_msg_data);
DBMS_OUTPUT.put_line (SUBSTR (l_msg_data
, 1.1
, 200
));
END IF;
ROLLBACK;
ELSE
DBMS_OUTPUT.put_line ('Task Id = ' || l_task_id);
DBMS_OUTPUT.put_line ('Task Status = ' || l_task_status_id);
DBMS_OUTPUT.put_line ('Return Status = ' || l_return_status);
COMMIT;
END IF;
END;
/
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.