DBA Data[Home] [Help]

APPS.PO_AUTO_LINE_LOC_PROCESS_PVT dependencies on PO_LINE_LOCATIONS

Line 31: PO_LINE_LOCATIONS_DRAFT_ALL

27: Name: create_shipment_draft
28: Pre-reqs:
29: PO Line has been created
30: Modifies:
31: PO_LINE_LOCATIONS_DRAFT_ALL
32: Locks:
33: None
34: Function:
35: Derives,deaults the shipment info from available lines information and

Line 36: inserts/updates the PO_LINE_LOCATIONS_DRAFT_ALL.

32: Locks:
33: None
34: Function:
35: Derives,deaults the shipment info from available lines information and
36: inserts/updates the PO_LINE_LOCATIONS_DRAFT_ALL.
37: Parameters:
38: p_lines IN OUT Derived Line data after lines processing
39: Returns:
40: None

Line 107: x_closed_reason po_line_locations.closed_reason%TYPE;

103: l_encode VARCHAR2(2000);
104: x_po_uom varchar2(25):=null;
105: x_temp_uom varchar2(25):=null;
106: x_temp_item_id number:=null;
107: x_closed_reason po_line_locations.closed_reason%TYPE;
108: x_uom_convert varchar2(2) := fnd_profile.value('PO_REQ_BPA_UOM_CONVERT');
109:
110:
111: l_promised_date DATE;

Line 117: l_manual_price_change_flag po_line_locations_all.manual_price_change_flag%TYPE := NULL; --bug 3495772

113:
114:
115: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_SHIPMENT_DRAFT';
116: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
117: l_manual_price_change_flag po_line_locations_all.manual_price_change_flag%TYPE := NULL; --bug 3495772
118:
119:
120: l_from_type_lookup_code po_headers_all.type_lookup_code%TYPE;
121:

Line 328: FROM po_line_locations_draft_all poll, --

324: SELECT poll.line_location_id,
325: poll.secondary_unit_of_measure --
326: INTO x_line_location_id,
327: x_secondary_unit_of_measure
328: FROM po_line_locations_draft_all poll, --
329: po_lines_draft_all pol --
330: WHERE poll.po_header_id = p_lines.po_header_id_tbl(i)
331: AND pol.draft_id =po_autocreate_params.g_draft_id
332: AND poll.po_line_id = p_lines.po_line_id_tbl(i)

Line 433: p_message => 'Create_shipment: Update PO line locations');

429: p_token => l_progress,
430: p_message => 'Create_shipment: shipment exist');
431: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
432: p_token => l_progress,
433: p_message => 'Create_shipment: Update PO line locations');
434: END IF;
435:
436: /* Quantity conversion for foreign currency was not happening for
437: amount based lines when we try to add to existing shipment line */

Line 486: UPDATE po_line_locations_draft_all --

482:
483: l_progress:='140';
484: --
485: -- replace interface.secondary_quantity with x_secondary_quantity
486: UPDATE po_line_locations_draft_all --
487: SET quantity = quantity + x_quantity,
488: secondary_quantity = secondary_quantity + x_secondary_quantity,
489: approved_flag = DECODE(approved_flag, 'N','N', 'R'),
490: last_update_date = p_lines.last_update_date_tbl(i),

Line 643: SELECT po_line_locations_s.nextval INTO x_line_location_id FROM sys.dual;

639: p_message => 'Create shipment: Create a new shipment');
640: END IF;
641:
642: l_progress:='240';
643: SELECT po_line_locations_s.nextval INTO x_line_location_id FROM sys.dual;
644:
645: -- Get the taxable_flag based on the following priority
646: -- 1. preferences (global.po_taxable_flag)
647: -- 2. ship_to_org (x_ship_to_org_taxable_flag)

Line 693: p_message => 'Create shipment: Before insert into po line locations');

