Bompexpl.exploder_userexit Does Not Appear To Populate the BOM_EXPLOSION_TEMP Table (Doc ID 332133.1)

Last updated on AUGUST 22, 2016

Applies to:

Oracle Bills of Material - Version: 11.5.9 and later   [Release: 11.5 and later ]
Information in this document applies to any platform.
This document includes all versions of Oracle EBS 11i and R12
bompexpl.exploder_userexit

Symptoms

The BOM exploder userexit is run (bompexpl.exploder_userexit) and seems to complete successfully.
The exploder is supposed to explode a bill into the BOM_EXPLOSION_TEMP table. However, the BOM_EXPLOSION_TEMP table is empty.

Code used to call the exploder: 
-- -- BOM Exploder Userexit Example
-- Calls the bompexpl.exploder_userexit to explode a single item in a single org
-- Change v_item and v_org to suitable values
-- set serveroutput on
DECLARE
v_item VARCHAR2(240) := 'AS54888'; -- item to explode
v_org VARCHAR2(3) := 'M1'; -- org in which item is exploded
v_cnt NUMBER := 0;
v_err_msg VARCHAR2(240);
v_err_code NUMBER := 0;
v_verify_flag NUMBER := 0; -- DEFAULT 0
v_online_flag NUMBER := 2; -- DEFAULT 0
v_item_id NUMBER := 0; -- set to inventory_item_id of item to explode
v_org_id NUMBER := 0; -- set to organization_id of item to explode
v_alternate VARCHAR2(240) := NULL; -- DEFAULT null
v_list_id NUMBER := 0; -- for reports (default 0)
v_order_by NUMBER := 1; -- DEFAULT 1
v_grp_id NUMBER := 0; --
v_session_id NUMBER := 0; -- DEFAULT 0
v_req_id NUMBER := 0; -- DEFAULT 0
v_prgm_appl_id NUMBER := -1; -- DEFAULT -1
v_prgm_id NUMBER := -1; -- DEFAULT -1
v_levels_to_explode NUMBER := 1; -- DEFAULT 1
v_bom_or_eng NUMBER := 1; -- DEFAULT 1
v_impl_flag NUMBER := 1; -- DEFAULT 1
v_plan_factor_flag NUMBER := 2; -- DEFAULT 2
v_incl_lt_flag NUMBER := 2; -- DEFAULT 2
v_explode_option NUMBER := 2; -- DEFAULT 2
v_module NUMBER := 2; -- DEFAULT 2
v_cst_type_id NUMBER := 0; -- DEFAULT 0
v_std_comp_flag NUMBER := 0; -- DEFAULT 0
v_rev_date VARCHAR2(240); --
v_comp_code VARCHAR2(240) := NULL; --
v_expl_qty NUMBER := 1; -- DEFAULT 1
BEGIN
-- item revision will be based on this explode date.
-- In this example, we use current date/time
v_rev_date := TO_CHAR(SYSDATE);
-- Find org_id
SELECT mp.organization_id
INTO v_org_id
FROM MTL_PARAMETERS mp
WHERE mp.organization_code = v_org;
-- Find item_id
SELECT inventory_item_id
INTO v_item_id
FROM MTL_ITEM_FLEXFIELDS
WHERE organization_id = v_org_id
AND item_number = v_item;
-- v_grp_id is a unique identifier for this run of the exploder
SELECT bom_explosion_temp_s.nextval
INTO v_grp_id
FROM dual;
-- determine maximum levels to explode from bom_explosions
SELECT maximum_bom_level
INTO v_levels_to_explode
FROM bom_parameters
WHERE organization_id = v_org_id;

apps.bompexpl.exploder_userexit ( v_verify_flag
, v_org_id
, v_order_by
, v_grp_id
, v_session_id
, v_levels_to_explode
, v_bom_or_eng
, v_impl_flag
, v_plan_factor_flag
, v_explode_option
, v_module
, v_cst_type_id
, v_std_comp_flag
, v_expl_qty
, v_item_id
, v_alternate
, v_comp_code
, v_rev_date
, v_err_msg
, v_err_code);
IF ( v_err_code <> 0 ) THEN
ROLLBACK;
dbms_output.put_line('ERROR: ' || v_err_msg);
ELSE
SELECT COUNT(*) INTO v_cnt FROM bom_explosion_temp WHERE group_id=v_grp_id;

dbms_output.put_line('Count=' || v_cnt);
COMMIT;
dbms_output.put_line('.');
dbms_output.put_line('Group Id=' || v_grp_id);
dbms_output.put_line('Org =' || v_org);
dbms_output.put_line('Item =' || v_item);
dbms_output.put_line('Ord Id =' || v_org_id);
dbms_output.put_line('Item Id=' || v_item_id);
dbms_output.put_line('Levels =' || v_levels_to_explode);
END IF;
END;
/

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms