ORACLE FORM BUILDER 2000 数据列表显示。

按钮事件:WHEN-BUTTON-PROCESSED 。

详细代码如下:

-- begin --

DECLARE

V_level                   VARCHAR2 (10);

V_component_item          VARCHAR2 (50);

V_component_description   VARCHAR2 (100);

V_Average_cost            VARCHAR2 (20);

V_QOT_cost                VARCHAR2 (20);

CURSOR C_JP_POST

IS

SELECT   sbe.plan_level,

msi1.segment1 component_item,

msi1.description component_description,

ROUND (NVL (cic.item_cost, '0'), 5) Average_cost,

ROUND (NVL (cic1.item_cost, '0'), 5) QOT_cost

FROM   slt.slt_bom_explosions sbe,

inv.mtl_system_items_b msi,

inv.mtl_system_items_b msi1,

bom.bom_bill_of_materials bom,

bom.CST_ITEM_COSTS cic,

bom.CST_ITEM_COSTS cic1

WHERE       sbe.top_item_id = msi.inventory_item_id

AND sbe.organization_id = msi.organization_id

AND sbe.component_item_id = msi1.inventory_item_id

AND sbe.organization_id = msi1.organization_id

AND bom.bill_sequence_id = sbe.top_bill_sequence_id

AND bom.organization_id = sbe.organization_id

AND bom.assembly_item_id = sbe.top_item_id

AND sbe.component_item_id = cic.inventory_item_id(+)

AND sbe.organization_id = cic.organization_id(+)

AND sbe.component_item_id = cic1.inventory_item_id(+)

AND sbe.organization_id = cic1.organization_id(+)

AND bom.alternate_bom_designator IS NULL

AND sbe.plan_level <> '0'

AND cic.cost_type_id(+) = '2'

AND cic1.cost_type_id(+) = '1361'

AND msi.INVENTORY_ITEM_ID(+) = :SGD_QUOTE_HEADERS_ALL.ITEM_ID

AND msi.ORGANIZATION_ID(+) =

:SGD_QUOTE_HEADERS_ALL.ORGANIZATION_ID

ORDER BY   sbe.plan_level, msi1.segment1;

v_count                   number := 1;

BEGIN

GO_BLOCK ('SGD_QUOTE_LINES_ALL');

FIRST_RECORD;

FOR ins_post IN C_JP_POST

LOOP

:SGD_QUOTE_LINES_ALL.PLAN_LEVEL := ins_post.plan_level;

:SGD_QUOTE_LINES_ALL.component_item := ins_post.component_item;

:SGD_QUOTE_LINES_ALL.component_description :=ins_post.component_description;

:SGD_QUOTE_LINES_ALL.AVG_COST := ins_post.Average_cost;

:SGD_QUOTE_LINES_ALL.QOT_cost := ins_post.QOT_cost;

NEXT_RECORD;

END LOOP;

END;

-- end --

详细结束。

效果图如附件所示。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