DBA Data[Home] [Help]

APPS.PO_AUTO_LINE_PROCESS_PVT dependencies on PO_LINES

Line 14: ** - Group lines in po_lines_interface

10: ** This package contains logic for AutoCreate Line processing stage
11: ** This API calls the subroutines to handle the derivation, defaulting,
12: ** validation and insert/update of the Lines.
13: **
14: ** - Group lines in po_lines_interface
15: ** - Fetch data from po_lines_interface
16: ** - Derive Line
17: ** - Default Line
18: ** - Validate Line

Line 15: ** - Fetch data from po_lines_interface

11: ** This API calls the subroutines to handle the derivation, defaulting,
12: ** validation and insert/update of the Lines.
13: **
14: ** - Group lines in po_lines_interface
15: ** - Fetch data from po_lines_interface
16: ** - Derive Line
17: ** - Default Line
18: ** - Validate Line
19: ** - Insert into po_lines_draft_all

Line 19: ** - Insert into po_lines_draft_all

15: ** - Fetch data from po_lines_interface
16: ** - Derive Line
17: ** - Default Line
18: ** - Validate Line
19: ** - Insert into po_lines_draft_all
20: **
21: ** The procedures of this package are called from PO_AUTOCREATE_MAINPROC_PVT.process_line
22: **
23: ** HISTORY

Line 223: l_clin_num_display po_lines_interface.line_num_display%TYPE;

219: l_api_name VARCHAR2(30) := 'setup_interface_data';
220: l_ship_to_org_id HR_LOCATIONS_ALL.inventory_organization_id%TYPE;
221: l_count_dist NUMBER;
222: -- Added for Linking requisition to Modification project
223: l_clin_num_display po_lines_interface.line_num_display%TYPE;
224: l_slin_num_display po_lines_interface.line_num_display%TYPE;
225: l_slin_count NUMBER :=0;
226: l_is_first_slin VARCHAR2(1) :='Y';
227:

Line 224: l_slin_num_display po_lines_interface.line_num_display%TYPE;

220: l_ship_to_org_id HR_LOCATIONS_ALL.inventory_organization_id%TYPE;
221: l_count_dist NUMBER;
222: -- Added for Linking requisition to Modification project
223: l_clin_num_display po_lines_interface.line_num_display%TYPE;
224: l_slin_num_display po_lines_interface.line_num_display%TYPE;
225: l_slin_count NUMBER :=0;
226: l_is_first_slin VARCHAR2(1) :='Y';
227:
228: CURSOR c_slin

Line 232: FROM po_lines_interface

228: CURSOR c_slin
229: IS
230: SELECT INTERFACE_LINE_ID INTERFACE_LINE_ID,
231: group_line_id group_line_id
232: FROM po_lines_interface
233: WHERE group_line_id IS NOT NULL
234: AND interface_header_id =PO_AUTOCREATE_PARAMS.x_interface_header_id;
235:
236: CURSOR c_clin(p_req_line_id IN NUMBER)

Line 239: FROM po_lines_interface

235:
236: CURSOR c_clin(p_req_line_id IN NUMBER)
237: IS
238: SELECT INTERFACE_LINE_ID
239: FROM po_lines_interface
240: WHERE 1 =1
241: AND interface_header_id=PO_AUTOCREATE_PARAMS.x_interface_header_id
242: AND REQUISITION_LINE_ID=p_req_line_id;
243:

Line 248: FROM po_lines_interface

244: CURSOR c_option
245: IS
246: SELECT INTERFACE_LINE_ID,
247: CLM_BASE_LINE_NUM
248: FROM po_lines_interface
249: WHERE clm_base_line_num IS NOT NULL
250: AND interface_header_id =PO_AUTOCREATE_PARAMS.x_interface_header_id;
251:
252: CURSOR c_base(p_req_line_id IN NUMBER)

Line 255: FROM po_lines_interface

251:
252: CURSOR c_base(p_req_line_id IN NUMBER)
253: IS
254: SELECT INTERFACE_LINE_ID
255: FROM po_lines_interface
256: WHERE 1 =1
257: AND interface_header_id=PO_AUTOCREATE_PARAMS.x_interface_header_id
258: AND REQUISITION_LINE_ID=p_req_line_id;
259:

Line 280: FROM po_lines_interface pli,

276: phi.rate,
277: phi.rate_date,
278: phi.document_subtype,
279: pli.unit_price
280: FROM po_lines_interface pli,
281: po_headers_interface phi,
282: po_line_types plt
283: WHERE phi.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
284: AND phi.interface_header_id = pli.interface_header_id

Line 314: UPDATE po_lines_interface pli

310: -- and prl.auction_line_number<>pli.auction_line_number)" in the
311: --following sql.
312: l_progress := '010';
313:
314: UPDATE po_lines_interface pli
315: SET pli.requisition_line_id = NULL
316: WHERE pli.interface_header_id= PO_AUTOCREATE_PARAMS.x_interface_header_id
317: AND EXISTS
318: (SELECT requisition_line_id

Line 339: UPDATE po_lines_interface pli

335: IF g_debug_stmt THEN
336: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Before the update for withdrawn reqs');
337: END IF;
338:
339: UPDATE po_lines_interface pli
340: SET pli.requisition_line_id = NULL
341: WHERE pli.interface_header_id= PO_AUTOCREATE_PARAMS.x_interface_header_id
342: AND NOT EXISTS
343: (SELECT requisition_line_id

Line 365: UPDATE po_lines_interface pli2

361: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress,
362: p_message => 'Before setting priced lines in interface tables');
363: END IF;
364:
365: UPDATE po_lines_interface pli2
366: SET
367: (
368: line_num,
369: item_id,

Line 498: FROM po_lines_interface pli,

494: NVL(pli.clm_funded_flag, prl.clm_funded_flag) ,
495: NVL(pli.clm_base_line_num,prl.clm_base_line_num) ,
496: NVL(pli.contract_type,prl.contract_type) ,
497: NVL(pli.cost_constraint,prl.cost_constraint)
498: FROM po_lines_interface pli,
499: po_headers_interface phi,
500: po_requisition_lines_all prl,
501: po_line_types plt
502: WHERE pli.interface_line_id = pli2.interface_line_id

Line 519: UPDATE po_lines_interface pli2

515: p_message => 'Before setting Info lines in interface tables');
516: END IF;
517:
518: /* For Info-Lines */
519: UPDATE po_lines_interface pli2
520: SET
521: (
522: line_num,
523: item_id,

Line 643: FROM po_lines_interface pli,

639: NVL(pli.CLM_OPTION_TO_DATE, prl.CLM_OPTION_TO_DATE) ,
640: NVL(pli.CLM_FUNDED_FLAG, prl.CLM_FUNDED_FLAG) ,
641: NVL(pli.CLM_BASE_LINE_NUM,prl.CLM_BASE_LINE_NUM)
642: --
643: FROM po_lines_interface pli,
644: po_headers_interface phi,
645: po_requisition_lines_all prl --
646: WHERE pli.interface_line_id = pli2.interface_line_id
647: AND pli.interface_header_id = phi.interface_header_id

Line 687: UPDATE po_lines_interface

683: FETCH c_clin INTO l_parent_line_id;
684: CLOSE c_clin;
685:
686: l_progress :='062';
687: UPDATE po_lines_interface
688: SET group_line_id = l_parent_line_id
689: WHERE INTERFACE_LINE_ID = crec.INTERFACE_LINE_ID
690: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id;
691: -- Added for Linking requisition to modification project

Line 698: FROM PO_LINES_merge_v

694: l_progress :='063';
695: BEGIN
696: SELECT line_num_display
697: INTO l_clin_num_display
698: FROM PO_LINES_merge_v
699: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id
700: AND draft_id = po_autocreate_params.g_draft_id
701: AND LINE_NUM =
702: (SELECT line_num

Line 703: FROM po_lines_interface

699: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id
700: AND draft_id = po_autocreate_params.g_draft_id
701: AND LINE_NUM =
702: (SELECT line_num
703: FROM po_lines_interface
704: WHERE interface_line_id = l_parent_line_id
705: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id
706: );
707:

Line 725: UPDATE po_lines_interface

721: p_message => 'Setting line_num_display for slins of ' || l_clin_num_display || ' for slin ' || l_slin_num_display);
722: END IF;
723:
724: l_progress :='066';
725: UPDATE po_lines_interface
726: SET line_num_display = l_slin_num_display
727: WHERE INTERFACE_LINE_ID = crec.INTERFACE_LINE_ID
728: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id
729: AND clm_info_flag ='Y';

Line 752: UPDATE po_lines_interface

748: FETCH c_base INTO l_parent_line_id;
749: CLOSE c_base;
750:
751: l_progress :='071';
752: UPDATE po_lines_interface
753: SET CLM_BASE_LINE_NUM = l_parent_line_id
754: WHERE INTERFACE_LINE_ID = crec.INTERFACE_LINE_ID
755: AND INTERFACE_HEADER_ID = PO_AUTOCREATE_PARAMS.x_interface_header_id;
756:

Line 882: po_lines_interface pli,

878: prd.quantity_funded, --
879: prd.amount_funded --
880: FROM po_requisition_lines_all prl, --
881: po_req_distributions_all prd, --
882: po_lines_interface pli,
883: po_headers_interface phi
884: WHERE prd.requisition_line_id = prl.requisition_line_id
885: AND prl.requisition_line_id = pli.requisition_line_id
886: AND pli.interface_header_id = phi.interface_header_id

Line 936: po_lines_interface pli --option

932: prl.destination_organization_id,
933: prl.destination_subinventory,
934: prl.destination_context
935: FROM po_requisition_lines_all prl,
936: po_lines_interface pli --option
937: WHERE pli.interface_header_id = po_autocreate_params.x_interface_header_id
938: AND (( pli.clm_option_indicator = 'O' AND NVL(pli.clm_exercised_flag,'N') = 'N') -- Bug 9960752
939: OR prl.fund_source_not_known = 'Y' )
940: --CLM Phase 2 Changes : PR Lines with no distributions should be handled like

Line 971: FROM po_lines_interface pi

967:
968: UPDATE po_distributions_interface pdi
969: SET group_line_id =
970: (SELECT interface_line_id
971: FROM po_lines_interface pi
972: WHERE pi.requisition_line_id = pdi.group_line_id
973: AND pi.interface_header_id = po_autocreate_params.x_interface_header_id
974: )
975: WHERE pdi.interface_header_id = po_autocreate_params.x_interface_header_id;

Line 1579: FROM po_lines_interface intf_lines,

1575: p_lines.clm_pop_duration_tbl,
1576: p_lines.clm_delivery_period_uom_tbl,
1577: p_lines.clm_promise_period_uom_tbl,
1578: p_lines.clm_pop_duration_uom_tbl
1579: FROM po_lines_interface intf_lines,
1580: po_headers_interface intf_headers,
1581: po_headers_draft_all draft_headers
1582: WHERE intf_lines.interface_header_id = intf_headers.interface_header_id
1583: AND intf_headers.draft_id = draft_headers.draft_id

Line 1651: x_secondary_quantity_def PO_LINES.SECONDARY_QUANTITY%TYPE;

1647: l_cc_amount NUMBER;
1648: --
1649: x_secondary_unit_def MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;
1650: x_secondary_uom MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;
1651: x_secondary_quantity_def PO_LINES.SECONDARY_QUANTITY%TYPE;
1652: x_preferred_grade_def MTL_GRADES.GRADE_CODE%TYPE;
1653: l_quantity_temp PO_LINES.QUANTITY%TYPE;
1654: --
1655: l_base_unit_price po_lines.base_unit_price%TYPE := NULL; --

Line 1653: l_quantity_temp PO_LINES.QUANTITY%TYPE;

1649: x_secondary_unit_def MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;
1650: x_secondary_uom MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;
1651: x_secondary_quantity_def PO_LINES.SECONDARY_QUANTITY%TYPE;
1652: x_preferred_grade_def MTL_GRADES.GRADE_CODE%TYPE;
1653: l_quantity_temp PO_LINES.QUANTITY%TYPE;
1654: --
1655: l_base_unit_price po_lines.base_unit_price%TYPE := NULL; --
1656: l_contractor_status PO_REQUISITION_LINES_ALL.contractor_status%TYPE;
1657: l_negotiated_by_preparer_flag po_lines_all.negotiated_by_preparer_flag%type; --

Line 1655: l_base_unit_price po_lines.base_unit_price%TYPE := NULL; --

1651: x_secondary_quantity_def PO_LINES.SECONDARY_QUANTITY%TYPE;
1652: x_preferred_grade_def MTL_GRADES.GRADE_CODE%TYPE;
1653: l_quantity_temp PO_LINES.QUANTITY%TYPE;
1654: --
1655: l_base_unit_price po_lines.base_unit_price%TYPE := NULL; --
1656: l_contractor_status PO_REQUISITION_LINES_ALL.contractor_status%TYPE;
1657: l_negotiated_by_preparer_flag po_lines_all.negotiated_by_preparer_flag%type; --
1658: l_type_lookup_code po_headers_all.type_lookup_code%type; --
1659: l_global_agreement_flag po_headers_all.global_agreement_flag%type; --

Line 1657: l_negotiated_by_preparer_flag po_lines_all.negotiated_by_preparer_flag%type; --

1653: l_quantity_temp PO_LINES.QUANTITY%TYPE;
1654: --
1655: l_base_unit_price po_lines.base_unit_price%TYPE := NULL; --
1656: l_contractor_status PO_REQUISITION_LINES_ALL.contractor_status%TYPE;
1657: l_negotiated_by_preparer_flag po_lines_all.negotiated_by_preparer_flag%type; --
1658: l_type_lookup_code po_headers_all.type_lookup_code%type; --
1659: l_global_agreement_flag po_headers_all.global_agreement_flag%type; --
1660: l_needby_prf VARCHAR2(1);
1661: l_shipto_prf VARCHAR2(1);

Line 1666: l_manual_price_change_flag po_lines_all.manual_price_change_flag%TYPE := NULL;

1662: x_quote_header_id NUMBER := NULL;
1663: x_quote_line_id NUMBER := NULL;
1664: l_routing_name VARCHAR2 (100);
1665: g_chktype_TRACKING_QTY_IND CONSTANT MTL_SYSTEM_ITEMS_B.TRACKING_QUANTITY_IND%TYPE := 'PS';
1666: l_manual_price_change_flag po_lines_all.manual_price_change_flag%TYPE := NULL;
1667: l_from_type_lookup_code PO_HEADERS.type_lookup_code%type;
1668: l_uom_convert VARCHAR2(2) := fnd_profile.value('PO_REQ_BPA_UOM_CONVERT');
1669: l_ga_uom PO_LINES.unit_meas_lookup_code%TYPE;
1670: l_quantity_in_ga_uom PO_LINES_INTERFACE.quantity%TYPE;

Line 1669: l_ga_uom PO_LINES.unit_meas_lookup_code%TYPE;

1665: g_chktype_TRACKING_QTY_IND CONSTANT MTL_SYSTEM_ITEMS_B.TRACKING_QUANTITY_IND%TYPE := 'PS';
1666: l_manual_price_change_flag po_lines_all.manual_price_change_flag%TYPE := NULL;
1667: l_from_type_lookup_code PO_HEADERS.type_lookup_code%type;
1668: l_uom_convert VARCHAR2(2) := fnd_profile.value('PO_REQ_BPA_UOM_CONVERT');
1669: l_ga_uom PO_LINES.unit_meas_lookup_code%TYPE;
1670: l_quantity_in_ga_uom PO_LINES_INTERFACE.quantity%TYPE;
1671: l_conversion_rate NUMBER :=1;
1672: l_outsourced_assembly po_line_locations_all.outsourced_assembly%type;
1673: l_retainage_rate PO_VENDOR_SITES_ALL.retainage_rate%type;

Line 1670: l_quantity_in_ga_uom PO_LINES_INTERFACE.quantity%TYPE;

1666: l_manual_price_change_flag po_lines_all.manual_price_change_flag%TYPE := NULL;
1667: l_from_type_lookup_code PO_HEADERS.type_lookup_code%type;
1668: l_uom_convert VARCHAR2(2) := fnd_profile.value('PO_REQ_BPA_UOM_CONVERT');
1669: l_ga_uom PO_LINES.unit_meas_lookup_code%TYPE;
1670: l_quantity_in_ga_uom PO_LINES_INTERFACE.quantity%TYPE;
1671: l_conversion_rate NUMBER :=1;
1672: l_outsourced_assembly po_line_locations_all.outsourced_assembly%type;
1673: l_retainage_rate PO_VENDOR_SITES_ALL.retainage_rate%type;
1674: --

Line 1697: x_unit_price po_lines.unit_price%TYPE := NULL;

1693: /* obtain currency info to adjust precision */
1694: x_precision NUMBER := '';
1695: x_ext_precision NUMBER := '';
1696: x_min_unit NUMBER := '';
1697: x_unit_price po_lines.unit_price%TYPE := NULL;
1698: x_purchase_basis VARCHAR2 (100);
1699: x_po_line_id NUMBER;
1700: x_po_line_type_id NUMBER;
1701: x_line_num po_lines.line_num%type;

Line 1701: x_line_num po_lines.line_num%type;

1697: x_unit_price po_lines.unit_price%TYPE := NULL;
1698: x_purchase_basis VARCHAR2 (100);
1699: x_po_line_id NUMBER;
1700: x_po_line_type_id NUMBER;
1701: x_line_num po_lines.line_num%type;
1702: x_po_item_id NUMBER;
1703: x_order_type_lookup_code VARCHAR2(25);
1704: l_purchase_basis PO_LINE_TYPES_B.purchase_basis%TYPE;
1705: x_po_item_revision po_lines.item_revision%type;

Line 1705: x_po_item_revision po_lines.item_revision%type;

1701: x_line_num po_lines.line_num%type;
1702: x_po_item_id NUMBER;
1703: x_order_type_lookup_code VARCHAR2(25);
1704: l_purchase_basis PO_LINE_TYPES_B.purchase_basis%TYPE;
1705: x_po_item_revision po_lines.item_revision%type;
1706: x_po_unit_meas_lookup_code po_lines.unit_meas_lookup_code%type;
1707: x_po_unit_price NUMBER;
1708: x_po_transaction_reason_code po_lines.transaction_reason_code%type;
1709: x_price_break_lookup_code po_lines.price_break_lookup_code%type;

Line 1706: x_po_unit_meas_lookup_code po_lines.unit_meas_lookup_code%type;

1702: x_po_item_id NUMBER;
1703: x_order_type_lookup_code VARCHAR2(25);
1704: l_purchase_basis PO_LINE_TYPES_B.purchase_basis%TYPE;
1705: x_po_item_revision po_lines.item_revision%type;
1706: x_po_unit_meas_lookup_code po_lines.unit_meas_lookup_code%type;
1707: x_po_unit_price NUMBER;
1708: x_po_transaction_reason_code po_lines.transaction_reason_code%type;
1709: x_price_break_lookup_code po_lines.price_break_lookup_code%type;
1710: x_quantity NUMBER := '';

Line 1708: x_po_transaction_reason_code po_lines.transaction_reason_code%type;

1704: l_purchase_basis PO_LINE_TYPES_B.purchase_basis%TYPE;
1705: x_po_item_revision po_lines.item_revision%type;
1706: x_po_unit_meas_lookup_code po_lines.unit_meas_lookup_code%type;
1707: x_po_unit_price NUMBER;
1708: x_po_transaction_reason_code po_lines.transaction_reason_code%type;
1709: x_price_break_lookup_code po_lines.price_break_lookup_code%type;
1710: x_quantity NUMBER := '';
1711: --
1712: x_column1 VARCHAR2(10);

Line 1709: x_price_break_lookup_code po_lines.price_break_lookup_code%type;

1705: x_po_item_revision po_lines.item_revision%type;
1706: x_po_unit_meas_lookup_code po_lines.unit_meas_lookup_code%type;
1707: x_po_unit_price NUMBER;
1708: x_po_transaction_reason_code po_lines.transaction_reason_code%type;
1709: x_price_break_lookup_code po_lines.price_break_lookup_code%type;
1710: x_quantity NUMBER := '';
1711: --
1712: x_column1 VARCHAR2(10);
1713: x_result VARCHAR2(7);

Line 1754: FROM po_lines_interface

1750: CURSOR c_price_break(p_line_num NUMBER,p_intf_line_id NUMBER)
1751: IS
1752: SELECT interface_line_id,
1753: need_by_date
1754: FROM po_lines_interface
1755: WHERE interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
1756: AND line_num = p_line_num
1757: AND shipment_num IS NOT NULL
1758: AND interface_line_id <> p_intf_line_id

Line 1965: FROM PO_LINES_draft_all

1961: x_po_unit_price,
1962: x_po_transaction_reason_code,
1963: x_price_break_lookup_code,
1964: l_manual_price_change_flag
1965: FROM PO_LINES_draft_all
1966: WHERE PO_HEADER_ID = po_autocreate_params.g_po_header_id
1967: AND LINE_NUM = p_lines.line_num_tbl(i)
1968: AND draft_id =po_autocreate_params.g_draft_id;
1969:

Line 2032: FROM po_lines_all pol,

2028: SELECT pol.unit_meas_lookup_code,
2029: poh.type_lookup_code
2030: INTO l_ga_uom,
2031: l_from_type_lookup_code
2032: FROM po_lines_all pol,
2033: po_headers_all poh
2034: WHERE pol.po_line_id = p_lines.from_line_id_tbl(i)
2035: AND poh.po_header_id =p_lines.from_header_id_tbl(i)
2036: AND poh.po_header_id =pol.po_header_id;

Line 2501: SELECT po_lines_s.nextval INTO x_po_line_id FROM sys.dual;

2497: OR PO_AUTOCREATE_PARAMS.g_document_subtype='PLANNED'
2498: OR PO_AUTOCREATE_PARAMS.g_document_subtype='BLANKET' ) THEN
2499: l_progress :='290';
2500:
2501: SELECT po_lines_s.nextval INTO x_po_line_id FROM sys.dual;
2502:
2503: l_progress:='300';
2504: -- Call the Pricing API only when...
2505: --

Line 2690: FROM po_lines_all

2686: IF l_type_lookup_code='BLANKET' AND l_global_agreement_flag='Y' THEN
2687: l_progress := '391';
2688: SELECT negotiated_by_preparer_flag
2689: INTO l_negotiated_by_preparer_flag
2690: FROM po_lines_all
2691: WHERE po_line_id=p_lines.from_line_id_tbl(i);
2692: --if the source document is quotation.
2693: ELSIF l_type_lookup_code ='QUOTATION' THEN
2694: l_progress := '392';

Line 2879: INTO po_lines_draft_all

2875: ||' Unit Price : ' || p_lines.unit_price_tbl(i));
2876: END IF;
2877: l_progress := '520';
2878: INSERT
2879: INTO po_lines_draft_all
2880: (
2881: draft_id,
2882: po_line_id,
2883: last_update_date,

Line 3155: from po_lines_draft_all pl --

3151: l_progress := '540';
3152: BEGIN
3153: select pl.quantity
3154: into l_db_quantity
3155: from po_lines_draft_all pl --
3156: where pl.po_line_id = x_po_line_id
3157: AND pl.draft_id=po_autocreate_params.g_draft_id;
3158:
3159: IF g_debug_stmt

Line 3292: UPDATE po_lines_draft_all

3288: IF (x_unit_price = 0) THEN
3289: x_unit_price := NULL;
3290: END IF;
3291:
3292: UPDATE po_lines_draft_all
3293: SET unit_price= nvl(x_unit_price, unit_price)
3294: ,base_unit_price = nvl(l_base_unit_price, base_unit_price)
3295: ,from_line_location_id = l_price_break_id
3296:

Line 3318: /** If FSP org and item combination is dual uom control, update the po lines secondary quantity

3314: -- because x_po_line_id is the blanket line_id for 'Release'
3315: -- Introducing the 'If' statement for checking that its not a release
3316: IF (PO_AUTOCREATE_PARAMS.g_document_subtype <> 'RELEASE') THEN
3317:
3318: /** If FSP org and item combination is dual uom control, update the po lines secondary quantity
3319: with the default conversion based on the PO lines quantity **/
3320:
3321: -- update secondary quantity/uom to null
3322:

Line 3319: with the default conversion based on the PO lines quantity **/

3315: -- Introducing the 'If' statement for checking that its not a release
3316: IF (PO_AUTOCREATE_PARAMS.g_document_subtype <> 'RELEASE') THEN
3317:
3318: /** If FSP org and item combination is dual uom control, update the po lines secondary quantity
3319: with the default conversion based on the PO lines quantity **/
3320:
3321: -- update secondary quantity/uom to null
3322:
3323: IF g_debug_stmt

Line 3335: UPDATE po_lines_draft_all plda

3331: /* CLM Autocreate grouping start
3332: The quantity/amount should be the aggregate of all the matched lines quantity/amount
3333: */
3334:
3335: UPDATE po_lines_draft_all plda
3336: SET plda.quantity = Decode(plda.matching_basis,
3337: 'QUANTITY', (nvl(plda.quantity,0) + nvl(x_quantity,0)),
3338: plda.quantity)
3339: ,plda.amount = Decode(plda.matching_basis,

Line 3366: UPDATE po_lines_draft_all

3362: p_lines.item_id_tbl(i),
3363: x_secondary_unit_def,
3364: x_secondary_quantity_def) ;
3365:
3366: UPDATE po_lines_draft_all
3367: SET secondary_quantity = x_secondary_quantity_def,
3368: secondary_unit_of_measure = x_secondary_unit_def
3369: WHERE po_line_id = x_po_line_id
3370: AND draft_id=po_autocreate_params.g_draft_id;

Line 3383: UPDATE po_Lines_draft_all

3379: END IF;
3380:
3381: -- Added for Linking Requisition to modification project
3382: IF (po_autocreate_params.g_is_clm_po ='Y' AND po_autocreate_params.g_process_code = 'ADD_FUNDS') THEN
3383: UPDATE po_Lines_draft_all
3384: SET clm_exercised_flag = 'Y',
3385: clm_exercised_date = SYSDATE,
3386: change_status = 'UPDATE'
3387: WHERE po_line_id = x_po_line_id

Line 3401: UPDATE po_lines_interface

3397:
3398: /*CLM Phase-2 Autocreate grouping*/
3399: --Stamping back the po_line_id back to the interface table
3400: FORALL i IN 1 .. p_lines.intf_line_id_tbl.Count
3401: UPDATE po_lines_interface
3402: SET po_line_id = p_lines.po_line_id_tbl(i)
3403: WHERE
3404: interface_line_id = p_lines.intf_line_id_tbl(i);
3405:

Line 4927: FROM po_lines_interface pli,pon_award_allocations paa

4923: TFU*(di/d1+d2)*/
4924:
4925: BEGIN
4926: SELECT PLI.auction_header_id INTO l_auction_header_id
4927: FROM po_lines_interface pli,pon_award_allocations paa
4928: WHERE PLI.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
4929: AND pli.auction_header_id = paa.auction_header_id
4930: AND paa.is_linked_pr_line_yn = 'Y'
4931: AND ROWNUM <2;

Line 5042: FROM po_lines_interface pli,

5038: Decode(plb.matching_basis, 'QUANTITY',(paa.allocated_funds * (prd.funds_remaining/ req_dist_amt.tot_funds_remaining))/ pli.unit_price,
5039: null),--quantity_funded,
5040: Decode(plb.matching_basis, 'AMOUNT',(paa.allocated_funds * (prd.funds_remaining/ req_dist_amt.tot_funds_remaining)),
5041: NULL ) --amount_funded
5042: FROM po_lines_interface pli,
5043: po_headers_interface phi,
5044: pon_award_allocations paa,
5045: po_clmreq_dist_details_v prd,
5046: (SELECT requisition_line_id, Sum(prd.funds_remaining) AS tot_funds_remaining