EBS价目表设置导入功能(2)-价目表行

2.价目表行(qp_interface_list_lines)

 

2.1查询价目表行信息

--2.2.查询价目信息
begin
    select qlh.list_header_id, qll.list_line_id
      into lt_lines.list_header_id, lt_lines.list_line_id
      from mtl_system_items_b msi, qp_pricing_attributes qpa, qp_list_lines qll, qp_list_headers qlh
     where msi.organization_id = 102
       and msi.inventory_item_id = qpa.product_attr_value
       and qpa.pricing_phase_id = 1
       and qpa.qualification_ind = 4
       and qpa.product_attribute_context = 'ITEM'
       and qpa.list_line_id = qll.list_line_id
       and qpa.list_header_id = qll.list_header_id
       and qll.list_line_type_code = 'PLL'
       and qll.list_header_id = qlh.list_header_id
       and qlh.active_flag = 'Y'
       and qlh.list_type_code = 'PRL'
       and qlh.end_date_active is null
       and qlh.name like '%外贸%'
       and qlh.currency_code = c_wm_lines.transactional_curr_code
       and upper(msi.segment1) = upper(c_wm_lines.segment1)
       and rownum < 2;
    lt_lines.interface_action_code := g_update; --更新
exception
    when no_data_found then
        lt_lines.interface_action_code := g_insert; --创建
    when others then
        raise e_exception;
end;
lt_lines.orig_sys_line_ref   := 'L_M_' || to_char(c_wm_lines.moss_price_id);
lt_lines.orig_sys_header_ref := prm_header.orig_sys_header_ref;
lt_lines.list_line_type_code := 'PLL';
--lt_lines.start_date_active   := c_wm_lines.start_date_active;
lt_lines.start_date_active   := l_current_date;
lt_lines.arithmetic_operator := 'UNIT_PRICE';
lt_lines.operand             := c_wm_lines.invoice_price;
lt_lines.primary_uom_flag    := 'Y';
lt_lines.product_precedence  := 220;
lt_lines.process_flag        := 'Y';
lt_lines.process_status_flag := 'P';

 

2.2插入价目表行

insert into qp_interface_list_lines
(orig_sys_line_ref, --1.原始价目表行ID
 orig_sys_header_ref, --2.原始价目表题头ID
 list_line_type_code, --3.行类型
 start_date_active, --4.有效起始日期
 arithmetic_operator, --5.UNIT_PRICE
 operand, --6.价格
 primary_uom_flag, --7.是否主要单位
 product_precedence, --8.优先顺序
 interface_action_code, --9.操作方式
 process_flag, --10.处理标志
 process_status_flag, --11.处理状态
 list_header_id,
 list_line_id)
values
(prm_line.orig_sys_line_ref, --1.原始价目表行ID
 prm_line.orig_sys_header_ref, --2.原始价目表题头ID
 prm_line.list_line_type_code, --3.行类型
 prm_line.start_date_active, --4.有效起始日期
 prm_line.arithmetic_operator, --5.UNIT_PRICE
 prm_line.operand, --6.价格
 prm_line.primary_uom_flag, --7.是否主要单位
 prm_line.product_precedence, --8.优先顺序
 prm_line.interface_action_code, --9.操作方式
 prm_line.process_flag, --10.处理标志
 prm_line.process_status_flag, --11.处理状态
 prm_line.list_header_id,
 prm_line.list_line_id);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值