250: LOOP
251: -- We need to set the Message Context for each line.
252:
253: OE_Msg_Pub.Set_Msg_Context
254: ( p_entity_code => OE_GLOBALS.G_ENTITY_LINE
255: ,p_entity_id => c_ship_method.line_id
256: ,p_header_id => p_header_id
257: ,p_line_id => c_ship_method.line_id
258: ,p_order_source_id => c_ship_method.order_source_id
306: IF l_debug_level > 0 THEN
307: OE_DEBUG_PUB.Add('Line is Shipped/Fulfilled/Closed:'||
308: c_ship_method.line_id ,1);
309: END IF;
310: ELSIF c_ship_method.item_type_code = OE_GLOBALS.G_ITEM_CONFIG THEN
311:
312: -- We are not going to send Config lines to FTE
313: -- We have to store the config lines in the line table.
314: IF l_debug_level > 0 THEN
1326: l_fte_source_line_tab FTE_PROCESS_REQUESTS.Fte_Source_Line_Tab;
1327: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
1328: query_line_tbl OE_Order_PUB.Line_Tbl_Type;
1329: l_old_line_tbl OE_Order_PUB.Line_Tbl_Type;
1330: l_control_rec OE_GLOBALS.Control_Rec_Type;
1331: l_line_rec OE_ORDER_PUB.line_rec_type ;
1332: l_bulk_adj_rec OE_Freight_Rating_PVT.Bulk_Line_Adj_Rec_Type;
1333: l_count Number;
1334: l_fte_count Number := 1;
1366: ,oe_price_adjustments opa
1367: WHERE opa.charge_type_code IN ('FTEPRICE','FTECHARGE')
1368: AND list_line_type_code = 'COST' -- For bug 7043225
1369: AND ool.line_id = opa.line_id
1370: AND ool.item_type_code <> OE_GLOBALS.G_ITEM_CONFIG
1371: AND ool.ato_line_id = p_ato_line_id;
1372:
1373: /*CURSOR C_CONFIG_LINE_EXISTS(p_line_id IN NUMBER) IS
1374: SELECT 1 from oe_order_lines_all
1372:
1373: /*CURSOR C_CONFIG_LINE_EXISTS(p_line_id IN NUMBER) IS
1374: SELECT 1 from oe_order_lines_all
1375: WHERE ato_line_id = p_line_id
1376: AND item_type_code = OE_GLOBALS.G_ITEM_CONFIG;
1377: */
1378: BEGIN
1379:
1380: oe_debug_pub.add(' Entering the procedure process freight choices');
1453:
1454: query_line_tbl(1).freight_carrier_code :=
1455: g_fte_line_rate_tab(M).carrier_freight_code;
1456:
1457: query_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
1458:
1459: /* Start Audit Trail */
1460:
1461: query_line_tbl(1).change_reason := 'SYSTEM';
1468: IF l_debug_level > 0 THEN
1469: oe_debug_pub.add('No Changes to save', 4);
1470: END IF;
1471: /* renga-review */
1472: --l_line_rec.operation := OE_GLOBALS.G_OPR_NONE;
1473:
1474: query_line_tbl(1).operation := OE_GLOBALS.G_OPR_NONE;
1475:
1476: --x_no_opr_count := x_no_opr_count + 1;
1470: END IF;
1471: /* renga-review */
1472: --l_line_rec.operation := OE_GLOBALS.G_OPR_NONE;
1473:
1474: query_line_tbl(1).operation := OE_GLOBALS.G_OPR_NONE;
1475:
1476: --x_no_opr_count := x_no_opr_count + 1;
1477:
1478: End If;
1509: IF l_debug_level > 0 THEN
1510: oe_debug_pub.add('cfg line '|| g_line_tbl(l_index).line_id, 3);
1511: END IF;
1512:
1513: IF query_line_tbl(1).operation = OE_GLOBALS.G_OPR_UPDATE
1514: THEN
1515:
1516: g_line_tbl(l_index).shipping_method_code :=
1517: query_line_tbl(1).shipping_method_code;
1557: oe_debug_pub.add('Register changed line: '||l_line_rec.line_id,1);
1558: OE_LINE_ADJ_UTIL.Register_Changed_Lines
1559: (p_line_id => query_line_tbl(1).line_id,
1560: p_header_id => query_line_tbl(1).header_id,
1561: p_operation => OE_GLOBALS.G_OPR_UPDATE);
1562:
1563:
1564: END IF; -- if deleted_costs...
1565: /* Commented for bug 7043225. We now need to allow charges to get created on ATO Model,
1656: -- register changed line for config item line.
1657: OE_LINE_ADJ_UTIL.Register_Changed_Lines
1658: (p_line_id => l_line_id,
1659: p_header_id => l_header_id,
1660: p_operation => OE_GLOBALS.G_OPR_UPDATE);
1661:
1662: -- deleting the parents of the config line.
1663: -- these deleted parent lines have been registered in
1664: -- previous loop looping through p_fte_rates_tab, so
1691: /* J := l_line_tbl.FIRST;
1692: WHILE J IS NOT NULL LOOP
1693: -- delete those non-shippable ATO parent lines
1694: IF l_line_tbl(J).ato_line_id IS NOT NULL
1695: AND l_line_tbl(J).item_type_code <> OE_GLOBALS.G_ITEM_CONFIG THEN
1696: l_line_tbl(J).calculate_price_flag := 'N';
1697: oe_debug_pub.add('ATO item price flag set to N :'||l_line_tbl(J).line_id);
1698: END IF;
1699: J := l_line_tbl.NEXT(J);
1715: l_control_rec.controlled_operation := TRUE;
1716: l_control_rec.change_attributes := TRUE;
1717: l_control_rec.validate_entity := TRUE;
1718: l_control_rec.write_to_DB := TRUE;
1719: l_control_rec.process_entity := OE_GLOBALS.G_ENTITY_LINE;
1720:
1721: --l_line_tbl.operation := OE_GLOBALS.G_OPR_UPDATE;
1722:
1723: OE_ORDER_PVT.Lines
1717: l_control_rec.validate_entity := TRUE;
1718: l_control_rec.write_to_DB := TRUE;
1719: l_control_rec.process_entity := OE_GLOBALS.G_ENTITY_LINE;
1720:
1721: --l_line_tbl.operation := OE_GLOBALS.G_OPR_UPDATE;
1722:
1723: OE_ORDER_PVT.Lines
1724: ( p_validation_level => FND_API.G_VALID_LEVEL_NONE
1725: ,p_control_rec => l_control_rec
1735:
1736: l_pricing_event := 'BATCH';
1737:
1738: OE_delayed_requests_Pvt.log_request(
1739: p_entity_code => OE_GLOBALS.G_ENTITY_ALL,
1740: p_entity_id => p_header_id,
1741: p_requesting_entity_code => OE_GLOBALS.G_ENTITY_ALL,
1742: p_requesting_entity_id => p_header_id,
1743: p_request_unique_key1 => l_pricing_event,
1737:
1738: OE_delayed_requests_Pvt.log_request(
1739: p_entity_code => OE_GLOBALS.G_ENTITY_ALL,
1740: p_entity_id => p_header_id,
1741: p_requesting_entity_code => OE_GLOBALS.G_ENTITY_ALL,
1742: p_requesting_entity_id => p_header_id,
1743: p_request_unique_key1 => l_pricing_event,
1744: p_param1 => p_header_id,
1745: p_param2 => l_pricing_event,
1742: p_requesting_entity_id => p_header_id,
1743: p_request_unique_key1 => l_pricing_event,
1744: p_param1 => p_header_id,
1745: p_param2 => l_pricing_event,
1746: p_request_type => OE_GLOBALS.G_PRICE_ORDER,
1747: x_return_status => l_return_status);
1748:
1749:
1750: IF l_debug_level > 0 THEN -- bug7433107