DECLARE
lc_return_status VARCHAR2(2000);
ln_msg_count NUMBER;
ll_msg_data LONG;
Ln_Vendor_Id NUMBER;
Ln_Vendor_site_Id NUMBER;
ln_message_int NUMBER;
Ln_Party_Id NUMBER;
lrec_vendor_rec ap_vendor_pub_pkg.r_vendor_rec_type;
BEGIN
-- Initialize apps session
fnd_global.apps_initialize(0, 50554, 200);
mo_global.set_policy_context('S',204);
mo_global.init('SQLAP');
Ln_Vendor_Id := 1;
Lrec_Vendor_Rec.jgzz_fiscal_code := 'X123456789X';
ap_vendor_pub_pkg.update_vendor_public(p_api_version => 1
,x_return_status => lc_return_status
,x_msg_count => ln_msg_count
,x_msg_data => ll_msg_data
,p_vendor_rec => Lrec_Vendor_Rec
,p_Vendor_Id => Ln_Vendor_Id
);
IF (lc_return_status <> 'S')
THEN
IF ln_msg_count >= 1 THEN
FOR v_index IN 1..ln_msg_count
LOOP
fnd_msg_pub.get (p_msg_index => v_index
,p_encoded => 'F'
,p_data => ll_msg_data
,p_msg_index_out => ln_message_int
);
Ll_Msg_Data := 'UPDATE_VENDOR '||SUBSTR(Ll_Msg_Data,1,3900);
dbms_output.put_line('Ll_Msg_Data - '||Ll_Msg_Data );
END LOOP;
END IF;
END IF;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('SQLERRM - '||SQLERRM );
ROLLBACK;
END
No comments:
Post a Comment