810: END check_if_new_revision;
811:
812: -----------------------------------------------
813: ------Procedure that retrieves description and item name
814: ------from mtl_system_items_kfv for an inventory_item_id and organization_id
815: PROCEDURE get_item_description_and_name (p_inventory_item_id IN mtl_system_items.inventory_item_id%TYPE,
816: p_organization_id IN mtl_system_items.organization_id%TYPE,
817: x_description OUT NOCOPY mtl_system_items_kfv.description%TYPE,
818: x_item_name OUT NOCOPY mtl_system_items_kfv.concatenated_segments%TYPE)
811:
812: -----------------------------------------------
813: ------Procedure that retrieves description and item name
814: ------from mtl_system_items_kfv for an inventory_item_id and organization_id
815: PROCEDURE get_item_description_and_name (p_inventory_item_id IN mtl_system_items.inventory_item_id%TYPE,
816: p_organization_id IN mtl_system_items.organization_id%TYPE,
817: x_description OUT NOCOPY mtl_system_items_kfv.description%TYPE,
818: x_item_name OUT NOCOPY mtl_system_items_kfv.concatenated_segments%TYPE)
819: IS
812: -----------------------------------------------
813: ------Procedure that retrieves description and item name
814: ------from mtl_system_items_kfv for an inventory_item_id and organization_id
815: PROCEDURE get_item_description_and_name (p_inventory_item_id IN mtl_system_items.inventory_item_id%TYPE,
816: p_organization_id IN mtl_system_items.organization_id%TYPE,
817: x_description OUT NOCOPY mtl_system_items_kfv.description%TYPE,
818: x_item_name OUT NOCOPY mtl_system_items_kfv.concatenated_segments%TYPE)
819: IS
820:
813: ------Procedure that retrieves description and item name
814: ------from mtl_system_items_kfv for an inventory_item_id and organization_id
815: PROCEDURE get_item_description_and_name (p_inventory_item_id IN mtl_system_items.inventory_item_id%TYPE,
816: p_organization_id IN mtl_system_items.organization_id%TYPE,
817: x_description OUT NOCOPY mtl_system_items_kfv.description%TYPE,
818: x_item_name OUT NOCOPY mtl_system_items_kfv.concatenated_segments%TYPE)
819: IS
820:
821: BEGIN
814: ------from mtl_system_items_kfv for an inventory_item_id and organization_id
815: PROCEDURE get_item_description_and_name (p_inventory_item_id IN mtl_system_items.inventory_item_id%TYPE,
816: p_organization_id IN mtl_system_items.organization_id%TYPE,
817: x_description OUT NOCOPY mtl_system_items_kfv.description%TYPE,
818: x_item_name OUT NOCOPY mtl_system_items_kfv.concatenated_segments%TYPE)
819: IS
820:
821: BEGIN
822: ----get description,itemname from mtl_system_items
818: x_item_name OUT NOCOPY mtl_system_items_kfv.concatenated_segments%TYPE)
819: IS
820:
821: BEGIN
822: ----get description,itemname from mtl_system_items
823: SELECT description,concatenated_segments
824: INTO x_description,x_item_name
825: FROM mtl_system_items_kfv
826: WHERE mtl_system_items_kfv.inventory_item_id = p_inventory_item_id
821: BEGIN
822: ----get description,itemname from mtl_system_items
823: SELECT description,concatenated_segments
824: INTO x_description,x_item_name
825: FROM mtl_system_items_kfv
826: WHERE mtl_system_items_kfv.inventory_item_id = p_inventory_item_id
827: AND mtl_system_items_kfv.organization_id = p_organization_id;
828: END;
829:
822: ----get description,itemname from mtl_system_items
823: SELECT description,concatenated_segments
824: INTO x_description,x_item_name
825: FROM mtl_system_items_kfv
826: WHERE mtl_system_items_kfv.inventory_item_id = p_inventory_item_id
827: AND mtl_system_items_kfv.organization_id = p_organization_id;
828: END;
829:
830: --------------------------------------------------
823: SELECT description,concatenated_segments
824: INTO x_description,x_item_name
825: FROM mtl_system_items_kfv
826: WHERE mtl_system_items_kfv.inventory_item_id = p_inventory_item_id
827: AND mtl_system_items_kfv.organization_id = p_organization_id;
828: END;
829:
830: --------------------------------------------------
831: ------procedure that logs a delta message to
829:
830: --------------------------------------------------
831: ------procedure that logs a delta message to
832: ------cz_config_messages
833: PROCEDURE log_delta_message (p_inventory_item_id IN mtl_system_items.inventory_item_id%TYPE,
834: p_organization_id IN mtl_system_items.organization_id%TYPE ,
835: p_component_code IN cz_config_details_v.component_code%TYPE,
836: p_current_quantity IN NUMBER,
837: p_new_quantity IN NUMBER,
830: --------------------------------------------------
831: ------procedure that logs a delta message to
832: ------cz_config_messages
833: PROCEDURE log_delta_message (p_inventory_item_id IN mtl_system_items.inventory_item_id%TYPE,
834: p_organization_id IN mtl_system_items.organization_id%TYPE ,
835: p_component_code IN cz_config_details_v.component_code%TYPE,
836: p_current_quantity IN NUMBER,
837: p_new_quantity IN NUMBER,
838: p_config_hdr IN NUMBER,
840: p_message_name IN fnd_new_messages.message_name%TYPE)
841:
842: IS
843:
844: l_description mtl_system_items_kfv.description%TYPE;
845: l_new_item_name mtl_system_items_kfv.concatenated_segments%TYPE;
846: v_OracleSequenceIncr NUMBER := 20;
847: l_msg_seq NUMBER := 0;
848: l_delta_message VARCHAR2(2000);
841:
842: IS
843:
844: l_description mtl_system_items_kfv.description%TYPE;
845: l_new_item_name mtl_system_items_kfv.concatenated_segments%TYPE;
846: v_OracleSequenceIncr NUMBER := 20;
847: l_msg_seq NUMBER := 0;
848: l_delta_message VARCHAR2(2000);
849:
847: l_msg_seq NUMBER := 0;
848: l_delta_message VARCHAR2(2000);
849:
850: BEGIN
851: ----get description,itemname from mtl_system_items
852: get_item_description_and_name (p_inventory_item_id,
853: p_organization_id,
854: l_description,
855: l_new_item_name);
897: v_output_cfg_rev_nbr cz_config_hdrs.config_rev_nbr%TYPE := 0;
898: l_prev_item cz_config_items.config_item_id%TYPE := 0;
899: l_prev_rev cz_config_hdrs.config_rev_nbr%TYPE;
900: l_prev_qty NUMBER := 0;
901: l_description mtl_system_items.description%TYPE;
902: l_new_item cz_config_items.config_item_id%TYPE:= 0;
903: l_new_rev cz_config_hdrs.config_rev_nbr%TYPE := 0;
904: l_new_component_code cz_config_details_v.component_code%TYPE;
905: l_new_qty NUMBER := 0;
902: l_new_item cz_config_items.config_item_id%TYPE:= 0;
903: l_new_rev cz_config_hdrs.config_rev_nbr%TYPE := 0;
904: l_new_component_code cz_config_details_v.component_code%TYPE;
905: l_new_qty NUMBER := 0;
906: l_new_inventory_item_id mtl_system_items.inventory_item_id%TYPE;
907: l_new_organization_id mtl_system_items.organization_id%TYPE;
908: v_valid_config VARCHAR2(30);
909: v_complete_config VARCHAR2(30);
910: v_parse_status VARCHAR2(1);
903: l_new_rev cz_config_hdrs.config_rev_nbr%TYPE := 0;
904: l_new_component_code cz_config_details_v.component_code%TYPE;
905: l_new_qty NUMBER := 0;
906: l_new_inventory_item_id mtl_system_items.inventory_item_id%TYPE;
907: l_new_organization_id mtl_system_items.organization_id%TYPE;
908: v_valid_config VARCHAR2(30);
909: v_complete_config VARCHAR2(30);
910: v_parse_status VARCHAR2(1);
911: l_param_value VARCHAR2(3);
921: l_qty_changed BOOLEAN := FALSE;
922: l_prev_count NUMBER := 0;
923: l_config_true_tag VARCHAR2(30) := '
924: l_config_false_tag VARCHAR2(30) := '
925: l_prev_inventory_item_id mtl_system_items.inventory_item_id%TYPE;
926: l_prev_organization_id mtl_system_items.organization_id%TYPE;
927: l_prev_component_code cz_config_details_v.component_code%TYPE;
928:
929: CURSOR c_config_delta (p_old_hdr NUMBER,p_old_rev NUMBER,p_new_hdr NUMBER,p_new_rev NUMBER)
922: l_prev_count NUMBER := 0;
923: l_config_true_tag VARCHAR2(30) := '
924: l_config_false_tag VARCHAR2(30) := '
925: l_prev_inventory_item_id mtl_system_items.inventory_item_id%TYPE;
926: l_prev_organization_id mtl_system_items.organization_id%TYPE;
927: l_prev_component_code cz_config_details_v.component_code%TYPE;
928:
929: CURSOR c_config_delta (p_old_hdr NUMBER,p_old_rev NUMBER,p_new_hdr NUMBER,p_new_rev NUMBER)
930: IS select config_rev_nbr,config_item_id,quantity,
2332: IF p_publication_id IS NULL THEN
2333: IF p_inventory_item_id IS NOT NULL AND p_organization_id IS NOT NULL THEN
2334: BEGIN
2335: SELECT 1 INTO l_dummy
2336: FROM mtl_system_items
2337: WHERE inventory_item_id = p_inventory_item_id
2338: AND organization_id = p_organization_id
2339: AND bom_item_type = BOM_ITEM_TYPE_MODEL;
2340: EXCEPTION