EBS 更新银行地址

--add by biao.chen@hand-china.com
  --2013-12-22 10:15:56
  PROCEDURE add_branch_address(p_party_id       NUMBER,
                               p_contry         VARCHAR2,
                               p_address_line_1 VARCHAR2,
                               p_provice        VARCHAR2,
                               p_city           VARCHAR2,
                               x_return_status  OUT VARCHAR2,
                               x_msg_count      OUT NUMBER,
                               x_msg_data       OUT VARCHAR2) IS
    l_party_site_rec          hz_party_site_v2pub.party_site_rec_type;
    l_location_rec            hz_location_v2pub.location_rec_type;
    l_location_id             NUMBER;
    l_psobject_version_number NUMBER;
    l_party_site_id           NUMBER;
    l_party_site_number       VARCHAR2(30);
    l_object_version_number   VARCHAR2(60) := 1;
  
    /*    x_return_status VARCHAR2(200);
    x_msg_count     NUMBER;
    x_msg_data      VARCHAR2(2000);*/
    l_country VARCHAR2(60);
  BEGIN
  
    l_location_rec.address1 := p_address_line_1;
    cux_test_log_pkg.insert_row('country  0 ',
                                p_contry,
                                l_country,
                                userenv('LANG'),
                                p_provice,
                                p_city);
    BEGIN
      SELECT v.territory_code
        INTO l_country
        FROM fnd_territories_vl v
       WHERE v.territory_short_name = p_contry;
    EXCEPTION
      WHEN OTHERS THEN
        cux_conc_utl.log_msg('查找国家出错:' || SQLERRM);
        l_country := 'CN';
    END;
  
    l_location_rec.country           := l_country;
    l_location_rec.province          := p_provice;
    l_location_rec.city              := p_city;
    l_location_rec.created_by_module := 'CUST_INTERFACE';
  
    hz_location_v2pub.create_location(p_location_rec  => l_location_rec,
                                      x_location_id   => l_location_id,
                                      x_return_status => x_return_status,
                                      x_msg_count     => x_msg_count,
                                      x_msg_data      => x_msg_data);
  
    l_location_rec.location_id := l_location_id;
  
    l_party_site_rec.party_id                 := p_party_id;
    l_party_site_rec.location_id              := l_location_id;
    l_party_site_rec.identifying_address_flag := 'Y';
    l_party_site_rec.created_by_module        := 'CUST_INTERFACE';
  
    hz_party_site_v2pub.create_party_site(p_party_site_rec    => l_party_site_rec,
                                          x_party_site_id     => l_party_site_id,
                                          x_party_site_number => l_party_site_number,
                                          x_return_status     => x_return_status,
                                          x_msg_count         => x_msg_count,
                                          x_msg_data          => x_msg_data);
  
    l_party_site_rec.party_site_id     := l_party_site_id;
    l_party_site_rec.party_site_number := l_party_site_number;
  
  EXCEPTION
    WHEN OTHERS THEN
      x_msg_data := SQLERRM;
  END add_branch_address;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值