689: l_progress := '310';
690:
691: IF g_debug_stmt THEN
692: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress,
693: p_message => 'Create shipment: Before insert into po line locations');
694: END IF;
695:
696: IF p_lines.consigned_flag_tbl(i) = 'Y' THEN
697: x_closed_reason := fnd_message.get_string('PO', 'PO_SUP_CONS_CLOSED_REASON');

Line 741: INTO po_line_locations_draft_all --

737: END IF;
738:
739: l_progress := '350';
740: INSERT
741: INTO po_line_locations_draft_all --
742: (
743: draft_id,
744: line_location_id,
745: last_update_date,

Line 986: p_message => 'Create shipment: After insert into po line locations DRAFT');

982:
983: l_progress := '360';
984: IF g_debug_stmt THEN
985: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress,
986: p_message => 'Create shipment: After insert into po line locations DRAFT');
987: END IF;
988: END IF;
989:
990: idx := idx + 1;

Line 1032: -- PO_LINE_LOCATIONS_DRAFT

1028: --Name: create_payitems_draft
1029: --Pre-reqs:
1030: -- PO Line has been created.
1031: --Modifies:
1032: -- PO_LINE_LOCATIONS_DRAFT
1033: --Locks:
1034: -- None.
1035: --Function:
1036: -- Create all payitems for a PO Line. If PO_LINE_LOCATIONS_INTERFACE is

Line 1036: -- Create all payitems for a PO Line. If PO_LINE_LOCATIONS_INTERFACE is

1032: -- PO_LINE_LOCATIONS_DRAFT
1033: --Locks:
1034: -- None.
1035: --Function:
1036: -- Create all payitems for a PO Line. If PO_LINE_LOCATIONS_INTERFACE is
1037: -- populated, use that information. Otherwise, create a default
1038: -- payitem. Also create DELIVERY and ADVANCE payitems as necessary.
1039: --Parameters:
1040: -- IN OUT: p_lines Lines data

Line 1060: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;

1056: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
1057: l_line_quantity PO_LINES_ALL.quantity%TYPE;
1058: l_line_amount PO_LINES_ALL.amount%TYPE;
1059: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
1060: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;
1061: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
1062: l_payitem_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
1063: l_payitem_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
1064: l_payitem_price PO_LINE_LOCATIONS_ALL.price_override%TYPE;

Line 1061: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;

1057: l_line_quantity PO_LINES_ALL.quantity%TYPE;
1058: l_line_amount PO_LINES_ALL.amount%TYPE;
1059: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
1060: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;
1061: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
1062: l_payitem_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
1063: l_payitem_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
1064: l_payitem_price PO_LINE_LOCATIONS_ALL.price_override%TYPE;
1065: l_req_tax_code_id PO_REQUISITION_LINES_ALL.tax_code_id%TYPE;

Line 1062: l_payitem_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;

1058: l_line_amount PO_LINES_ALL.amount%TYPE;
1059: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
1060: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;
1061: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
1062: l_payitem_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
1063: l_payitem_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
1064: l_payitem_price PO_LINE_LOCATIONS_ALL.price_override%TYPE;
1065: l_req_tax_code_id PO_REQUISITION_LINES_ALL.tax_code_id%TYPE;
1066: l_req_tax_user_override_flag PO_REQUISITION_LINES_ALL.tax_user_override_flag%TYPE;

Line 1063: l_payitem_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;

1059: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
1060: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;
1061: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
1062: l_payitem_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
1063: l_payitem_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
1064: l_payitem_price PO_LINE_LOCATIONS_ALL.price_override%TYPE;
1065: l_req_tax_code_id PO_REQUISITION_LINES_ALL.tax_code_id%TYPE;
1066: l_req_tax_user_override_flag PO_REQUISITION_LINES_ALL.tax_user_override_flag%TYPE;
1067: l_req_tax_status_indicator PO_REQUISITION_LINES_ALL.tax_status_indicator%TYPE;

Line 1064: l_payitem_price PO_LINE_LOCATIONS_ALL.price_override%TYPE;

