-- Created on 2013-7-17 by ADMINISTRATOR
declare
-- Local variables here
i integer;
v_attribute_rec Ar_receipt_api_pub.attribute_rec_type;
v_receipt_num varchar2(30) := '2013071702';
v_amount number := 234;
v_receipt_method_id number := 1365;
v_receipt_date date := trunc(sysdate);
v_customer_name varchar2(200) := 'customer 001';
x_return_status varchar2(1);
x_msg_count number;
x_msg_data varchar2(2000);
x_cr_id number;
begin
-- Test statements here
mo_global.init('AR');
mo_global.set_policy_context('S', 4555);
fnd_global.apps_initialize(1013475,
58812,
222);
v_attribute_rec.attribute1 := '测试';
Ar_receipt_api_pub.Create_cash(
p_api_version => 1.0,
p_init_msg_list => FND_API.G_TRUE,
p_commit => FND_API.G_TRUE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
p_receipt_number => v_receipt_num,
p_amount => v_amount,
p_receipt_method_id => v_receipt_method_id,
p_receipt_date => v_receipt_date,
p_gl_date =>trunc(sysdate),
p_maturity_date => v_receipt_date,
p_deposit_date => v_receipt_date,
p_customer_name => v_customer_name,
p_attribute_rec => v_attribute_rec, --弹性域数据
p_cr_id => x_cr_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
dbms_output.put_line('return status:'||x_return_status);
dbms_output.put_line('msg count:'||x_msg_count);
dbms_output.put_line('msg data:'||x_msg_data);
if x_msg_count > 0 then
for i in 1 .. x_msg_count loop
dbms_output.put_line(i||':'||substr(fnd_msg_pub.Get(p_msg_index => i,p_encoded => fnd_api.G_FALSE),1,255));
end loop;
end if;
end;
declare
-- Local variables here
i integer;
v_attribute_rec Ar_receipt_api_pub.attribute_rec_type;
v_receipt_num varchar2(30) := '2013071702';
v_amount number := 234;
v_receipt_method_id number := 1365;
v_receipt_date date := trunc(sysdate);
v_customer_name varchar2(200) := 'customer 001';
x_return_status varchar2(1);
x_msg_count number;
x_msg_data varchar2(2000);
x_cr_id number;
begin
-- Test statements here
mo_global.init('AR');
mo_global.set_policy_context('S', 4555);
fnd_global.apps_initialize(1013475,
58812,
222);
v_attribute_rec.attribute1 := '测试';
Ar_receipt_api_pub.Create_cash(
p_api_version => 1.0,
p_init_msg_list => FND_API.G_TRUE,
p_commit => FND_API.G_TRUE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
p_receipt_number => v_receipt_num,
p_amount => v_amount,
p_receipt_method_id => v_receipt_method_id,
p_receipt_date => v_receipt_date,
p_gl_date =>trunc(sysdate),
p_maturity_date => v_receipt_date,
p_deposit_date => v_receipt_date,
p_customer_name => v_customer_name,
p_attribute_rec => v_attribute_rec, --弹性域数据
p_cr_id => x_cr_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
dbms_output.put_line('return status:'||x_return_status);
dbms_output.put_line('msg count:'||x_msg_count);
dbms_output.put_line('msg data:'||x_msg_data);
if x_msg_count > 0 then
for i in 1 .. x_msg_count loop
dbms_output.put_line(i||':'||substr(fnd_msg_pub.Get(p_msg_index => i,p_encoded => fnd_api.G_FALSE),1,255));
end loop;
end if;
end;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13387766/viewspace-766522/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13387766/viewspace-766522/