CREATE AND APPLY A Receipt
DECLARE
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (240);
l_count NUMBER;
l_cash_receipt_id NUMBER;
l_msg_data_out VARCHAR2 (240);
l_mesg VARCHAR2 (240);
p_count NUMBER;
BEGIN
DBMS_OUTPUT.put_line ('Start');
arp_standard.enable_debug;
ar_receipt_api_pub.create_and_apply (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_currency_code => 'USD',
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_amount => p_amount,
p_receipt_number => p_receipt_number,
p_receipt_date => SYSDATE,
p_gl_date => SYSDATE,
p_customer_id => p_customer_id,
p_customer_bank_account_id => p_customer_bank_account_id,
p_customer_site_use_id => p_customer_site_use_id,
p_receipt_method_id => p_receipt_method_id,
p_trx_number => p_trx_number,
p_cr_id => l_cash_receipt_id
);
bms_output.put_line ( 'Return_status '
|| l_return_status);
DBMS_OUTPUT.put_line ( 'Message count '
|| l_msg_count);
DBMS_OUTPUT.put_line ( 'Cash Receipt ID '
|| l_cash_receipt_id);
IF l_msg_count = 1
THEN
DBMS_OUTPUT.put_line ( 'l_msg_data '
|| l_msg_data);
ELSIF l_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_false);
IF l_msg_data IS NULL
THEN
EXIT;
END IF;
DBMS_OUTPUT.put_line ( 'Message'
|| p_count
|| ' ---'
|| l_msg_data);
END LOOP;
END IF;
arp_standard.disable_debug;
END;
DECLARE
l_return_status VARCHAR2 (1);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (240);
l_count NUMBER;
l_cash_receipt_id NUMBER;
l_msg_data_out VARCHAR2 (240);
l_mesg VARCHAR2 (240);
p_count NUMBER;
BEGIN
DBMS_OUTPUT.put_line ('Start');
arp_standard.enable_debug;
ar_receipt_api_pub.create_and_apply (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_currency_code => 'USD',
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_amount => p_amount,
p_receipt_number => p_receipt_number,
p_receipt_date => SYSDATE,
p_gl_date => SYSDATE,
p_customer_id => p_customer_id,
p_customer_bank_account_id => p_customer_bank_account_id,
p_customer_site_use_id => p_customer_site_use_id,
p_receipt_method_id => p_receipt_method_id,
p_trx_number => p_trx_number,
p_cr_id => l_cash_receipt_id
);
bms_output.put_line ( 'Return_status '
|| l_return_status);
DBMS_OUTPUT.put_line ( 'Message count '
|| l_msg_count);
DBMS_OUTPUT.put_line ( 'Cash Receipt ID '
|| l_cash_receipt_id);
IF l_msg_count = 1
THEN
DBMS_OUTPUT.put_line ( 'l_msg_data '
|| l_msg_data);
ELSIF l_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_false);
IF l_msg_data IS NULL
THEN
EXIT;
END IF;
DBMS_OUTPUT.put_line ( 'Message'
|| p_count
|| ' ---'
|| l_msg_data);
END LOOP;
END IF;
arp_standard.disable_debug;
END;
No comments:
Post a Comment