1060: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;
1061: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
1062: l_payitem_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
1063: l_payitem_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
1064: l_payitem_price PO_LINE_LOCATIONS_ALL.price_override%TYPE;
1065: l_req_tax_code_id PO_REQUISITION_LINES_ALL.tax_code_id%TYPE;
1066: l_req_tax_user_override_flag PO_REQUISITION_LINES_ALL.tax_user_override_flag%TYPE;
1067: l_req_tax_status_indicator PO_REQUISITION_LINES_ALL.tax_status_indicator%TYPE;
1068: l_tax_name AP_TAX_CODES.name%TYPE;

Line 1078: l_line_loc_id PO_LINE_LOCATIONS_ALL.line_location_id%TYPE;

1074: l_ship_to_location_id NUMBER;
1075: l_payitem_tax_code_id_tbl po_tbl_number;
1076: l_payitems_created NUMBER;
1077: l_routing_name RCV_ROUTING_HEADERS.routing_name%TYPE;
1078: l_line_loc_id PO_LINE_LOCATIONS_ALL.line_location_id%TYPE;
1079: l_po_promised_def_prf VARCHAR2(1) := FND_PROFILE.value('PO_NEED_BY_PROMISE_DEFAULTING');
1080: l_country_of_origin_code VARCHAR2(2);
1081: l_tax_status VARCHAR2(10);
1082: l_encoded_msg VARCHAR2(2000);

Line 1112: FROM po_line_locations_interface polli

1108: polli.description,
1109: polli.work_approver_id,
1110: polli.bid_payment_id,
1111: polli.unit_of_measure
1112: FROM po_line_locations_interface polli
1113: WHERE polli.interface_line_id = p_interface_line_id
1114: ORDER BY polli.shipment_num;
1115:
1116: line_location_rec poll_interface_cursor%ROWTYPE;

Line 1218: -- po_line_locations interface table

1214:
1215: d_progress := 60;
1216:
1217: --SQL WHAT: Insert information for default payitem into
1218: -- po_line_locations interface table
1219: --SQL WHY : We will use line_locations_interface as a
1220: -- common entry point for payitems - whether they come from
1221: -- sourcing or we default them from scratch here.
1222: INSERT

Line 1223: INTO po_line_locations_interface

