Monday, May 23, 2011

API to update AR Receipt in oracle apps R12 - AR_RECEIPT_UPDATE_API_PUB (UNIDENTIFIED to UNAPPLIED)


Below post will help you to change an UNIDENTIFIED Receipt to UNAPPLIED receipt using an API named “AR_RECEIPT_UPDATE_API_PUB.UPDATE_RECEIPT_UNID_TO_UNAPP”. Basically the pay from customer information of an AR receipt can be updated using the mentioned API

Scripts to APPS initialize the environment:

Script:
SET serveroutput on;

DECLARE
   p_api_version                 NUMBER;
   p_init_msg_list               VARCHAR2 (200);
   p_commit                      VARCHAR2 (200);
   p_validation_level            NUMBER;
   x_return_status               VARCHAR2 (200);
   x_msg_count                   NUMBER;
   x_msg_data                    VARCHAR2 (200);
   p_cash_receipt_id             NUMBER;
   p_pay_from_customer           NUMBER;
   p_comments                    VARCHAR2 (200);
   p_payment_trxn_extension_id   NUMBER;
   x_status                      VARCHAR2 (200);
   p_customer_bank_account_id    NUMBER;
   p_count                       NUMBER;
BEGIN
   p_api_version        := 1.0;
   p_init_msg_list      := fnd_api.g_true;
   p_commit             := fnd_api.g_false;
   p_validation_level   := fnd_api.g_valid_level_full;
   p_cash_receipt_id    := 1502;
   p_pay_from_customer  := 43562;
   p_comments           := 'TEST SHAREORACLEAPPS';
     
   AR_RECEIPT_UPDATE_API_PUB.UPDATE_RECEIPT_UNID_TO_UNAPP
          (p_api_version                    => p_api_version,
           p_init_msg_list                  => p_init_msg_list,
           p_commit                         => p_commit,
           p_validation_level               => p_validation_level,
           x_return_status                  => x_return_status,
           x_msg_count                      => x_msg_count,
           x_msg_data                       => x_msg_data,
           p_cash_receipt_id                => p_cash_receipt_id,
           p_pay_from_customer              => p_pay_from_customer,
           p_comments                       => p_comments,
           p_payment_trxn_extension_id      => p_payment_trxn_extension_id,
           x_status                         => x_status,
           p_customer_bank_account_id       => p_customer_bank_account_id
          );
   DBMS_OUTPUT.put_line ('X_RETURN_STATUS = ' || x_return_status);
   DBMS_OUTPUT.put_line ('X_MSG_COUNT = ' || x_msg_count);
   DBMS_OUTPUT.put_line ('X_MSG_DATA = ' || x_msg_data);
   DBMS_OUTPUT.put_line ('X_STATUS = ' || x_status);

   IF x_msg_count = 1
   THEN
      DBMS_OUTPUT.put_line ('l_msg_data ' || x_msg_data);
   ELSIF x_msg_count > 1
   THEN
      LOOP
         p_count := p_count + 1;
         x_msg_data := fnd_msg_pub.get (fnd_msg_pub.g_next, fnd_api.g_false);

         IF x_msg_data IS NULL
         THEN
            EXIT;
         END IF;

         DBMS_OUTPUT.put_line ('Message' || p_count || ' ---' || x_msg_data);
      END LOOP;
   END IF;
END;


1 Responses to “API to update AR Receipt in oracle apps R12 - AR_RECEIPT_UPDATE_API_PUB (UNIDENTIFIED to UNAPPLIED)”

Unknown said...
June 13, 2014 at 11:28 AM

Recently I did a test of the mentioned API to move unidentified receipt to unapplied receipts, using SQL+.

I get those message:

X_RETURN_STATUS(API Status) = E
X_MSG_COUNT = 1
X_MSG_DATA = Location could not be defaulted for the specified customer.
X_STATUS (Receipt Status) =
l_msg_data Location could not be defaulted for the specified customer.

Why?
Would anyone help me?
Tanks


Post a Comment

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.