EBS INV:客户料号的导入

本文档展示了如何使用PL/SQL在Oracle数据库中批量插入数据到mtl_ci_interface和MTL_CI_XREFS_INTERFACE表中。通过设置必要的字段如last_update_date、last_updated_by、creation_date等,并为特定字段如customer_item_desc、customer_item_number赋值,最终实现数据的有效插入。

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

在这里插入图片描述

declare     
    l_iface_rec      inv.mtl_ci_interface%rowtype;
    l_user_id        number := 0;                --user id, sysadmin here
begin
    l_iface_rec.last_update_date  := sysdate;
    l_iface_rec.last_updated_by   := l_user_id;
    l_iface_rec.creation_date     := sysdate;
    l_iface_rec.created_by        := l_user_id;
    l_iface_rec.last_update_login := -1;

    l_iface_rec.process_flag     := 1;           --插入接口时需要给1
    l_iface_rec.transaction_type := 'CREATE';
    
    l_iface_rec.item_definition_level := 1;        --customer level
    l_iface_rec.customer_item_desc    := 'Description:18oz DW hot Cup';
    l_iface_rec.customer_item_number  := '237098-001';
    --l_iface_rec.address_id      
    l_iface_rec.commodity_code_id     := 1 ;       --disposable products
    l_iface_rec.container_item_org_id := 74;       --master inv organization    
    l_iface_rec.customer_id           := '53122';  
    l_iface_rec.inactive_flag         := 2;        --cannot be null and 'N'                 
    l_iface_rec.lock_flag             := 'Y';      --cannot be null    
    l_iface_rec.process_mode          := 1;        --cannot be null
  insert into mtl_ci_interface values l_iface_rec;
end;

declare     
    l_iface_rec      MTL_CI_XREFS_INTERFACE%rowtype;
    l_user_id        number := 0;                --user id, sysadmin here
begin
    l_iface_rec.last_update_date  := sysdate;
    l_iface_rec.last_updated_by   := l_user_id;
    l_iface_rec.creation_date     := sysdate;
    l_iface_rec.created_by        := l_user_id;
    l_iface_rec.last_update_login := -1;

    l_iface_rec.process_flag     := 1;           --插入接口时需要给1
    l_iface_rec.transaction_type := 'CREATE';
    
    l_iface_rec.item_definition_level := 1;        --customer level
    l_iface_rec.customer_item_number  := '237098-001';
    l_iface_rec.MASTER_ORGANIZATION_ID := 74;      --master inv organization    
    l_iface_rec.customer_id           := '53122';  
    l_iface_rec.INVENTORY_ITEM_ID     := '168494'; 
    l_iface_rec.PREFERENCE_NUMBER     := 1;        --rank
    l_iface_rec.inactive_flag         := 2;        --cannot be null, 'N'                 
    l_iface_rec.lock_flag             := 'Y';      --cannot be null    
    l_iface_rec.process_mode          := 1;        --cannot be null
  insert into MTL_CI_XREFS_INTERFACE values l_iface_rec;
end;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值