EBS 快速导入值集

SQL

 

复制代码
DECLARE
  l_rowid ROWID;

  cursor cur is
    select pvs.SEGMENT1 vendor_code, pvs.VENDOR_NAME
      from po_vendors pvs
     where not exists (select 1
              from fnd_lookup_values_vl flvv
             where flvv.LOOKUP_TYPE = 'CUX_PO_CONCENTRATE_VENDOR'
               and flvv.LOOKUP_CODE = pvs.SEGMENT1);
      -- and pvs.SEGMENT1 in  ('E133','E196');

BEGIN

  for v in cur loop
  
    --dbms_output.put_line('before_l_rowid='||l_rowid);
  
    fnd_lookup_values_pkg.insert_row(x_rowid               => l_rowid,
                                     x_lookup_type         => 'CUX_PO_CONCENTRATE_VENDOR' /*类型*/,
                                     x_view_application_id => 3,
                                     x_lookup_code         => v.vendor_code, --'XXX' /*代码*/,
                                     x_tag                 => '',
                                     x_attribute_category  => '',
                                     x_attribute1          => '',
                                     x_attribute2          => '',
                                     x_attribute3          => '',
                                     x_attribute4          => '',
                                     x_enabled_flag        => 'Y' /*启用*/,
                                     x_start_date_active   => SYSDATE /*有效期自*/,
                                     x_end_date_active     => '' /*有效期至*/,
                                     x_territory_code      => '',
                                     x_attribute5          => '',
                                     x_attribute6          => '',
                                     x_attribute7          => '',
                                     x_attribute8          => '',
                                     x_attribute9          => '',
                                     x_attribute10         => '',
                                     x_attribute11         => '',
                                     x_attribute12         => '',
                                     x_attribute13         => '',
                                     x_attribute14         => '',
                                     x_attribute15         => '',
                                     x_meaning             => v.vendor_code, --'XXX' /*含义*/,
                                     x_description         => v.VENDOR_NAME, --'YYYYYY' /*说明*/,
                                     x_creation_date       => SYSDATE,
                                     x_created_by          => 0,
                                     x_last_update_date    => SYSDATE,
                                     x_last_updated_by     => 0,
                                     x_last_update_login   => 0);
                                     
    --dbms_output.put_line('after_l_rowid='||l_rowid);                                 
    COMMIT;
  end loop;
  
END;
复制代码

 

posted @   Iven_lin  阅读(7)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示