Receipt APPLY
In accounts receivable we can create apply receipt using the API as follows:
Declare
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,
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 => 'p_receipt_date',
p_gl_date => 'p_gl_date',
p_customer_number => 'p_customer_number',
p_location => 'p_location_value',
p_receipt_method_id => p_receipt_method_id,
p_trx_number => 'p_trx_number',
p_cr_id => l_cash_receipt_id );
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;