0% found this document useful (0 votes)
18 views1 page

Supplier Level

This SQL script declares variables and data types, initializes an application, populates an external payee record, calls a procedure to create an external payee, and outputs the results including any error messages.

Uploaded by

alzubair_87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Supplier Level

This SQL script declares variables and data types, initializes an application, populates an external payee record, calls a procedure to create an external payee, and outputs the results including any error messages.

Uploaded by

alzubair_87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

site_level.

sql 5/4/2014

DECLARE
p_ext_payee_tab IBY_DISBURSEMENT_SETUP_PUB.External_Payee_Tab_Type ;
l_ext_payee_rec IBY_DISBURSEMENT_SETUP_PUB.External_Payee_Rec_Type ;
x_ext_payee_id_tab IBY_DISBURSEMENT_SETUP_PUB.Ext_Payee_ID_Tab_Type ;
x_ext_payee_status_tab IBY_DISBURSEMENT_SETUP_PUB.Ext_Payee_Create_Tab_Type
;

x_msg_count NUMBER := 0;
l_user_id NUMBER := 11170;
l_resp_id NUMBER := 50101;
l_resp_app_id NUMBER := 200;

x_msg_data VARCHAR2(256);
x_return_status VARCHAR2(10);

begin

fnd_global.apps_initialize ( l_user_id, --> user Id


l_resp_id, --> responsibility id
l_resp_app_id --> resp appn id
);

--party_id from ap_suppliers table for the vendor_id


l_ext_payee_rec.Payee_Party_Id := 10105;
l_ext_payee_rec.payment_function := 'PAYABLES_DISB';
l_ext_payee_rec.Exclusive_Pay_Flag := 'N';
l_ext_payee_rec.Default_Pmt_method := 'CHECK';

x_msg_count := 0;

p_ext_payee_tab(0) := l_ext_payee_rec;

IBY_DISBURSEMENT_SETUP_PUB.Create_External_Payee(
p_api_version => 1.0,
p_init_msg_list => fnd_api.G_TRUE,
p_ext_payee_tab => p_ext_payee_tab,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_ext_payee_id_tab => x_ext_payee_id_tab,
x_ext_payee_status_tab => x_ext_payee_status_tab
);

DBMS_OUTPUT.PUT_LINE('x_return_status: '||x_return_status);
DBMS_OUTPUT.PUT_LINE('x_msg_count. '||x_msg_count);
DBMS_OUTPUT.PUT_LINE('x_msg_data. '||x_msg_data);

FOR i IN x_ext_payee_status_tab.FIRST .. x_ext_payee_status_tab.LAST


LOOP
DBMS_OUTPUT.PUT_LINE ('Error Message from table type : '
|| x_ext_payee_status_tab (i).Payee_Creation_Msg);
END LOOP;

EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error ' ||SQLERRM);
END;

You might also like