DECLARE o_return_status Varchar2(50);
o_msg_count NUMBER;
o_msg_data Varchar2(240);
l_msg_data Varchar2(240);
o_cr_id NUMBER;
p_count NUMBER;
BEGIN
fnd_global.apps_initialize(1050,20678,222);
DBMS_APPLICATION_INFO.SET_CLIENT_INFO('81');
ar_receipt_api_pub.CREATE_AND_APPLY
( p_api_version => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_TRUE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
p_currency_code => 'THB',
p_amount => 1000,
p_receipt_number => 'RV0001',
p_receipt_date => '07-MAR-2006',
p_gl_date => '07-MAR-2006',
p_customer_number => 'C00100101',
p_customer_site_use_id => 123,
p_receipt_comments => ' Text - exp: Cheque No',
p_amount_applied => ' || Rec_amount || ',
p_apply_date => '07-MAR-2006',
p_apply_gl_date => '07-MAR-2006',
p_customer_trx_id => 123,
p_deposit_date => '07-MAR-2006',
p_cr_id => o_cr_id,
x_return_status => o_return_status,
x_msg_count => o_msg_count,
p_receipt_method_name => 'KBANK' ,
x_msg_data => o_msg_data);
arp_standard.enable_debug;
arp_standard.enable_file_debug(log_path , 'test.log');
arp_util.debug('Interface
file: ' || :P_FILENAME || '.' || :P_FILEEXT);
arp_util.debug('Date, Time:
' || to_char(sysdate, 'DD/MM/YYYY HH24:MI:SS'));
arp_util.debug('Receipt No:
' || Receipt_num || ''');
arp_util.debug('Status: ' ||
o_return_status);
arp_util.debug('Message
count: ' || o_msg_count);
arp_util.debug('Message
Errors: ' || o_msg_data);
if o_msg_count > 1 then
loop
p_count := p_count + 1;
l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_TRUE);
if
l_msg_data is NULL then
exit;
end
if;
arp_util.debug( ' - ' || l_msg_data);
end loop;
end if;
arp_util.debug(''---------------------------------------'
);
arp_standard.disable_debug;
END; |