您的位置:首页 > 数据库

8种主流NoSQL数据库系统特性对比和最佳应用场景

2016-01-22 21:12 776 查看
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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: