make Component Information from global to context sensitive
- unfreeze dff definition
- in refenrece field : $PROFILES$.ORG_ID
- choose (either displayed or Synch or Required)
-context value fields :
org1
code : org_id say 121 , Name : HOOLAHOOP , description : HOOLAHOOP
within that you can set what attribute column would you like to be enabled for that org.
another org :
code : org_id say 144 , Name : JUMPROPE , description : JUMPROPE
within that you can set what attribute column would you like to be enabled for that org.
write a script to update the attribute category :
update BOM_COMPONENTS_B b
set attribute_category='83'
WHERE 1 = 1
AND attribute1 IS NOT NULL
and exists ( select 1
FROM mtl_system_items_B iasy,
bom_bill_of_materials bom,
mtl_system_items_B icmp,
mtl_parameters mp
WHERE 1 = 1
AND iasy.organization_id = mp.organization_id
and mp.organization_id = bom.organization_id
AND iasy.inventory_item_id = bom.assembly_item_id
AND iasy.organization_id = bom.organization_id
AND bom.bill_sequence_id = b.bill_sequence_id
AND b.component_item_id = icmp.inventory_item_id
and icmp.organization_id = bom.organization_id
)
;
--check for assembly n components.
SELECT SUBSTR (iasy.segment1, 1, 20) "Assembly",
SUBSTR (icmp.segment1, 1, 20) "Component",
SUBSTR (comp.component_quantity, 1, 8) "Quantity",
SUBSTR (comp.effectivity_date, 1, 8) "From",
SUBSTR (comp.disable_date, 1, 8) "To Date",
comp.attribute_category,
comp.attribute1,
--bom.organization_id,
-- bom.ALTERNATE_BOM_DESIGNATOR,
-- comp.OPERATION_SEQ_NUM,
mp.organization_code
-- ,comp.component_item_id
-- , comp.bill_sequence_id
FROM mtl_system_items_B iasy,
bom_bill_of_materials bom,
bom_components_b comp,
mtl_system_items_B icmp,
mtl_parameters mp
WHERE 1 = 1
AND iasy.organization_id = mp.organization_id
and mp.organization_id = bom.organization_id
AND iasy.inventory_item_id = bom.assembly_item_id
AND iasy.organization_id = bom.organization_id
AND bom.bill_sequence_id = comp.bill_sequence_id
AND comp.component_item_id = icmp.inventory_item_id
and icmp.organization_id = bom.organization_id
AND comp.attribute1 IS NOT NULL
order by 1,2
No comments:
Post a Comment