DBA Data[Home] [Help]

APPS.PO_INTERFACE_S dependencies on STANDARD

Line 491: -- document_type: 'STANDARD', 'BLANKET', 'PLANNED', 'RELEASES'

487:
488: -- This procedure calculate the global attribute value based on the document
489: -- type, level, and id. This is just a hook to the actual function.
490: -- Parameter:
491: -- document_type: 'STANDARD', 'BLANKET', 'PLANNED', 'RELEASES'
492: -- level_type: 'HEADER', 'LINE', 'SHIPMENT', 'DISTRIBUTION', 'DOCUMENT'
493: -- level_id: ID of the relevant level: po_header_id, po_line_id,...
494:
495: procedure calculate_local(document_type varchar2,

Line 797: -- API standard IN parameter

793: -- RFQs, Consumption Advice among others
794: --Parameters:
795: --IN:
796: --p_api_version
797: -- API standard IN parameter
798: --p_batch_id
799: -- The id that will be used to identify the rows in the interface table. The unique identifier
800: -- for the all the documents to be created. It will be the same as interface_header_id
801: -- as we always create 1 doc at a time.

Line 821: -- The standard OUT parameter giving return status of the API call.

817: -- Used as IN for document id to ADD to N/A for sourcing.
818: -- Used as OUT for returning the id of the document created.
819: --OUT:
820: --x_return_status
821: -- The standard OUT parameter giving return status of the API call.
822: --x_msg_count
823: -- The count of number of messages added to the message list in this call
824: --x_msg_data
825: -- If the count is 1 then x_msg_data contains the message returned

Line 878: -- Standard Start of API savepoint

874: l_is_clm_flow VARCHAR2(1):= 'N';
875:
876: BEGIN
877: --
878: -- Standard Start of API savepoint
879: SAVEPOINT create_documents_pvt;
880:
881: -- Standard call to check for call compatibility.
882: IF NOT FND_API.compatible_api_call (

Line 881: -- Standard call to check for call compatibility.

877: --
878: -- Standard Start of API savepoint
879: SAVEPOINT create_documents_pvt;
880:
881: -- Standard call to check for call compatibility.
882: IF NOT FND_API.compatible_api_call (
883: p_current_version_number => l_api_version,
884: p_caller_version_number => p_api_version,
885: p_api_name => l_api_name,

Line 1065: g_document_subtype in ('STANDARD', 'PLANNED', 'RELEASE')) THEN

1061: -- Populate global variable to indicate whether
1062: -- tax is calculated for this document type
1063:
1064: IF (g_document_type = 'PO' and
1065: g_document_subtype in ('STANDARD', 'PLANNED', 'RELEASE')) THEN
1066: g_calculate_tax_flag := 'Y';
1067: END IF;
1068:
1069:

Line 1274: IF g_document_subtype = 'STANDARD' THEN

1270: if x_number_lines>0 and x_document_id is not null then
1271: x_return_status := FND_API.G_RET_STS_SUCCESS ;
1272: --
1273: -- Need to populate document number for autocreate success message
1274: IF g_document_subtype = 'STANDARD' THEN
1275: select segment1
1276: into x_document_number
1277: from po_headers_all
1278: where po_header_id = x_document_id;

Line 1303: IF g_document_subtype = 'STANDARD' THEN

1299:
1300: IF (g_interface_source_code = 'CONSUMPTION_ADVICE') and
1301: (x_errorcode = 1 ) THEN
1302:
1303: IF g_document_subtype = 'STANDARD' THEN
1304:
1305: l_progress:= '160';
1306: update po_headers_all
1307: set authorization_status = 'APPROVED',

Line 1722: -- Default the pay_on_code for a Standard PO based

1718: interface.vendor_contact);
1719: end if;
1720:
1721: -- Bug 2816396 START
1722: -- Default the pay_on_code for a Standard PO based
1723: -- on the vendor site value.
1724: if (vendor.pay_on_code = 'RECEIPT_AND_USE') then
1725: vendor.pay_on_code := 'RECEIPT';
1726: elsif (vendor.pay_on_code = 'USE') then

Line 1742: AND interface.document_subtype = 'STANDARD')

