DBA Data[Home] [Help]

APPS.OE_SO_II_EXPLODE SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 43

	UPDATE 	bom_config_explosions
	SET	line_id = P_II_Line_Id
	WHERE	session_id = P_II_Session_Id
	AND	group_id + 0 = bom_group_id
	AND	explosion_type = 'INCLUDED'
	AND     component_code <> P_II_Top_Component_Code;
Line: 88

/* Modified the select statement for fixing bug# 925562, propagated from
   Rel 11 - 896589. Replaced
    SUBSTR(MIN(component_code), Length_Rtrim),
    by  component_code,
*/

    INSERT INTO bom_config_explosions (
	  line_id,
	  session_id,
	  group_id,
	  component_code,
	  component_item_id,
	  component_quantity,
	  component_sequence_id,
	  extended_quantity,
	  organization_id,
	  primary_uom_code,
	  required_for_revenue,
	  so_transactions_flag,
	  top_bill_sequence_id,
	  bill_sequence_id,
	  plan_level,
	  sort_order,
	  explosion_type,
	  creation_date,
	  created_by	)
    SELECT
	  P_II_Line_Id,
	  P_II_Session_Id,
	  P_II_BOM_Explosion_Group_Id,
--	  SUBSTR(MIN(component_code), Length_Rtrim),
	  component_code,
	  MIN(inventory_item_id),
	  MIN(component_ratio),
	  MIN(component_sequence_id),
	  SUM(quantity),
	  MIN(warehouse_id),
	  MIN(unit_code),
	  MIN(Decode(required_for_revenue_flag, 'Y', 1, 2)),
	  MIN(transactable_flag),
	  0,
	  0,
	  0,
	  '0',
	  'INCLUDED',
	  SYSDATE,
	  0
    FROM so_line_details
    WHERE line_id = P_II_Line_Id
    AND included_item_flag = 'Y'
    GROUP BY component_code;