Update Bank Payment Method for Supplier



IBY_EXT_BANK_ACCOUNTS: Defines the external bank account entity. This table should not be translated for any columns.

IBY_EXT_PARTY_PMT_MTHDS: Stores payment method applicability driven by the preferences of the external party. A payment method is applicable to a party and payment function combination and, optionally and additionally, to a party site and/or organization. This table is shared by funds capture and fund disbursement flows.

IBY_EXTERNAL_PAYEES_ALL: Stores payment-related attributes for the funds disbursement payment process for external party payees. This table corresponds to the supplier attributes.

IBY_ACCOUNT_OWNERS: Stores the joint account owners of a bank account.

IBY_PMT_INSTR_USES_ALL: This stores data from AP_BANK_ACCOUNT_USES_ALL for payment instruments assignments.

IBY_CREDITCARD: This table contains records of the credit card details of the customers entered manually or imported through IBY_FNDCPT_SETUP_PUB.Create_Card API. IBY_CREDITCARD table stores the credit card information. This is the related table for Create Credit Card UI. This table stores information like credit card number, expiry date, card holder’s name, billing address, card brand, purchase card subtype, inactive date, etc.


Script:


SET SERVEROUTPUT ON;

DECLARE
   p_api_version             NUMBER := 1.0;

   p_init_msg_list           VARCHAR2 (200) := fnd_api.g_true;

   x_return_status           VARCHAR2 (200) := NULL;

   x_msg_count               NUMBER := 0;

   x_msg_data                VARCHAR2 (200) := NULL;

   l_chr_output              VARCHAR2 (200) := NULL;

   t_msg_dummy               VARCHAR2 (200) := NULL;

   l_upt_payment_status      iby_disbursement_setup_pub.ext_payee_update_tab_type;

   p_ext_pay_tab             iby_disbursement_setup_pub.external_payee_tab_type;

   p_ext_payee_id_tab_type   iby_disbursement_setup_pub.ext_payee_id_tab_type;
   i                         NUMBER := 0;
BEGIN

   -- Initialize apps session

   apps.fnd_global.apps_initialize (1123, 12345, 200);

   mo_global.set_policy_context ('S', 305);
  

   -- Assign Basic Values

   i := i + 1;

   p_ext_pay_tab (i).default_pmt_method := 'CARD';

   p_ext_pay_tab (i).payment_function := 'PAYABLES_DISB';

   p_ext_pay_tab (i).exclusive_pay_flag := 'N';

   p_ext_pay_tab (i).payee_party_id := 456230;

   p_ext_payee_id_tab_type (i).ext_payee_id := 91352;


   iby_disbursement_setup_pub.update_external_payee (
      p_api_version            => p_api_version,
      p_init_msg_list          => p_init_msg_list,
      p_ext_payee_tab          => p_ext_pay_tab,
      p_ext_payee_id_tab       => p_ext_payee_id_tab_type,
      x_return_status          => x_return_status,
      x_msg_count              => x_msg_count,
      x_msg_data               => x_msg_data,
      x_ext_payee_status_tab   => l_upt_payment_status);

   DBMS_OUTPUT.put_line ('Return Status : ' || x_return_status);

   DBMS_OUTPUT.put_line ('Error Message : ' || x_msg_data);


   IF x_return_status <> 'S'
   THEN
      IF x_msg_count > 0
      THEN
         FOR i IN 1 .. x_msg_count
         LOOP
            fnd_msg_pub.get (i,
                             fnd_api.g_false,
                             x_msg_data,
                             t_msg_dummy);

            DBMS_OUTPUT.put_line ('Error Message : ' || x_msg_data);

            l_chr_output := (TO_CHAR (i) || ': ' || x_msg_data);
         END LOOP;
      END IF;


      DBMS_OUTPUT.put_line (
         'Error while updating the Payment Method : ' || l_chr_output);
   END IF;


   FOR j IN l_upt_payment_status.FIRST .. l_upt_payment_status.LAST
   LOOP
      DBMS_OUTPUT.put_line (
         'Error : ' || l_upt_payment_status (j).payment_update_msg);
   END LOOP;
END;
/



No comments:

Post a Comment

How to find all cancel Requisitions

SELECT prha . *   FROM po_Requisition_headers_all prha , po_action_history pah   WHERE      1 = 1        AND pah . object_id ...