更新客户配置文件

DECLARE
   l_rec_profile_t  hz_customer_profile_v2pub.customer_profile_rec_type;
   l_rec_profile    hz_customer_profile_v2pub.cust_profile_amt_rec_type;
   l_profile_amt_id NUMBER;
   l_profile_id     NUMBER;
   l_return_status1 VARCHAR2(30);
   l_msg_count1     NUMBER;
   l_msg_data1      VARCHAR2(2000);

   l_return_status2 VARCHAR2(30);
   l_msg_count2     NUMBER;
   l_msg_data2      VARCHAR2(2000);

   l_object_version_number NUMBER;
BEGIN

   /* alter session set NLS_LANGUAGE = 'AMERICAN' ;*/
   mo_global.init('AR');
   fnd_global.apps_initialize(user_id => 1250,

                              resp_id => 50719,

                              resp_appl_id => 20005);

   l_rec_profile_t.cust_account_profile_id := 1040;
   l_rec_profile_t.cust_account_id         := 1042; --CXY-TEST0028660
   /* l_rec_profile_t.status                    := 'A';
   l_rec_profile_t.collector_id              := NULL;
   l_rec_profile_t.credit_analyst_id         := NULL;
   l_rec_profile_t.credit_checking           := NULL;
   l_rec_profile_t.next_credit_review_date   := NULL;
   l_rec_profile_t.tolerance                 := NULL;
   l_rec_profile_t.discount_terms            := NULL;
   l_rec_profile_t.dunning_letters           := NULL;
   l_rec_profile_t.interest_charges          := NULL;
   l_rec_profile_t.send_statements           := NULL;
   l_rec_profile_t.credit_balance_statements := NULL;*/
   l_rec_profile_t.credit_hold := 'N';
   /*l_rec_profile_t.profile_class_id          := NULL;
   l_rec_profile_t.site_use_id               := 420072; --BILL_TO
   l_rec_profile_t.credit_rating             := NULL;
   l_rec_profile_t.risk_code                 := NULL;
   l_rec_profile_t.standard_terms            := NULL;
   l_rec_profile_t.override_terms            := NULL;
   l_rec_profile_t.dunning_letter_set_id     := NULL;
   l_rec_profile_t.interest_period_days      := NULL;
   l_rec_profile_t.payment_grace_days        := NULL;
   l_rec_profile_t.discount_grace_days       := NULL;
   l_rec_profile_t.statement_cycle_id        := NULL;
   l_rec_profile_t.account_status            := NULL;
   l_rec_profile_t.percent_collectable       := NULL;
   l_rec_profile_t.autocash_hierarchy_id     := NULL;

   l_rec_profile_t.auto_rec_incl_disputed_flag   := NULL;
   l_rec_profile_t.tax_printing_option           := NULL;
   l_rec_profile_t.charge_on_finance_charge_flag := NULL;
   l_rec_profile_t.grouping_rule_id              := NULL;
   l_rec_profile_t.clearing_days                 := NULL;

   l_rec_profile_t.cons_inv_flag                 := NULL;
   l_rec_profile_t.cons_inv_type                 := NULL;
   l_rec_profile_t.autocash_hierarchy_id_for_adr := NULL;
   l_rec_profile_t.lockbox_matching_option       := NULL;
   l_rec_profile_t.created_by_module             := 'BLC';
   l_rec_profile_t.application_id                := NULL;
   l_rec_profile_t.review_cycle                  := NULL;
   l_rec_profile_t.last_credit_review_date       := NULL;
   l_rec_profile_t.party_id                      := NULL;
   l_rec_profile_t.credit_classification         := NULL;
   l_rec_profile_t.cons_bill_level               := NULL;
   l_rec_profile_t.late_charge_calculation_trx   := NULL;
   l_rec_profile_t.credit_items_flag             := NULL;
   l_rec_profile_t.disputed_transactions_flag    := NULL;
   l_rec_profile_t.late_charge_type              := NULL;
   l_rec_profile_t.late_charge_term_id           := NULL;
   l_rec_profile_t.interest_calculation_period   := NULL;
   l_rec_profile_t.hold_charged_invoices_flag    := NULL;
   l_rec_profile_t.message_text_id               := NULL;
   l_rec_profile_t.multiple_interest_rates_flag  := NULL;
   l_rec_profile_t.charge_begin_date             := NULL;
   l_rec_profile_t.automatch_set_id              := NULL;*/

   l_object_version_number := 5;--此值需为当前此配置文件的值,API里验证例如以下

  /* IF NOT ((p_object_version_number IS NULL AND
             l_object_version_number IS NULL) OR
             (p_object_version_number IS NOT NULL AND
             l_object_version_number IS NOT NULL AND
             p_object_version_number = l_object_version_number)) THEN
            fnd_message.set_name('AR', 'HZ_API_RECORD_CHANGED');
            fnd_message.set_token('TABLE', 'hz_customer_profiles');
            fnd_msg_pub.add;

            RAISE fnd_api.g_exc_error;

            因为还有一用户已经更新了表 hz_customer_profiles 中的记录。因此无法锁定该记录。
         END IF;*/

   hz_customer_profile_v2pub.update_customer_profile(p_init_msg_list         => fnd_api.g_false,
                                                     p_customer_profile_rec  => l_rec_profile_t,
                                                     p_object_version_number => l_object_version_number,
                                                     x_return_status         => l_return_status1,
                                                     x_msg_count             => l_msg_count1,
                                                     x_msg_data              => l_msg_data1);

   FOR i IN 1 .. l_msg_count1 LOOP
      l_msg_data1 := fnd_msg_pub.get(p_msg_index => i, p_encoded => 'F');
   END LOOP; --FOR i IN 1 .. x_msg_count LOOP
   dbms_output.put_line('x_return_status1:' || l_return_status1);
   dbms_output.put_line('l_msg_count1:' || l_msg_count1);
   dbms_output.put_line('l_msg_data1:' || l_msg_data1);
   dbms_output.put_line('l_profile_amt_id:' || l_profile_amt_id);
