Oracle EBS AR 更新客户配置文件

本文详细解析了一个用于Oracle环境下更新客户资料的PL/SQL过程代码。该过程涉及初始化应用程序、设置用户会话参数、定义记录类型、更新客户档案及处理返回状态等关键步骤,展示了如何通过PL/SQL进行复杂业务操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.credit_hold := 'N';  
     
   l_object_version_number := 5;--此值需为当前此配置文件的值,API里验证如下  
     
  
  
   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; 

 

转载于:https://www.cnblogs.com/jenrry/p/10006837.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值