Thursday, January 28, 2010
Ar_receipt_api_pub.Unapply
Unapplies the application of a particular installment of a debit item against the specified cash receipt.
This api works only when you set the org_id using DBMS_APPLICATION.SET_CLIENT_INFO(&v_org_id)
But dont forget to set the session through FND_GLOBAL.APPS_INITIALISE because it will set the
necessary profile values defaulted to user
Script:
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
-- Api Starts Here
AR_RECEIPT_API_PUB.unapply
( 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_cash_receipt_id => &cash_receipt_id,
p_applied_payment_schedule_id => &applied_payment_schedule_id,
p_reversal_gl_date => '&reversal_gl_date'
);
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
END IF;
END;
Do you think this Article is useful?
Subscribe to:
Post Comments (Atom)
Disclaimer
The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.
0 Responses to “Ar_receipt_api_pub.Unapply”
Post a Comment