QA CHECK LIST
rec1 OKC_QA_CHECK_LIST_PVT.qclv_rec_type;
rec2 OKC_QA_CHECK_LIST_PVT.qclv_rec_type;
p_init_msg_list VARCHAR2(100):= null; -- OKC_API.G_FALSE;
x_return_status VARCHAR2(100):=null;
x_msg_count NUMBER:=null;
x_msg_data VARCHAR2(100):=null;
x_id number:=null;
x_user_id NUMBER :=Fnd_Profile.VALUE('USER_ID');--profile value
x_resp_id NUMBER :=fnd_global.resp_id;
x_appl_id NUMBER :=fnd_global.resp_appl_id;
x_org_id NUMBER :=fnd_global.org_id;
x_login_id NUMBER :=Fnd_Profile.VALUE('LOGIN_ID');
BEGIN
rec1:=null;
rec1.id :=null;
rec1.object_version_number :=null;
rec1.name :='Check List Rule4';
rec1.short_description :='This is new checklist rule';
rec1.begin_date :=sysdate;
rec1.end_date :=null;
rec1.sfwt_flag :='N';
rec1.created_by :=1318;
rec1.creation_date :=sysdate;
rec1.last_updated_by :=1318;
rec1.last_update_date :=sysdate;
rec1.last_update_login :=5500222;
rec1.application_id :=515;
rec1.default_yn :='N';
-- MO_GLOBAL.SET_POLICY_CONTEXT('S', 204);
fnd_global.apps_initialize(x_user_id, x_resp_id, x_appl_id,x_login_id);
DBMS_OUTPUT.PUT_LINE('API Execution Started');
OKC_QA_CHECK_LIST_PUB.CREATE_QA_CHECK_LIST(
p_api_version =>1.0
,p_init_msg_list =>null
,x_return_status =>x_return_status
,x_msg_count => x_msg_count
,x_msg_data =>x_msg_data
,p_qclv_rec =>rec1
,x_qclv_rec =>rec2);
COMMIT;
IF (x_return_Status ='S') THEN
DBMS_OUTPUT.PUT_LINE('QA Check Rule Created Successfully');
DBMS_OUTPUT.PUT_LINE(x_return_status);
DBMS_OUTPUT.PUT_LINE(x_msg_count);
DBMS_OUTPUT.PUT_LINE(x_msg_data);
ELSE
IF x_msg_count > 0 THEN
FOR l_index in 1..x_msg_count LOOP
dbms_output.put_line(l_index || '.' || SUBSTR(fnd_msg_pub.get(p_encoded => fnd_api.g_false), 1, 255));
END LOOP;
END IF;
DBMS_OUTPUT.PUT_LINE(x_return_status);
DBMS_OUTPUT.PUT_LINE(x_msg_count);
DBMS_OUTPUT.PUT_LINE(x_msg_data);
DBMS_OUTPUT.PUT_LINE('QA Check Rule Not Created Successfully ');
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR='||sqlerrm);
END;
No comments:
Post a Comment