[Home] [Help]
3:
4: G_PKG_NAME VARCHAR2(30) := 'AHL_RM_MATERIAL_AS_PVT';
5: G_API_NAME VARCHAR2(30) := 'PROCESS_MATERIAL_REQ';
6: G_API_NAME1 VARCHAR2(30) := 'PROCESS_ROUTE_EFCTS';
7: G_DEBUG VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
8: -- Function to get the Record Identifier for Error Messages
9: FUNCTION get_record_identifier
10: (
11: p_material_req_rec IN material_req_rec_type
1895: --store cursor returned values.
1896: l_material_req_rec.mc_id,
1897: l_material_req_rec.mc_position_key;
1898: IF G_DEBUG = 'Y' THEN
1899: AHL_DEBUG_PUB.debug( 'association_type : ' || l_association_type );
1900: AHL_DEBUG_PUB.debug( 'POSITION_PATH_ID : ' || l_material_req_rec.POSITION_PATH_ID);
1901: AHL_DEBUG_PUB.debug( 'item_group_id : ' || l_material_req_rec.item_group_id);
1902: AHL_DEBUG_PUB.debug( 'inventory_item_id : ' || l_material_req_rec.inventory_item_id);
1903: AHL_DEBUG_PUB.debug( 'inventory_org_id : ' || l_material_req_rec.inventory_org_id);
1896: l_material_req_rec.mc_id,
1897: l_material_req_rec.mc_position_key;
1898: IF G_DEBUG = 'Y' THEN
1899: AHL_DEBUG_PUB.debug( 'association_type : ' || l_association_type );
1900: AHL_DEBUG_PUB.debug( 'POSITION_PATH_ID : ' || l_material_req_rec.POSITION_PATH_ID);
1901: AHL_DEBUG_PUB.debug( 'item_group_id : ' || l_material_req_rec.item_group_id);
1902: AHL_DEBUG_PUB.debug( 'inventory_item_id : ' || l_material_req_rec.inventory_item_id);
1903: AHL_DEBUG_PUB.debug( 'inventory_org_id : ' || l_material_req_rec.inventory_org_id);
1904: --sukhwsin: Added debug statements for mc and position key duplicate check
1897: l_material_req_rec.mc_position_key;
1898: IF G_DEBUG = 'Y' THEN
1899: AHL_DEBUG_PUB.debug( 'association_type : ' || l_association_type );
1900: AHL_DEBUG_PUB.debug( 'POSITION_PATH_ID : ' || l_material_req_rec.POSITION_PATH_ID);
1901: AHL_DEBUG_PUB.debug( 'item_group_id : ' || l_material_req_rec.item_group_id);
1902: AHL_DEBUG_PUB.debug( 'inventory_item_id : ' || l_material_req_rec.inventory_item_id);
1903: AHL_DEBUG_PUB.debug( 'inventory_org_id : ' || l_material_req_rec.inventory_org_id);
1904: --sukhwsin: Added debug statements for mc and position key duplicate check
1905: AHL_DEBUG_PUB.debug( 'mc_id : ' || l_material_req_rec.mc_id);
1898: IF G_DEBUG = 'Y' THEN
1899: AHL_DEBUG_PUB.debug( 'association_type : ' || l_association_type );
1900: AHL_DEBUG_PUB.debug( 'POSITION_PATH_ID : ' || l_material_req_rec.POSITION_PATH_ID);
1901: AHL_DEBUG_PUB.debug( 'item_group_id : ' || l_material_req_rec.item_group_id);
1902: AHL_DEBUG_PUB.debug( 'inventory_item_id : ' || l_material_req_rec.inventory_item_id);
1903: AHL_DEBUG_PUB.debug( 'inventory_org_id : ' || l_material_req_rec.inventory_org_id);
1904: --sukhwsin: Added debug statements for mc and position key duplicate check
1905: AHL_DEBUG_PUB.debug( 'mc_id : ' || l_material_req_rec.mc_id);
1906: AHL_DEBUG_PUB.debug( 'mc_position_key : ' || l_material_req_rec.mc_position_key);
1899: AHL_DEBUG_PUB.debug( 'association_type : ' || l_association_type );
1900: AHL_DEBUG_PUB.debug( 'POSITION_PATH_ID : ' || l_material_req_rec.POSITION_PATH_ID);
1901: AHL_DEBUG_PUB.debug( 'item_group_id : ' || l_material_req_rec.item_group_id);
1902: AHL_DEBUG_PUB.debug( 'inventory_item_id : ' || l_material_req_rec.inventory_item_id);
1903: AHL_DEBUG_PUB.debug( 'inventory_org_id : ' || l_material_req_rec.inventory_org_id);
1904: --sukhwsin: Added debug statements for mc and position key duplicate check
1905: AHL_DEBUG_PUB.debug( 'mc_id : ' || l_material_req_rec.mc_id);
1906: AHL_DEBUG_PUB.debug( 'mc_position_key : ' || l_material_req_rec.mc_position_key);
1907: END IF;
1901: AHL_DEBUG_PUB.debug( 'item_group_id : ' || l_material_req_rec.item_group_id);
1902: AHL_DEBUG_PUB.debug( 'inventory_item_id : ' || l_material_req_rec.inventory_item_id);
1903: AHL_DEBUG_PUB.debug( 'inventory_org_id : ' || l_material_req_rec.inventory_org_id);
1904: --sukhwsin: Added debug statements for mc and position key duplicate check
1905: AHL_DEBUG_PUB.debug( 'mc_id : ' || l_material_req_rec.mc_id);
1906: AHL_DEBUG_PUB.debug( 'mc_position_key : ' || l_material_req_rec.mc_position_key);
1907: END IF;
1908: EXIT WHEN get_dup_rec%NOTFOUND;
1909: FND_MESSAGE.set_name( 'AHL', 'AHL_RM_MATERIAL_REQ_REC_DUP' );
1902: AHL_DEBUG_PUB.debug( 'inventory_item_id : ' || l_material_req_rec.inventory_item_id);
1903: AHL_DEBUG_PUB.debug( 'inventory_org_id : ' || l_material_req_rec.inventory_org_id);
1904: --sukhwsin: Added debug statements for mc and position key duplicate check
1905: AHL_DEBUG_PUB.debug( 'mc_id : ' || l_material_req_rec.mc_id);
1906: AHL_DEBUG_PUB.debug( 'mc_position_key : ' || l_material_req_rec.mc_position_key);
1907: END IF;
1908: EXIT WHEN get_dup_rec%NOTFOUND;
1909: FND_MESSAGE.set_name( 'AHL', 'AHL_RM_MATERIAL_REQ_REC_DUP' );
1910: FND_MESSAGE.set_token( 'RECORD', get_record_identifier( l_material_req_rec ) );
1994: mc.CONFIG_STATUS_CODE(+)='COMPLETE';
1995: --END
1996: BEGIN
1997: IF G_DEBUG='Y' THEN
1998: AHL_DEBUG_PUB.enable_debug;
1999: END IF;
2000: x_return_status := FND_API.G_RET_STS_SUCCESS;
2001: -- Check whether any duplicate records for the given OBJECT_ID
2002: OPEN get_dup_rec( p_object_id );
2097: FND_MSG_PUB.initialize;
2098: END IF;
2099: -- Enable Debug (optional)
2100: IF ( G_DEBUG = 'Y' ) THEN
2101: AHL_DEBUG_PUB.enable_debug;
2102: END IF;
2103: IF G_DEBUG = 'Y' THEN
2104: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : Begin API' );
2105: END IF;
2100: IF ( G_DEBUG = 'Y' ) THEN
2101: AHL_DEBUG_PUB.enable_debug;
2102: END IF;
2103: IF G_DEBUG = 'Y' THEN
2104: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : Begin API' );
2105: END IF;
2106: --This is to be added before calling validate_efct_api_inputs
2107: -- Validate Application Usage
2108: IF (p_association_type = 'ROUTE')
2164: END IF;
2165: END IF;
2166: END LOOP;
2167: IF G_DEBUG = 'Y' THEN
2168: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after convert_values_to_ids' );
2169: END IF;
2170: -- Default missing and unchanged attributes.
2171: FOR i IN 1..p_x_material_req_tbl.count LOOP
2172: IF ( p_x_material_req_tbl(i).dml_operation = 'U' ) THEN
2181: );
2182: END IF;
2183: END LOOP;
2184: IF G_DEBUG = 'Y' THEN
2185: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after default_unchanged_attributes / default_missing_attributes' );
2186: END IF;
2187: -- Validate all attributes (Item level validation)
2188: FOR i IN 1..p_x_material_req_tbl.count LOOP
2189: validate_attributes
2199: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2200: END IF;*/
2201: END LOOP;
2202: IF G_DEBUG = 'Y' THEN
2203: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after validate_attributes' );
2204: END IF;
2205: -- Perform cross attribute validation and missing attribute checks (Record level validation)
2206: FOR i IN 1..p_x_material_req_tbl.count LOOP
2207: IF ( p_x_material_req_tbl(i).dml_operation <> 'D' ) THEN
2225: x_msg_count := l_msg_count;
2226: RAISE FND_API.G_EXC_ERROR;
2227: END IF;
2228: IF G_DEBUG = 'Y' THEN
2229: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after validate_record' );
2230: END IF;
2231: IF ( p_association_type = 'OPERATION')
2232: THEN
2233: -- Check if the Route is existing and in Draft status
2322: END IF;
2323: -- Perform the DML statement directly.
2324: FOR i IN 1..p_x_material_req_tbl.count LOOP
2325: IF G_DEBUG = 'Y' THEN
2326: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_material_req_tbl(i).dml_operation ' || p_x_material_req_tbl(i).dml_operation ) ;
2327: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2328: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_association_type ' || p_association_type );
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2323: -- Perform the DML statement directly.
2324: FOR i IN 1..p_x_material_req_tbl.count LOOP
2325: IF G_DEBUG = 'Y' THEN
2326: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_material_req_tbl(i).dml_operation ' || p_x_material_req_tbl(i).dml_operation ) ;
2327: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2328: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_association_type ' || p_association_type );
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2324: FOR i IN 1..p_x_material_req_tbl.count LOOP
2325: IF G_DEBUG = 'Y' THEN
2326: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_material_req_tbl(i).dml_operation ' || p_x_material_req_tbl(i).dml_operation ) ;
2327: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2328: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_association_type ' || p_association_type );
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2325: IF G_DEBUG = 'Y' THEN
2326: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_material_req_tbl(i).dml_operation ' || p_x_material_req_tbl(i).dml_operation ) ;
2327: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2328: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_association_type ' || p_association_type );
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2333: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2326: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_material_req_tbl(i).dml_operation ' || p_x_material_req_tbl(i).dml_operation ) ;
2327: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2328: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_association_type ' || p_association_type );
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2333: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2334: --sukhwsin: Added debug statements for SB Effectivity Starts
2327: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2328: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_association_type ' || p_association_type );
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2333: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2334: --sukhwsin: Added debug statements for SB Effectivity Starts
2335: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id);
2328: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_association_type ' || p_association_type );
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2333: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2334: --sukhwsin: Added debug statements for SB Effectivity Starts
2335: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id);
2336: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key);
2329: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2330: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2333: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2334: --sukhwsin: Added debug statements for SB Effectivity Starts
2335: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id);
2336: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key);
2337: --sukhwsin: Added debug statements for SB Effectivity ends
2331: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2333: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2334: --sukhwsin: Added debug statements for SB Effectivity Starts
2335: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id);
2336: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key);
2337: --sukhwsin: Added debug statements for SB Effectivity ends
2338: END IF;
2339: IF ( p_x_material_req_tbl(i).dml_operation = 'C' ) THEN
2332: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2333: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2334: --sukhwsin: Added debug statements for SB Effectivity Starts
2335: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id);
2336: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key);
2337: --sukhwsin: Added debug statements for SB Effectivity ends
2338: END IF;
2339: IF ( p_x_material_req_tbl(i).dml_operation = 'C' ) THEN
2340: BEGIN
2425: p_x_material_req_tbl(i).mc_position_key
2426: --sukhwsin: Added columns values for SB Effectivity ends
2427: ) RETURNING rt_oper_material_id INTO l_rt_oper_material_id;
2428: IF G_DEBUG = 'Y' THEN
2429: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_object_id ' || p_object_id );
2430: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_association_type ' || p_association_type );
2431: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2426: --sukhwsin: Added columns values for SB Effectivity ends
2427: ) RETURNING rt_oper_material_id INTO l_rt_oper_material_id;
2428: IF G_DEBUG = 'Y' THEN
2429: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_object_id ' || p_object_id );
2430: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_association_type ' || p_association_type );
2431: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2427: ) RETURNING rt_oper_material_id INTO l_rt_oper_material_id;
2428: IF G_DEBUG = 'Y' THEN
2429: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_object_id ' || p_object_id );
2430: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_association_type ' || p_association_type );
2431: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2428: IF G_DEBUG = 'Y' THEN
2429: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_object_id ' || p_object_id );
2430: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_association_type ' || p_association_type );
2431: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2429: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_object_id ' || p_object_id );
2430: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_association_type ' || p_association_type );
2431: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2430: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_association_type ' || p_association_type );
2431: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2431: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).position_path_id ' || p_x_material_req_tbl(i).position_path_id );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2432: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_group_id ' || p_x_material_req_tbl(i).item_group_id );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2433: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_item_id ' || p_x_material_req_tbl(i).inventory_item_id );
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2441: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert l_rt_oper_material_id' || l_rt_oper_material_id);
2434: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).inventory_org_id ' || p_x_material_req_tbl(i).inventory_org_id );
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2441: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert l_rt_oper_material_id' || l_rt_oper_material_id);
2442: --sukhwsin: Added debug statements for SB Effectivity Starts
2435: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).uom_code ' || p_x_material_req_tbl(i).uom_code);
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2441: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert l_rt_oper_material_id' || l_rt_oper_material_id);
2442: --sukhwsin: Added debug statements for SB Effectivity Starts
2443: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id );
2436: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).quantity ' || p_x_material_req_tbl(i).quantity);
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2441: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert l_rt_oper_material_id' || l_rt_oper_material_id);
2442: --sukhwsin: Added debug statements for SB Effectivity Starts
2443: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id );
2444: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key );
2437: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).item_comp_detail_id ' || p_x_material_req_tbl(i).item_comp_detail_id);
2438: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).exclude_flag ' || p_x_material_req_tbl(i).exclude_flag );
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2441: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert l_rt_oper_material_id' || l_rt_oper_material_id);
2442: --sukhwsin: Added debug statements for SB Effectivity Starts
2443: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id );
2444: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key );
2445: --sukhwsin: Added debug statements for SB Effectivity ends
2439: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).rework_percent ' || p_x_material_req_tbl(i).rework_percent );
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2441: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert l_rt_oper_material_id' || l_rt_oper_material_id);
2442: --sukhwsin: Added debug statements for SB Effectivity Starts
2443: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id );
2444: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key );
2445: --sukhwsin: Added debug statements for SB Effectivity ends
2446: END IF;
2447: -- Set OUT values
2440: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).replace_percent ' || p_x_material_req_tbl(i).replace_percent );
2441: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert l_rt_oper_material_id' || l_rt_oper_material_id);
2442: --sukhwsin: Added debug statements for SB Effectivity Starts
2443: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_id ' || p_x_material_req_tbl(i).mc_id );
2444: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_material_req_tbl(i).mc_position_key ' || p_x_material_req_tbl(i).mc_position_key );
2445: --sukhwsin: Added debug statements for SB Effectivity ends
2446: END IF;
2447: -- Set OUT values
2448: p_x_material_req_tbl(i).rt_oper_material_id := l_rt_oper_material_id;
2547: END IF;
2548: END IF;
2549: END LOOP;
2550: IF G_DEBUG = 'Y' THEN
2551: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after DML operation' );
2552: END IF;
2553: -- Get all the error messages from the previous steps (if any) and raise the appropriate Exception
2554: l_msg_count := FND_MSG_PUB.count_msg;
2555: IF l_msg_count > 0 THEN
2569: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2570: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2571: END IF;
2572: IF G_DEBUG = 'Y' THEN
2573: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after validate_records' );
2574: END IF;
2575: -- Perform the Commit (if requested)
2576: IF FND_API.to_boolean( p_commit ) THEN
2577: COMMIT WORK;
2584: p_data => x_msg_data
2585: );
2586: -- Disable debug (if enabled)
2587: IF ( G_DEBUG = 'Y' ) THEN
2588: AHL_DEBUG_PUB.disable_debug;
2589: END IF;
2590: EXCEPTION
2591: WHEN FND_API.G_EXC_ERROR THEN
2592: ROLLBACK TO process_material_req_PVT;
2598: p_data => x_msg_data
2599: );
2600: -- Disable debug (if enabled)
2601: IF ( G_DEBUG = 'Y' ) THEN
2602: AHL_DEBUG_PUB.disable_debug;
2603: END IF;
2604: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2605: ROLLBACK TO process_material_req_PVT;
2606: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2611: p_data => x_msg_data
2612: );
2613: -- Disable debug (if enabled)
2614: IF ( G_DEBUG = 'Y' ) THEN
2615: AHL_DEBUG_PUB.disable_debug;
2616: END IF;
2617: WHEN OTHERS THEN
2618: ROLLBACK TO process_material_req_PVT;
2619: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2633: p_data => x_msg_data
2634: );
2635: -- Disable debug (if enabled)
2636: IF ( G_DEBUG = 'Y' ) THEN
2637: AHL_DEBUG_PUB.disable_debug;
2638: END IF;
2639: END process_material_req;
2640: PROCEDURE process_route_efcts
2641: (
2685: IF FND_API.to_boolean( p_init_msg_list ) THEN
2686: FND_MSG_PUB.initialize;
2687: END IF;
2688: IF G_DEBUG = 'Y' THEN
2689: AHL_DEBUG_PUB.enable_debug;
2690: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : Begin API' );
2691: END IF;
2692: --This is to be added before calling validate_api_inputs
2693: -- Validate Application Usage
2686: FND_MSG_PUB.initialize;
2687: END IF;
2688: IF G_DEBUG = 'Y' THEN
2689: AHL_DEBUG_PUB.enable_debug;
2690: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : Begin API' );
2691: END IF;
2692: --This is to be added before calling validate_api_inputs
2693: -- Validate Application Usage
2694: AHL_RM_ROUTE_UTIL.validate_ApplnUsage
2744: END IF;
2745: END IF;
2746: END LOOP;
2747: IF G_DEBUG = 'Y' THEN
2748: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : after convert_values_to_ids' );
2749: END IF;
2750: -- Validate all attributes (Item level validation)
2751: FOR i IN 1..p_x_route_efct_tbl.count LOOP
2752: validate_efct_attributes
2761: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2762: END IF;
2763: END LOOP;
2764: IF G_DEBUG = 'Y' THEN
2765: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : after validate_attributes' );
2766: END IF;
2767: -- Default missing and unchanged attributes.
2768: FOR i IN 1..p_x_route_efct_tbl.count LOOP
2769: IF ( p_x_route_efct_tbl(i).dml_operation = 'U' ) THEN
2778: );
2779: END IF;
2780: END LOOP;
2781: IF G_DEBUG = 'Y' THEN
2782: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : after default_unchanged_attributes / default_missing_attributes' );
2783: END IF;
2784: -- Perform cross attribute validation and missing attribute checks (Record level validation)
2785: FOR i IN 1..p_x_route_efct_tbl.count LOOP
2786: IF ( p_x_route_efct_tbl(i).dml_operation <> 'D' ) THEN
2797: END IF;
2798: END IF;
2799: END LOOP;
2800: IF G_DEBUG = 'Y' THEN
2801: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : after validate_record' );
2802: END IF;
2803: IF G_DEBUG='Y' THEN
2804: AHL_DEBUG_PUB.debug( 'Starting updating parent route/operation');
2805: END IF;
2800: IF G_DEBUG = 'Y' THEN
2801: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : after validate_record' );
2802: END IF;
2803: IF G_DEBUG='Y' THEN
2804: AHL_DEBUG_PUB.debug( 'Starting updating parent route/operation');
2805: END IF;
2806: IF G_DEBUG='Y' THEN
2807: AHL_DEBUG_PUB.debug( 'p_association_type = ROUTE');
2808: END IF;
2803: IF G_DEBUG='Y' THEN
2804: AHL_DEBUG_PUB.debug( 'Starting updating parent route/operation');
2805: END IF;
2806: IF G_DEBUG='Y' THEN
2807: AHL_DEBUG_PUB.debug( 'p_association_type = ROUTE');
2808: END IF;
2809: -- Check if the Route is existing and in Draft status
2810: AHL_RM_ROUTE_UTIL.validate_route_status
2811: (
2832: -- Perform the DML statement directly.
2833: FOR i IN 1..p_x_route_efct_tbl.count LOOP
2834: IF ( p_x_route_efct_tbl(i).dml_operation = 'C' ) THEN
2835: IF G_DEBUG = 'Y' THEN
2836: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_route_efct_tbl(i).dml_operation ' || p_x_route_efct_tbl(i).dml_operation ) ;
2837: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2838: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_route_efct_tbl(i).INVENTORY_ITEM_ID ' || p_x_route_efct_tbl(i).INVENTORY_ITEM_ID );
2839: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2840: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2833: FOR i IN 1..p_x_route_efct_tbl.count LOOP
2834: IF ( p_x_route_efct_tbl(i).dml_operation = 'C' ) THEN
2835: IF G_DEBUG = 'Y' THEN
2836: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_route_efct_tbl(i).dml_operation ' || p_x_route_efct_tbl(i).dml_operation ) ;
2837: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2838: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_route_efct_tbl(i).INVENTORY_ITEM_ID ' || p_x_route_efct_tbl(i).INVENTORY_ITEM_ID );
2839: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2840: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2841: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2834: IF ( p_x_route_efct_tbl(i).dml_operation = 'C' ) THEN
2835: IF G_DEBUG = 'Y' THEN
2836: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_route_efct_tbl(i).dml_operation ' || p_x_route_efct_tbl(i).dml_operation ) ;
2837: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2838: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_route_efct_tbl(i).INVENTORY_ITEM_ID ' || p_x_route_efct_tbl(i).INVENTORY_ITEM_ID );
2839: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2840: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2841: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2842: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2835: IF G_DEBUG = 'Y' THEN
2836: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_route_efct_tbl(i).dml_operation ' || p_x_route_efct_tbl(i).dml_operation ) ;
2837: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2838: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_route_efct_tbl(i).INVENTORY_ITEM_ID ' || p_x_route_efct_tbl(i).INVENTORY_ITEM_ID );
2839: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2840: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2841: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2842: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2843: END IF;
2836: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : p_x_route_efct_tbl(i).dml_operation ' || p_x_route_efct_tbl(i).dml_operation ) ;
2837: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2838: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_route_efct_tbl(i).INVENTORY_ITEM_ID ' || p_x_route_efct_tbl(i).INVENTORY_ITEM_ID );
2839: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2840: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2841: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2842: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2843: END IF;
2844: -- Insert the record
2837: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_object_id ' || p_object_id );
2838: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_route_efct_tbl(i).INVENTORY_ITEM_ID ' || p_x_route_efct_tbl(i).INVENTORY_ITEM_ID );
2839: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2840: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2841: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2842: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2843: END IF;
2844: -- Insert the record
2845: p_x_route_efct_tbl(i).object_version_number := 1;
2838: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before DML p_x_route_efct_tbl(i).INVENTORY_ITEM_ID ' || p_x_route_efct_tbl(i).INVENTORY_ITEM_ID );
2839: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2840: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2841: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2842: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : before insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2843: END IF;
2844: -- Insert the record
2845: p_x_route_efct_tbl(i).object_version_number := 1;
2846: INSERT INTO ahl_route_effectivities
2906: p_x_route_efct_tbl(i).attribute14,
2907: p_x_route_efct_tbl(i).attribute15
2908: ) RETURNING route_effectivity_id INTO l_route_effectivitiy_id ;
2909: IF G_DEBUG = 'Y' THEN
2910: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after DML p_object_id ' || p_object_id );
2911: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2912: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2913: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2914: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2907: p_x_route_efct_tbl(i).attribute15
2908: ) RETURNING route_effectivity_id INTO l_route_effectivitiy_id ;
2909: IF G_DEBUG = 'Y' THEN
2910: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after DML p_object_id ' || p_object_id );
2911: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2912: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2913: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2914: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2915: END IF;
2908: ) RETURNING route_effectivity_id INTO l_route_effectivitiy_id ;
2909: IF G_DEBUG = 'Y' THEN
2910: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after DML p_object_id ' || p_object_id );
2911: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2912: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2913: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2914: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2915: END IF;
2916: -- Set OUT values
2909: IF G_DEBUG = 'Y' THEN
2910: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after DML p_object_id ' || p_object_id );
2911: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2912: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2913: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2914: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2915: END IF;
2916: -- Set OUT values
2917: p_x_route_efct_tbl(i).route_effectivity_id := l_route_effectivitiy_id;
2910: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after DML p_object_id ' || p_object_id );
2911: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID ' || p_x_route_efct_tbl(i).INVENTORY_MASTER_ORG_ID );
2912: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_ID ' || p_x_route_efct_tbl(i).MC_ID );
2913: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).MC_HEADER_ID ' || p_x_route_efct_tbl(i).MC_HEADER_ID );
2914: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME || ' : after insert p_x_route_efct_tbl(i).object_version_number ' || p_x_route_efct_tbl(i).object_version_number);
2915: END IF;
2916: -- Set OUT values
2917: p_x_route_efct_tbl(i).route_effectivity_id := l_route_effectivitiy_id;
2918: ELSIF ( p_x_route_efct_tbl(i).dml_operation = 'U' ) THEN
2971: END IF;
2972: END IF;
2973: END LOOP;
2974: IF G_DEBUG = 'Y' THEN
2975: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : after DML operation' );
2976: END IF;
2977: -- Get all the error messages from the previous steps (if any) and raise the appropriate Exception
2978: l_msg_count := FND_MSG_PUB.count_msg;
2979: IF l_msg_count > 0 THEN
2992: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2993: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2994: END IF;
2995: IF G_DEBUG = 'Y' THEN
2996: AHL_DEBUG_PUB.debug( G_PKG_NAME || '.' || G_API_NAME1 || ' : after validate_records' );
2997: END IF;
2998: -- Perform the Commit (if requested)
2999: IF FND_API.to_boolean( p_commit ) THEN
3000: COMMIT WORK;
3007: p_data => x_msg_data
3008: );
3009: -- Disable debug (if enabled)
3010: IF G_DEBUG = 'Y' THEN
3011: AHL_DEBUG_PUB.disable_debug;
3012: END IF;
3013: EXCEPTION
3014: WHEN FND_API.G_EXC_ERROR THEN
3015: ROLLBACK TO process_route_efcts;
3021: p_data => x_msg_data
3022: );
3023: -- Disable debug (if enabled)
3024: IF G_DEBUG = 'Y' THEN
3025: AHL_DEBUG_PUB.disable_debug;
3026: END IF;
3027: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3028: ROLLBACK TO process_route_efcts;
3029: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3034: p_data => x_msg_data
3035: );
3036: -- Disable debug (if enabled)
3037: IF G_DEBUG = 'Y' THEN
3038: AHL_DEBUG_PUB.disable_debug;
3039: END IF;
3040: WHEN OTHERS THEN
3041: ROLLBACK TO process_route_efcts;
3042: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3056: p_data => x_msg_data
3057: );
3058: -- Disable debug (if enabled)
3059: IF G_DEBUG = 'Y' THEN
3060: AHL_DEBUG_PUB.disable_debug;
3061: END IF;
3062: END process_route_efcts;
3063: END AHL_RM_MATERIAL_AS_PVT;