1738: -- g_rate_for_req_fields
1739: --
1740: IF (g_interface_source_code <> 'SOURCING'
1741: AND g_purchasing_ou_id <> g_hdr_requesting_ou_id
1742: AND interface.document_subtype = 'STANDARD')
1743: THEN
1744: get_rate_for_req_price(
1745: p_requesting_ou_id => g_hdr_requesting_ou_id, --
1746: p_purchasing_ou_id => g_purchasing_ou_id, --

Line 1826: the revised_date.But it was inside the loop for standard and planned

1822:
1823:
1824: /*Bug no 718918:sarunach
1825: The x_new_revised_date was added for bug no 491306 to update
1826: the revised_date.But it was inside the loop for standard and planned
1827: po's only.So the revised_date was Releases was incorrect.
1828: Removed those line and put it here to update the revised date for
1829: Standard,planned and Releases.
1830: */

Line 1829: Standard,planned and Releases.

1825: The x_new_revised_date was added for bug no 491306 to update
1826: the revised_date.But it was inside the loop for standard and planned
1827: po's only.So the revised_date was Releases was incorrect.
1828: Removed those line and put it here to update the revised date for
1829: Standard,planned and Releases.
1830: */
1831: -- Bug 902976, zxzhang, 10/04/99
1832: -- Change REVISED_DATE from VarChar(25) to Date.
1833: /*

Line 1854: IF(interface.document_subtype = 'STANDARD' or

1850: interface.vendor_site_id,
1851: vendor.invoice_match_option);
1852: end if;
1853:
1854: IF(interface.document_subtype = 'STANDARD' or
1855: interface.document_subtype = 'PLANNED') THEN
1856:
1857: l_progress:='100';
1858:

Line 2029: IF(interface.document_subtype = 'STANDARD' or

2025: /** BUG 873209
2026: * The date mask on interface.h_rate_date causes this insertion
2027: * failed on tst115 database.
2028: */
2029: IF(interface.document_subtype = 'STANDARD' or
2030: interface.document_subtype = 'PLANNED' or
2031: --
2032: --Allow to create blanket also
2033: interface.document_subtype = 'BLANKET'

Line 2283: PO_DOC_STYLE_GRP.get_standard_doc_style ,interface.style_id) --

2279: g_purchasing_ou_id --
2280: ,p_conterms_exist_flag --
2281: ,l_document_creation_method --
2282: ,decode(g_interface_source_code,'CONSUMPTION_ADVICE',
2283: PO_DOC_STYLE_GRP.get_standard_doc_style ,interface.style_id) --
2284: ,nvl2(g_calculate_tax_flag, 'CREATE', null) --
2285: , interface.created_language --
2286: , interface.cpa_reference --
2287: , interface.document_num

Line 2458: if (g_document_subtype IN ('STANDARD','PLANNED','BLANKET')) then

2454: l_progress:= '260';
2455: -- the call to procedure calculate_local should happen only for doc_type PO
2456: --
2457: -- Call for all document types. Added BLANKET.
2458: if (g_document_subtype IN ('STANDARD','PLANNED','BLANKET')) then
2459: calculate_local(g_document_subtype, 'HEADER', interface.po_header_id);
2460: end if;
2461:
2462: IF g_debug_stmt THEN

Line 2566: END IF; /* of Standard/Planned */

2562: -- Bug 882050: Release header level global attribute
2563:
2564: calculate_local('RELEASE', 'HEADER', g_po_release_id);
2565:
2566: END IF; /* of Standard/Planned */
2567: END IF; /* of NEW/ADD */ --Bug#5024876: Uncommenting the END IF commented by Bug#4886821
2568:
2569: l_progress:='300';
2570: --

Line 2757: IF (g_document_subtype = 'STANDARD') and

2753:
2754: l_progress := '360';
2755: /* FPI GA start Update the terms after the successful completion of PO */
2756:
2757: IF (g_document_subtype = 'STANDARD') and
2758: (g_interface_source_code <> 'CONSUMPTION_ADVICE') then -- CONSIGNED FPI
2759: po_interface_s2.update_terms(x_document_id);
2760: END IF;
2761:

Line 2827: if (interface.document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN

2823:
2824: -- Bug 882050: Document level global attribute
2825: --
2826: -- Make the call for all document types. Added BLANKET.
2827: if (interface.document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN
2828: calculate_local(interface.document_subtype, 'DOCUMENT',
2829: interface.po_header_id);
2830: elsif (g_document_subtype='RELEASE') THEN
2831: calculate_local('RELEASE', 'DOCUMENT', g_po_release_id);

Line 2850: IF (g_document_subtype in ('STANDARD', 'PLANNED')) THEN

2846: -- Removed multiple tax calls from procedure
2847: -- create_shipment and placed a single call here for calculating
2848: -- tax for the whole document
2849: --
2850: IF (g_document_subtype in ('STANDARD', 'PLANNED')) THEN
2851: l_progress := '413';
2852: l_return_status := NULL;
2853: -- Bug 5067321. For Add To, x_document_id is null, use
2854: -- interface.po_header_id instead

Line 3203: AND interface.document_subtype = 'STANDARD')

3199: -- If called from Sourcing, simply use the rate specified in the interface
3200: -- table.
3201: IF (g_interface_source_code <> 'SOURCING'
3202: AND g_purchasing_ou_id <> l_requesting_ou_id
3203: AND interface.document_subtype = 'STANDARD')
3204: THEN
3205: get_rate_for_req_price(
3206: p_requesting_ou_id => l_requesting_ou_id, -- IN
3207: p_purchasing_ou_id => g_purchasing_ou_id, -- IN

Line 3262: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED' or

3258: ** Note that we do not need to check if the line exists in the
3259: ** interface table since we are in the process of inserting
3260: ** lines into the po lines table on a record by record basis.
3261: */
3262: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED' or
3263: g_document_type = 'RFQ'
3264: --
3265: --do the select for blanket also
3266: or g_document_subtype = 'BLANKET') THEN

Line 3369: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED') AND NOT GML_PO_FOR_PROCESS.check_po_for_proc

3365: --mchandak 02/11/2002
3366: --Bug# 2219743
3367: --Added logic to default secondary qnty,UOM and grade in po_lines
3368: --if common purchasing is installed for OPM dual item
3369: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED') AND NOT GML_PO_FOR_PROCESS.check_po_for_proc
3370: THEN
3371: x_retvar := FND_INSTALLATION.get_app_info(x_product,x_opm_installed,x_dummy,x_dummy);
3372: BEGIN
3373: l_progress := '060';

Line 3461: AND (g_document_subtype = 'STANDARD') THEN

3457: -- GA line have different UOM's, convert to the GA's UOM if the
3458: -- UOM Convert profile is Yes. If UOM Convert is No, do not create
3459: -- this line.
3460: IF (interface.from_line_id IS NOT NULL)
3461: AND (g_document_subtype = 'STANDARD') THEN
3462:
3463: l_progress := '110';
3464: BEGIN
3465: --bug#3612701 modified the sql to fetch type lookup code

Line 4043: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED' or

4039: --
4040:
4041: l_progress := '290';
4042:
4043: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED' or
4044: --
4045: --insert Blankets also
4046: g_document_subtype='BLANKET' or
4047: g_document_type = 'RFQ') THEN

Line 4065: -- 1) Autocreating a Standard PO or a BlANKET and pricing is enhanced for the style selected

