ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 更新客户头

更新客户头

原创 Linux操作系统 作者:qgw521 时间:2013-07-19 10:30:06 0 删除 编辑
-- Created on 2013-7-8 by ADMINISTRATOR
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_party_id number;
  l_party_number hz_parties.party_number%type;
  l_profile_id number;
  v_error_msg varchar2(2000);
  v_version_number number := 3; --hz_parties.object_version_number
begin
  -- Test statements here
     mo_global.init('AR');
    mo_global.set_policy_context('S', 4555);
    fnd_global.apps_initialize(1013475,
                               59166,
                               660);
 
    mo_global.init('ONT');
    oe_msg_pub.initialize;
    lrec_party.party_id := 409680;
    lrec_party.attribute17 := '成都';
    lrec_party.attribute18 := '成都税务局';
    lrec_org.organization_name := 'customer 002';
    lrec_org.known_as := '客户001';
    lrec_org.organization_name_phonetic := 'kehu 002';
    --lrec_org.attribute17 := '成都';
  --  lrec_org.attribute18 := '成都税务局';
    lrec_org.party_rec := lrec_party;
    hz_party_v2pub.update_organization(p_init_msg_list => fnd_api.G_TRUE
                                      ,p_organization_rec => lrec_org
                                      ,p_party_object_version_number => v_version_number
                                      ,x_profile_id => l_profile_id
                                      ,x_return_status => l_return_status
                                      ,x_msg_count => l_msg_count
                                      ,x_msg_data => l_msg_data);
   if nvl(l_return_status,'E') <> 'S' then
      fnd_msg_pub.Count_And_Get(p_encoded => fnd_api.G_FALSE
                               ,p_count => l_msg_count
                               ,p_data => v_error_msg);
      dbms_output.put_line('error message:'||v_error_msg);
   else
     dbms_output.put_line('version number:'||v_version_number);
     dbms_output.put_line('profile id:'||l_profile_id);                  
   end if;                                   
end;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13387766/viewspace-766680/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 更新客户地址
下一篇: 订单相关金额API
请登录后发表评论 登录
全部评论

注册时间:2008-06-06

  • 博文量
    128
  • 访问量
    276813