zoukankan      html  css  js  c++  java
  • EBS R12使用接口表往已存在的供应商地址下创建新的地点

    在供应商 "测试供应商A" 下已经有了两个地址,分别为 "地址A","地址B",现在由于某些原因,需要在地址A下面创建新的地点。

    由于业务需要,所以使用的是将数据导入ap_supplier_sites_int接口表,再使用 "供应商站点开放接口导入" 请求来创建新的地点。

    参考代码如下:根据实际业务补充。

    SELECT * FROM ap.ap_supplier_sites_int;
    
    /
    
    truncate TABLE ap.ap_supplier_sites_int;
    
    /
    
        SELECT pv.vendor_id,
               hl.location_id,
               hp.party_id,
               hps.party_site_id,
               hl.country,
               hl.address1,
               hps.party_site_name,
               hl.address1,
               hl.address2,
               hl.address3,
               hl.address4,
               hl.city,
               hl.state,
               hl.province,
               hl.country,
               hl.county,
               hl.language,
               hl.address_style
          FROM hz_locations   hl,
               hz_parties     hp,
               po_vendors     pv,
               hz_party_sites hps
         WHERE pv.party_id = hp.party_id
           AND hps.party_id = hp.party_id
           AND hps.location_id = hl.location_id
           AND pv.vendor_name = '简单的供应商导入1'
           AND hl.address_lines_phonetic = 'Y';
    
    /
    
    DECLARE
    -- Local variables here
    
    l_iface_site_rec ap_supplier_sites_int%ROWTYPE;
    
    BEGIN
        -- Test statements here
    
        FOR cc IN (SELECT pv.vendor_id,
                          hl.location_id,
                          hp.party_id,
                          hps.party_site_id,
                          hps.party_site_name,
                          hl.address1,
                          hl.address2,
                          hl.address3,
                          hl.address4,
                          hl.city,
                          hl.state,
                          hl.province,
                          hl.country,
                          hl.county,
                          hl.language,
                          hl.address_style
                     FROM hz_locations   hl,
                          hz_parties     hp,
                          po_vendors     pv,
                          hz_party_sites hps
                    WHERE pv.party_id = hp.party_id
                      AND hps.party_id = hp.party_id
                      AND hps.location_id = hl.location_id
                      AND pv.vendor_name = '简单的供应商导入1'
                      AND hl.address_lines_phonetic = 'Y') LOOP
            l_iface_site_rec.vendor_id     := cc.vendor_id; --供应商ID
            l_iface_site_rec.location_id   := cc.location_id;
            l_iface_site_rec.address_line1 := cc.address1;
            l_iface_site_rec.address_line2 := cc.address2;
            l_iface_site_rec.address_line3 := cc.address3;
            l_iface_site_rec.address_line4 := cc.address4;
            l_iface_site_rec.city          := cc.city;
            l_iface_site_rec.state         := cc.state;
            -- l_iface_site_rec.zip            :=     --此字段我未找到
            l_iface_site_rec.province      := cc.province;
            l_iface_site_rec.country       := cc.country;
            l_iface_site_rec.county        := cc.county;
            l_iface_site_rec.language      := cc.language;
            l_iface_site_rec.address_style := cc.address_style;
            --付款标识
            l_iface_site_rec.pay_site_flag := 'Y';
            --采购标识
            l_iface_site_rec.purchasing_site_flag := 'Y';
            l_iface_site_rec.org_id               := 161; --地点对应的业务实体  
            l_iface_site_rec.vendor_site_code     := substr('地点0626_1',
                                                            1,
                                                            15);
        END LOOP;
    
        INSERT INTO ap.ap_supplier_sites_int VALUES l_iface_site_rec;
    
        COMMIT;
    END;
    
    /
    
        SELECT * FROM ap.ap_supplier_sites_int;

    再执行"供应商站点开放接口导入"请求,导入地点。

    参考文章:

    交易方地点名称与地址详细信息不一致。

    此供应商已经存在地址/交易方地点名称。请重新输入唯一名称。

    Oracle EBS R12 接口导 供应商

    供应商接口的使用 

    供应商导入

  • 相关阅读:
    使用beautiful soup解析xml
    mongodb下载以及连接
    beautiful soup解析有空格的class
    爬取糗事百科的热门段子,以及热图链接
    结果记录
    安装自然语言处理工具Nltk以及初次使用
    AD文献分析 整体框架和数据设计
    遍历目录,目录下文件名存入文件
    dict,列表方法
    工具集
  • 原文地址:https://www.cnblogs.com/huanghongbo/p/4581448.html
Copyright © 2011-2022 走看看