4061: --
4062: --
4063: -- Call the Pricing API only when...
4064: --
4065: -- 1) Autocreating a Standard PO or a BlANKET and pricing is enhanced for the style selected
4066: -- 2) Source Document exists or the pricing is enhanced for the style selected
4067: -- 3) Not a Consumption Advice
4068: -- 4) Requisition Line's Contractor Status is not 'ASSIGNED'
4069: -- ( if the contractor status is 'ASSIGNED',

Line 4075: IF ( ( g_document_subtype = 'STANDARD' OR

4071: --
4072: -- 5) Not a complex work PO
4073: l_contractor_status := PO_SERVICES_PVT.get_contractor_status(interface.requisition_line_id); --
4074: --Bug:8598002 Enhanced Pricing: Enable pricing call for BLANKET document subtype if pricing enhanced for the style selected
4075: IF ( ( g_document_subtype = 'STANDARD' OR
4076: (g_document_subtype = 'BLANKET' AND l_enhanced_pricing_flag = 'Y'))
4077: AND ( interface.from_line_id IS NOT NULL OR
4078: --
4079: interface.contract_id IS NOT NULL OR

Line 4157: -- If we are Autocreating a Standard PO,

4153:
4154: /* GA FPI end */
4155: l_progress := '360';
4156:
4157: -- If we are Autocreating a Standard PO,
4158: -- then setup the Interface tables to copy over Price Differentials.
4159: --
4160: -- This functionality is not supported from Sourcing. One cannot
4161: -- create a Standard PO from Sourcing with Temp Labor lines (with price

Line 4161: -- create a Standard PO from Sourcing with Temp Labor lines (with price

4157: -- If we are Autocreating a Standard PO,
4158: -- then setup the Interface tables to copy over Price Differentials.
4159: --
4160: -- This functionality is not supported from Sourcing. One cannot
4161: -- create a Standard PO from Sourcing with Temp Labor lines (with price
4162: -- differentials).
4163: IF ( g_document_subtype = 'STANDARD' AND
4164: --
4165: g_interface_source_code not in ('SOURCING', 'CONSUMPTION_ADVICE')

Line 4163: IF ( g_document_subtype = 'STANDARD' AND

4159: --
4160: -- This functionality is not supported from Sourcing. One cannot
4161: -- create a Standard PO from Sourcing with Temp Labor lines (with price
4162: -- differentials).
4163: IF ( g_document_subtype = 'STANDARD' AND
4164: --
4165: g_interface_source_code not in ('SOURCING', 'CONSUMPTION_ADVICE')
4166: AND (NOT p_is_complex_work_po)) --
4167: THEN

Line 4287: IF (g_document_subtype='STANDARD' OR g_document_subtype='PLANNED' OR g_document_type = 'PA')

4283: END IF;
4284:
4285: --
4286: -- IF secondary quantity is null and item is dual uom control , default the secondary qty.
4287: IF (g_document_subtype='STANDARD' OR g_document_subtype='PLANNED' OR g_document_type = 'PA')
4288: THEN
4289: IF interface.item_id is not null THEN
4290: IF item.secondary_uom_code IS NOT NULL THEN
4291: IF (interface.secondary_quantity IS NULL) THEN

Line 4632: /* Bug 2962568 globalization procedure shouldn't be called for Standard RFQ's

4628: --
4629:
4630: l_progress := '440';
4631:
4632: /* Bug 2962568 globalization procedure shouldn't be called for Standard RFQ's
4633: as it is not significant for the same.
4634: */
4635: if g_document_type = 'RFQ' then
4636: null;

Line 4637: elsif (interface.document_subtype = 'STANDARD' or

4633: as it is not significant for the same.
4634: */
4635: if g_document_type = 'RFQ' then
4636: null;
4637: elsif (interface.document_subtype = 'STANDARD' or
4638: interface.document_subtype = 'PLANNED' or
4639: --
4640: interface.document_subtype = 'BLANKET'
4641: ) THEN

Line 4920: /* GA FPI start : For a standard PO if the source document exists or if the

4916: -- update secondary quantity to somevalue only if old or new secondary_quantity is not null else update it
4917: -- to null(for discrete items) - 1548597
4918:
4919: --Bug:8598002
4920: /* GA FPI start : For a standard PO if the source document exists or if the
4921: enhanced pricing style is used then we call the pricing API to get the
4922: correct price for the parameters on the requisition */
4923: IF (g_document_subtype='STANDARD')
4924: AND nvl(l_manual_price_change_flag, 'N') <> 'Y' --bug 3495772

Line 4923: IF (g_document_subtype='STANDARD')

4919: --Bug:8598002
4920: /* GA FPI start : For a standard PO if the source document exists or if the
4921: enhanced pricing style is used then we call the pricing API to get the
4922: correct price for the parameters on the requisition */
4923: IF (g_document_subtype='STANDARD')
4924: AND nvl(l_manual_price_change_flag, 'N') <> 'Y' --bug 3495772
4925: AND (interface.from_line_id IS NOT NULL OR
4926: --
4927: interface.contract_id IS NOT NULL OR

Line 5053: --new price as on the line for Standard POs.

5049: WHERE po_line_id = x_po_line_id;
5050:
5051: --
5052: --All the shipments which have been created need to get the
5053: --new price as on the line for Standard POs.
5054: UPDATE po_line_locations_all
5055: -- Bug 3417479
5056: -- SET price_override = x_unit_price
5057: SET price_override = nvl(x_unit_price, price_override)

Line 5231: -- Initialize Standard WHO Columns.

5227: -- If Job Long Description exists, convert it to an attachment.
5228: --
5229: IF ( l_job_long_description IS NOT NULL ) THEN
5230:
5231: -- Initialize Standard WHO Columns.
5232: --
5233: l_who_rec.created_by := interface.created_by;
5234: l_who_rec.creation_date := interface.creation_date;
5235: l_who_rec.last_update_login := interface.last_update_login;

Line 5404: if interface.document_subtype = 'STANDARD' then

5400: END IF;
5401:
5402: --copy attachments/notes from negotiation/bid to po/blanket line
5403: if g_interface_source_code = 'SOURCING' then
5404: if interface.document_subtype = 'STANDARD' then
5405: if interface.requisition_line_id is not null then
5406: x_column1:='NEGREQ';
5407: l_progress:='710';
5408: SELECT requisition_header_id

Line 5418: if interface.document_subtype in ('BLANKET','STANDARD') then

5414: end if;
5415: elsif interface.document_subtype = 'BLANKET' then
5416: x_column1:='NEG';
5417: end if;
5418: if interface.document_subtype in ('BLANKET','STANDARD') then
5419: l_progress:='720';
5420:
5421: po_negotiations_sv2.handle_sourcing_attachments(
5422: interface.auction_header_id,

Line 5448: IF (g_document_subtype IN ('STANDARD', 'PLANNED')) AND

5444:
5445: -- Bug 2875346 start.
5446: -- If autocreating a SPO or PPO, and the requisition line has a one-time
5447: -- location, move the attachment from the PO line to the PO shipment
5448: IF (g_document_subtype IN ('STANDARD', 'PLANNED')) AND
5449: (has_one_time_location(interface.requisition_line_id))
5450: THEN
5451: -- Bug 2894378. Use BEGIN-EXCEPTION-END for exception handling to
5452: -- support original FPH behavior.

Line 5820: IF (interface.from_line_id IS NOT NULL) AND (g_document_subtype = 'STANDARD') THEN

5816: p_token => l_progress,
5817: p_message => 'from line id :'||interface.from_line_id||'from header id:'||interface.from_header_id);
5818: END IF;
5819:
5820: IF (interface.from_line_id IS NOT NULL) AND (g_document_subtype = 'STANDARD') THEN
5821:
5822: l_progress := '015';
5823:
5824: BEGIN

Line 5864: OR ((g_document_subtype='STANDARD')

5860: -- bug 5208159 : end
5861:
5862: IF (g_document_subtype='RELEASE')
5863: -- Bug 2735840 Convert UOM when autocreating a PO that references a GA
5864: OR ((g_document_subtype='STANDARD')
5865: AND (interface.from_line_id is not null)) THEN
5866:
5867: /* Enh : 1660036
5868: get the uom from the PO . This will be used for uom conversion */

Line 5951: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED' or

5947: */
5948:
5949: x_ship_to_location_id := get_ship_to_loc(interface.deliver_to_location_id); -- FPI
5950:
5951: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED' or
5952: g_document_type = 'RFQ')THEN
5953: l_progress := '060';
5954: BEGIN
5955: SELECT poll.line_location_id,poll.secondary_unit_of_measure --

Line 5963: AND poll.shipment_type in ('STANDARD','PLANNED', 'RFQ');

5959: WHERE poll.po_header_id = interface.po_header_id
5960: AND poll.po_line_id = pol.po_line_id
5961: AND poll.shipment_num = interface.shipment_num
5962: AND pol.line_num = interface.line_num
5963: AND poll.shipment_type in ('STANDARD','PLANNED', 'RFQ');
5964: EXCEPTION
5965: WHEN NO_DATA_FOUND THEN
5966: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
5967: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,

Line 6904: elsif (interface.document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN

6900: if g_document_type = 'RFQ' then
6901: null;
6902: --
6903: -- Make the call for all document types. Added BLANKET
6904: elsif (interface.document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN
6905: calculate_local(interface.document_subtype, 'SHIPMENT',
6906: x_line_location_id);
6907: elsif (g_document_subtype='RELEASE') THEN
6908: calculate_local('RELEASE', 'SHIPMENT', x_line_location_id);

Line 7274: IF (interface.from_line_id IS NOT NULL) AND (g_document_subtype = 'STANDARD') THEN

7270:
7271: -- bug 5208159 : Conversion of req UOM to Quotation UOM should always happen if the
7272: -- source document is a quote and profile 'PO: Convert Requisition UOM to Source Document UOM'
7273: -- should be ignored in that case
7274: IF (interface.from_line_id IS NOT NULL) AND (g_document_subtype = 'STANDARD') THEN
7275: l_progress := '085';
7276:
7277: BEGIN
7278:

Line 7301: OR ((g_document_subtype='STANDARD')

7297: -- bug 5208159 end
7298:
7299: IF (g_document_subtype='RELEASE')
7300: -- Bug 2735840 Convert UOM when autocreating a PO that references a GA
7301: OR ((g_document_subtype='STANDARD')
7302: AND (interface.from_line_id is not null)) THEN
7303:
7304: /* get the uom from the PO . This will be used for uom conversion */
7305: BEGIN

Line 7743: if (interface.document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN

7739: exit when c_dist%NOTFOUND;
7740:
7741: --
7742: -- Make the call for all document types. Added BLANKET
7743: if (interface.document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN
7744: l_progress := '220';
7745: calculate_local(interface.document_subtype, 'DISTRIBUTION',
7746: x_po_distribution_id);
7747: elsif (g_document_subtype='RELEASE') THEN

Line 8639: g_document_subtype <> 'STANDARD' ) THEN

8635: END IF;
8636:
8637: -- Ignore for RFQ's and Blankets
8638: IF ( g_document_type <> 'PO' OR
8639: g_document_subtype <> 'STANDARD' ) THEN
8640:
8641: l_progress := '010';
8642: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
8643: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,

Line 9441: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED'

9437:
9438: /* Adding Req Line to New PO/RFQ */
9439: ELSIF(g_mode='NEW') THEN
9440:
9441: IF(g_document_subtype='STANDARD' or g_document_subtype='PLANNED'
9442: or g_document_type = 'RFQ'
9443: --
9444: or (g_document_subtype='BLANKET' and g_interface_source_code='SOURCING')) THEN
9445: l_progress:='060';

Line 9566: END IF;/* of standard/planned/release */

9562: p_token => l_progress,
9563: p_message => 'Setup: Header id of Blanket: '||x_po_header_id);
9564: END IF;
9565:
9566: END IF;/* of standard/planned/release */
9567:
9568: l_progress:='090';
9569:
9570: SELECT min(interface_line_id)

Line 10690: IF ((x_document_subtype IN ('STANDARD', 'PLANNED')) OR

10686:
10687: l_progress := '030';
10688:
10689:
10690: IF ((x_document_subtype IN ('STANDARD', 'PLANNED')) OR
10691: (g_document_type = 'RFQ'))
10692: THEN
10693:
10694: -- Bug 3825483

Line 10695: -- For Standard and Planned POs and RFQs, the line number

10691: (g_document_type = 'RFQ'))
10692: THEN
10693:
10694: -- Bug 3825483
10695: -- For Standard and Planned POs and RFQs, the line number
10696: -- will be the same as the req line number if the profile
10697: -- is set to 'Y' otherwise use sequential numbers
10698:
10699: IF (FND_PROFILE.VALUE('PO_USE_REQ_NUM_IN_AUTOCREATE') = 'Y') THEN

Line 10943: IF ((x_document_subtype IN ('STANDARD', 'PLANNED'))

10939:
10940: -- mode = 'ADD'
10941: -- add to a po/release with the same order as on the req.
10942:
10943: IF ((x_document_subtype IN ('STANDARD', 'PLANNED'))
10944: OR (g_document_type = 'RFQ'))
10945: THEN
10946:
10947: -- The inteface table will hold the requisition line id that we

Line 11211: IF ((x_document_subtype IN ('STANDARD', 'PLANNED', 'BLANKET')) OR

11207: ELSE
11208:
11209: -- group code is DEFAULT
11210:
11211: IF ((x_document_subtype IN ('STANDARD', 'PLANNED', 'BLANKET')) OR
11212: (g_document_type = 'RFQ'))
11213: THEN
11214:
11215: l_progress := '230';

Line 12290: END IF; -- If STANDARD/PLANNED/RELEASE

12286:
12287: END LOOP;
12288: CLOSE interface_lines;
12289:
12290: END IF; -- If STANDARD/PLANNED/RELEASE
12291:
12292: END IF; -- of same as REQUISITION mode
12293:
12294: END IF; -- of PO mode

Line 12553: IF ((g_document_subtype='STANDARD' OR g_document_subtype='PLANNED')

12549: x_ship_to_location_id := get_ship_to_loc(x_deliver_to_location_id); -- FPI
12550:
12551: x_po_shipment_num := -1;
12552:
12553: IF ((g_document_subtype='STANDARD' OR g_document_subtype='PLANNED')
12554: AND g_document_type = 'PO') THEN
12555:
12556: l_progress:='030';
12557:

Line 12725: AND PLL.SHIPMENT_TYPE in ('STANDARD', 'SCHEDULED',

12721: PO_SYSTEM_PARAMETERS_ALL PSP --
12722: WHERE PLL.LINE_LOCATION_ID = x_line_location_to_check
12723: AND PRL.REQUISITION_LINE_ID = x_requisition_line_id
12724: AND rtrim(nvl(PLL.note_to_receiver,'99')) = rtrim(nvl(x_note_to_receiver,'99'))
12725: AND PLL.SHIPMENT_TYPE in ('STANDARD', 'SCHEDULED',
12726: 'BLANKET')
12727: AND NVL(PLL.ENCUMBERED_FLAG,'N') = 'N'
12728: AND NVL(PLL.CANCEL_FLAG,'N') = 'N'
12729: AND NVL(psp.org_id, -99) = NVL(g_purchasing_ou_id, -99)

Line 12934: AND PLL.SHIPMENT_TYPE in ('STANDARD', 'SCHEDULED',

12930: AND rtrim(nvl(PLL.note_to_receiver,'99')) = rtrim(nvl(x_note_to_receiver,'99'))
12931: AND PLL.SHIP_TO_LOCATION_ID = x_ship_to_location_id
12932: AND PLL.SHIP_TO_ORGANIZATION_ID =
12933: x_destination_org_id
12934: AND PLL.SHIPMENT_TYPE in ('STANDARD', 'SCHEDULED',
12935: 'BLANKET')
12936: AND NVL(PLL.ENCUMBERED_FLAG,'N') = 'N'
12937: AND NVL(PLL.CANCEL_FLAG,'N') = 'N'
12938: -- start of 1548597

Line 13444: ((g_document_type = 'PO' and (g_document_subtype='STANDARD' OR g_document_subtype='PLANNED')) OR

13440: p_message => 'l_group_shipments : '||l_group_shipments);
13441: END IF;
13442:
13443: IF (l_group_shipments = 'N' AND
13444: ((g_document_type = 'PO' and (g_document_subtype='STANDARD' OR g_document_subtype='PLANNED')) OR
13445: (g_document_subtype = 'RELEASE'))) THEN
13446: x_po_shipment_num := -1;
13447: END IF;
13448:

Line 13529: IF (g_document_subtype = 'STANDARD'

13525: ** Get the maximum shipment number in the po tables
13526: */
13527: l_progress := '020';
13528:
13529: IF (g_document_subtype = 'STANDARD'
13530: OR g_document_subtype = 'PLANNED' OR
13531: g_document_type = 'RFQ')
13532: THEN
13533:

Line 13537: IF nvl(x_create_new_line,'N') = 'Y' and g_document_subtype = 'STANDARD' THEN

13533:
13534: /* GA FPI start : if create new line parameter is 'Y' then we need to reset
13535: the shipment number and create a new line with one shipment */
13536:
13537: IF nvl(x_create_new_line,'N') = 'Y' and g_document_subtype = 'STANDARD' THEN
13538:
13539: x_int_shipment_num := 0;
13540: x_shipment_num := 0;
13541:

Line 13593: and poll.shipment_type in ('STANDARD', 'PLANNED', 'RFQ');

13589: select nvl(max(shipment_num),0)
13590: into x_shipment_num
13591: from po_line_locations_all poll --
13592: where poll.po_line_id = x_po_line_id
13593: and poll.shipment_type in ('STANDARD', 'PLANNED', 'RFQ');
13594:
13595: -- Bug 605715, lpo, 01/05/98
13596: -- We now check to see if the line_num matches as well by
13597: -- appending an AND condition in the WHERE clause.

Line 14149: -- Standard start of API savepoint

14145:
14146: l_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE; --
14147:
14148: BEGIN
14149: -- Standard start of API savepoint
14150: SAVEPOINT create_price_break_pvt;
14151:
14152: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
14153: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);

Line 14507: --Function: Verifies that Config ID lines are only placed on the Standard PO

14503: --Modifies:
14504: -- None
14505: --Locks:
14506: -- None
14507: --Function: Verifies that Config ID lines are only placed on the Standard PO
14508: -- document type.
14509: --Parameters:
14510: --IN:
14511: --p_interface_header_id

Line 14514: -- TRUE if the document type is Standard PO, or if none of the lines have

14510: --IN:
14511: --p_interface_header_id
14512: -- header ID of the interface records to check
14513: --Returns:
14514: -- TRUE if the document type is Standard PO, or if none of the lines have
14515: -- Config ID; FALSE otherwise.
14516: --Testing:
14517: -- None
14518: --End of Comments

Line 14531: IF (g_document_type = 'PO' AND g_document_subtype = 'STANDARD') THEN

14527: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
14528:
14529: BEGIN
14530:
14531: IF (g_document_type = 'PO' AND g_document_subtype = 'STANDARD') THEN
14532: RETURN TRUE; -- The lines are being placed on a Standard PO.
14533: END IF;
14534:
14535: SELECT count(*)

Line 14532: RETURN TRUE; -- The lines are being placed on a Standard PO.

14528:
14529: BEGIN
14530:
14531: IF (g_document_type = 'PO' AND g_document_subtype = 'STANDARD') THEN
14532: RETURN TRUE; -- The lines are being placed on a Standard PO.
14533: END IF;
14534:
14535: SELECT count(*)
14536: INTO l_num_config_id_lines

Line 14547: -- other than Standard PO.

14543: RETURN TRUE; -- None of the lines have Config ID.
14544: ELSE
14545: l_progress := '010';
14546: -- We do not allow req lines with Config ID to be placed on any document type
14547: -- other than Standard PO.
14548: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
14549: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
14550: p_token => l_progress,
14551: p_message => FND_MESSAGE.get_string('PO','PO_CONFIG_ID_ONLY_ON_STD_PO'));

Line 14894: -- x_line_location_id: id of the first actuals (STANDARD) payitem

14890: -- p_precision: precision of the currency desired. Used to round amounts.
14891: -- p_ext_precision: extended precision of the currency desired.
14892: -- Used to round prices
14893: -- OUT:
14894: -- x_line_location_id: id of the first actuals (STANDARD) payitem
14895: -- in po_line_locations_all
14896: -- x_line_loc_id_tbl: ids of all payitems created in po_line_locations_all
14897: --Notes:
14898: -- None

Line 15096: -- this payitem has a shipment_type of STANDARD and payment_type of DELIVERY

15092:
15093: d_progress := 70;
15094:
15095: -- if financing case, create actual delivery payitem
15096: -- this payitem has a shipment_type of STANDARD and payment_type of DELIVERY
15097:
15098: --SQL WHAT: Insert information for delivery payitem into
15099: -- po_line_locations_interface table
15100: --SQL WHY : We will use line_locations_interface as a

Line 15128: , 'STANDARD'

15124: , l_line_quantity
15125: , l_line_amount
15126: , l_line_unit_price
15127: , 'DELIVERY'
15128: , 'STANDARD'
15129: , interface.item_description
15130: , 1
15131: , interface.need_by_date
15132: , interface.promised_date --Bug5532424

Line 15208: l_shipment_type := 'STANDARD';

15204:
15205: IF (l_isFinancing) THEN
15206: l_shipment_type := 'PREPAYMENT';
15207: ELSE
15208: l_shipment_type := 'STANDARD';
15209: END IF;
15210:
15211: d_progress := 110;
15212:

Line 15545: -- set x_line_location_id to id of first actual (STANDARD) payitem

15541: x_line_loc_id_tbl(l_payitems_created) := l_line_loc_id;
15542: l_payitem_tax_code_id_tbl.EXTEND;
15543: l_payitem_tax_code_id_tbl(l_payitems_created) := l_tax_code_id;
15544:
15545: -- set x_line_location_id to id of first actual (STANDARD) payitem
15546: IF ((x_line_location_id IS NULL)
15547: AND (line_location_rec.shipment_type = 'STANDARD')) THEN
15548: x_line_location_id := l_line_loc_id;
15549: END IF;

Line 15547: AND (line_location_rec.shipment_type = 'STANDARD')) THEN

15543: l_payitem_tax_code_id_tbl(l_payitems_created) := l_tax_code_id;
15544:
15545: -- set x_line_location_id to id of first actual (STANDARD) payitem
15546: IF ((x_line_location_id IS NULL)
15547: AND (line_location_rec.shipment_type = 'STANDARD')) THEN
15548: x_line_location_id := l_line_loc_id;
15549: END IF;
15550:
15551: END LOOP; -- poll_interface_cursor loop

Line 16154: AND poll.shipment_type = 'STANDARD'

16150: AND deliv.line_location_id =
16151: ( SELECT poll.line_location_id
16152: FROM po_line_locations_all poll
16153: WHERE poll.po_line_id = p_po_line_id
16154: AND poll.shipment_type = 'STANDARD'
16155: AND poll.shipment_num =
16156: ( SELECT min(poll2.shipment_num)
16157: FROM po_line_locations_all poll2
16158: WHERE poll2.po_line_id = poll.po_line_id

Line 16159: AND poll2.shipment_type = 'STANDARD'))

16155: AND poll.shipment_num =
16156: ( SELECT min(poll2.shipment_num)
16157: FROM po_line_locations_all poll2
16158: WHERE poll2.po_line_id = poll.po_line_id
16159: AND poll2.shipment_type = 'STANDARD'))
16160: AND pod.line_location_id = deliv.line_location_id;
16161:
16162: d_progress := 150;
16163: IF (PO_LOG.d_stmt) THEN