EXCEPTION
   WHEN OTHERS THEN
      dbms_output.put_line('x_return_status:' || SQLERRM);
END;
时间: 2024-12-14 18:11:27

更新客户配置文件的相关文章

Oracle EBS AR 更新客户配置文件

DECLARE l_rec_profile_t hz_customer_profile_v2pub.customer_profile_rec_type; l_rec_profile hz_customer_profile_v2pub.cust_profile_amt_rec_type; l_profile_amt_id NUMBER; l_profile_id NUMBER; l_return_status1 VARCHAR2(30); l_msg_count1 NUMBER; l_msg_da

Oracle EBS 更新客户地点

--更新客户地点 declare x_return_status VARCHAR2(150); x_msg_count NUMBER; x_msg_data VARCHAR2(2000); x_profile_id NUMBER; l_location_id NUMBER; l_object_version_number NUMBER; l_party_rec hz_party_site_v2pub.party_site_rec_type; cursor cur_DT is SELECT loc

更新客户信息

DECLARE CURSOR cur_h IS SELECT h.* FROM ar_customers h WHERE h.customer_name /*'-XD';*/ LIKE '%-XD'; p_customer_rec cux_ar_cust_accounts_v%ROWTYPE; l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(3000); l_party_id NUMBER; l_name

使用python更新haproxy配置文件

老板现在给你任务,公司有haproxy配置文件,希望通过python程序可以对ha配置文件进行增删改,不再是以往的打开文件进行直接操作了. 现有ha配置文件如下: 1 global 2 log 127.0.0.1 local2 3 daemon 4 maxconn 256 5 log 127.0.0.1 local2 info 6 defaults 7 log global 8 mode http 9 timeout connect 5000ms 10 timeout client 50000m

【非官方方式】获取Disconf动态更新的配置文件的值

disconf可以配置reload,当更改配置时自动刷新classpath下的配置文件.然而获取最新的值官方说明是加@DisconfFileItem注解放在属性的方法上,底层通过拦截器获取的. 但是每个属性都要定义一个属性,其实是一件很繁琐的事情. 所以,以下提供一种非官方实时获取最新值的方式. 1 public class PropertiesUtils { 2 private static final Logger logger = LoggerFactory.getLogger(Prope

linux内核更新前后配置文件的比较

说明:这里先给出一个比较的结果,作为记录,后续会给出内核配置差异的详细解释. [[email protected] linux-4.7.2]# diff .config .config_bak  3c3< # Linux/x86_64 3.10.0-327.el7.x86_64 Kernel Configuration---> # Linux/x86 4.7.2 Kernel Configuration13d12< CONFIG_HAVE_LATENCYTOP_SUPPORT=y14a1

详解ebs接口之客户配置文件导入(一)

DECLARE l_rec_profile_t hz_customer_profile_v2pub.customer_profile_rec_type; l_rec_profile hz_customer_profile_v2pub.cust_profile_amt_rec_type; l_profile_amt_id NUMBER; l_profile_id NUMBER; l_return_status1 VARCHAR2(30); l_msg_count1 NUMBER; l_msg_da

详解ebs接口之客户配置文件导入(二)

------------------------------------ -- 1a. Setup the Org_id ------------------------------------ exec dbms_application_info.set_client_info('204'); ------------------------------------ -- 1b. Show the output variables -------------------------------

Oracle EBS AR 更新客户组织层

declare -- Local variables here i integer; g_module varchar2(30) := 'TCA_V2_API'; lrec_org hz_party_v2pub.organization_rec_type; lrec_party hz_party_v2pub.party_rec_type; l_return_status varchar2(1); l_msg_count number; l_msg_data varchar2(2000); l_p