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;
l_receipt_number VARCHAR (10);
BEGIN
l_receipt_number := '123';
DBMS_OUTPUT.put_line ('Start');
arp_standard.enable_debug;
arp_standard.enable_file_debug ('/usr/tmp', 'Api_Create.log');
ar_receipt_api_pub.create_misc (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,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_currency_code => 'USD',
p_amount => &amount,
p_receipt_date => '&receipt_date',
p_gl_date => '&gl_date',
p_receipt_method_id => &receipt_method_id,
p_activity => 'Interest Income',
p_misc_receipt_id => l_cash_receipt_id,
p_receipt_number => l_receipt_number
);
DBMS_OUTPUT.put_line ( 'Message count '
|| l_msg_count);
DBMS_OUTPUT.put_line ( 'Cash Receipt ID '
|| l_cash_receipt_id);
DBMS_OUTPUT.put_line ( 'Status '
|| l_return_status);
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