1219: --SQL WHY : We will use line_locations_interface as a
1220: -- common entry point for payitems - whether they come from
1221: -- sourcing or we default them from scratch here.
1222: INSERT
1223: INTO po_line_locations_interface
1224: (
1225: interface_line_location_id ,
1226: interface_header_id ,
1227: interface_line_id ,

Line 1239: PO_LINE_LOCATIONS_INTERFACE_S.NEXTVAL ,

1235: promised_date
1236: )
1237: VALUES
1238: (
1239: PO_LINE_LOCATIONS_INTERFACE_S.NEXTVAL ,
1240: p_lines.intf_header_id_tbl(i) ,
1241: p_lines.intf_line_id_tbl(i) ,
1242: l_payitem_quantity ,
1243: l_payitem_amount ,

Line 1261: -- po_line_locations_interface table

1257: d_progress := 70;
1258: -- if financing case, create actual delivery payitem
1259: -- this payitem has a shipment_type of STANDARD and payment_type of DELIVERY
1260: --SQL WHAT: Insert information for delivery payitem into
1261: -- po_line_locations_interface table
1262: --SQL WHY : We will use line_locations_interface as a
1263: -- common entry point for payitems, including ones we create
1264: -- behind the scenes
1265: INSERT

Line 1266: INTO po_line_locations_interface

1262: --SQL WHY : We will use line_locations_interface as a
1263: -- common entry point for payitems, including ones we create
1264: -- behind the scenes
1265: INSERT
1266: INTO po_line_locations_interface
1267: (
1268: interface_line_location_id ,
1269: interface_header_id ,
1270: interface_line_id ,

Line 1283: PO_LINE_LOCATIONS_INTERFACE_S.NEXTVAL ,

1279: promised_date
1280: )
1281: VALUES
1282: (
1283: PO_LINE_LOCATIONS_INTERFACE_S.NEXTVAL ,
1284: p_lines.intf_header_id_tbl(i) ,
1285: p_lines.intf_line_id_tbl(i) ,
1286: l_line_quantity ,
1287: l_line_amount ,

Line 1316: -- po_line_locations_interface table

1312:
1313: l_advance_desc := substrb(FND_MESSAGE.get, 1, 240);
1314:
1315: --SQL WHAT: Insert information for advance payitem into
1316: -- po_line_locations_interface table
1317: --SQL WHY : We will use line_locations_interface as a
1318: -- common entry point for payitems, including ones we create
1319: -- behind the scenes
1320: INSERT

Line 1321: INTO po_line_locations_interface

1317: --SQL WHY : We will use line_locations_interface as a
1318: -- common entry point for payitems, including ones we create
1319: -- behind the scenes
1320: INSERT
1321: INTO po_line_locations_interface
1322: (
1323: interface_line_location_id ,
1324: interface_header_id ,
1325: interface_line_id ,

Line 1337: PO_LINE_LOCATIONS_INTERFACE_S.NEXTVAL ,

1333: need_by_date
1334: )
1335: VALUES
1336: (
1337: PO_LINE_LOCATIONS_INTERFACE_S.NEXTVAL ,
1338: p_lines.intf_header_id_tbl(i) ,
1339: p_lines.intf_line_id_tbl(i) ,
1340: NULL ,
1341: p_lines.advance_amount_tbl(i) ,

Line 1370: UPDATE po_line_locations_interface polli

1366: d_progress := 110;
1367: --SQL WHAT: Default/update values for scratch payitems in interface table
1368: --SQL WHY : This allows us to update all new payitems' values at once,
1369: -- including payitems from sourcing or ones we've created in autocreate
1370: UPDATE po_line_locations_interface polli
1371: SET polli.value_basis = DECODE(polli.payment_type,
1372: 'RATE', 'QUANTITY',
1373: 'LUMPSUM', 'FIXED PRICE',
1374: 'MILESTONE', l_line_value_basis,

Line 1417: -- origin before inserting a new row into po_line_locations_all

1413:
1414: d_progress := 150;
1415: -- now iterate over the rows in the interface table
1416: -- for each row, get the default tax, receiving controls, and country of
1417: -- origin before inserting a new row into po_line_locations_all
1418: OPEN poll_interface_cursor(p_lines.intf_line_id_tbl(i));
1419: LOOP
1420: FETCH poll_interface_cursor INTO line_location_rec;
1421: EXIT

Line 1462: PO_LOG.stmt(d_module, d_progress, 'Inserting payitem into po_line_locations_all');

1458:
1459: d_progress := 210;
1460:
1461: IF (PO_LOG.d_stmt) THEN
1462: PO_LOG.stmt(d_module, d_progress, 'Inserting payitem into po_line_locations_all');
1463: END IF;
1464:
1465: -- insert payitem into po_line_locations_all
1466: --SQL WHAT: Insert payitem, using info in po_line_locations_interface

Line 1465: -- insert payitem into po_line_locations_all

1461: IF (PO_LOG.d_stmt) THEN
1462: PO_LOG.stmt(d_module, d_progress, 'Inserting payitem into po_line_locations_all');
1463: END IF;
1464:
1465: -- insert payitem into po_line_locations_all
1466: --SQL WHAT: Insert payitem, using info in po_line_locations_interface
1467: --SQL WHY : This allows us to insert all payitems in one location.
1468: INSERT
1469: INTO po_line_locations_draft_all

Line 1466: --SQL WHAT: Insert payitem, using info in po_line_locations_interface

1462: PO_LOG.stmt(d_module, d_progress, 'Inserting payitem into po_line_locations_all');
1463: END IF;
1464:
1465: -- insert payitem into po_line_locations_all
1466: --SQL WHAT: Insert payitem, using info in po_line_locations_interface
1467: --SQL WHY : This allows us to insert all payitems in one location.
1468: INSERT
1469: INTO po_line_locations_draft_all
1470: (

Line 1469: INTO po_line_locations_draft_all

1465: -- insert payitem into po_line_locations_all
1466: --SQL WHAT: Insert payitem, using info in po_line_locations_interface
1467: --SQL WHY : This allows us to insert all payitems in one location.
1468: INSERT
1469: INTO po_line_locations_draft_all
1470: (
1471: draft_id ,
1472: line_location_id ,
1473: last_update_date ,

Line 1562: PO_LINE_LOCATIONS_S.nextval ,

1558: )
1559: VALUES
1560: (
1561: po_autocreate_params.g_draft_id ,
1562: PO_LINE_LOCATIONS_S.nextval ,
1563: p_lines.last_update_date_tbl(i) ,
1564: p_lines.last_updated_by_tbl(i) ,
1565: p_lines.po_header_id_tbl(i) ,
1566: p_lines.creation_date_tbl(i) ,

Line 1707: UPDATE po_line_locations_interface polli

1703:
1704: d_progress := 230;
1705:
1706: -- create link between interface row and transaction row
1707: UPDATE po_line_locations_interface polli
1708: SET polli.line_location_id = l_line_loc_id
1709: WHERE polli.interface_line_location_id = line_location_rec.interface_line_location_id;
1710:
1711: d_progress := 240;

Line 1713: SELECT PO_LINE_LOCATIONS_S.currval

1709: WHERE polli.interface_line_location_id = line_location_rec.interface_line_location_id;
1710:
1711: d_progress := 240;
1712: -- Bug9441838: Added variable to pass sequence current value
1713: SELECT PO_LINE_LOCATIONS_S.currval
1714: INTO x_line_location_id
1715: FROM sys.dual;
1716:
1717: IF (PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN

Line 1770: PO_LINE_LOCATIONS_DRAFT_ALL

1766: Name: create_pricebreak_draft
1767: Pre-reqs:
1768: PO Line has been created
1769: Modifies:
1770: PO_LINE_LOCATIONS_DRAFT_ALL
1771: Locks:
1772: None
1773: Function:
1774: Derives,deaults the Price Breaks info from available lines information and

Line 1775: inserts/updates the PO_LINE_LOCATIONS_DRAFT_ALL.

1771: Locks:
1772: None
1773: Function:
1774: Derives,deaults the Price Breaks info from available lines information and
1775: inserts/updates the PO_LINE_LOCATIONS_DRAFT_ALL.
1776: Parameters:
1777: p_lines IN OUT Derived Line data after lines processing
1778: Returns:
1779: None

Line 1798: l_tax_attribute_update_code PO_LINE_LOCATIONS_ALL.tax_attribute_update_code%type; --

1794: l_ship_org_name VARCHAR2(60);
1795: l_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE; --
1796: l_outsourced_assembly NUMBER;
1797: x_line_location_id NUMBER;
1798: l_tax_attribute_update_code PO_LINE_LOCATIONS_ALL.tax_attribute_update_code%type; --
1799:
1800: BEGIN
1801:
1802: l_progress := '010';

Line 1829: SELECT po_line_locations_s.nextval INTO x_line_location_id FROM sys.dual;

1825: END IF;
1826:
1827: BEGIN
1828: l_progress := '030';
1829: SELECT po_line_locations_s.nextval INTO x_line_location_id FROM sys.dual;
1830:
1831: EXCEPTION
1832: WHEN OTHERS THEN
1833: IF g_debug_unexp THEN

Line 1882: INTO po_line_locations_draft_all

1878: END IF;
1879:
1880: BEGIN
1881: INSERT
1882: INTO po_line_locations_draft_all
1883: (
1884: draft_id,
1885: line_location_id,
1886: last_update_date,