DBA Data[Home] [Help]

APPS.AHL_OSP_RCV_PVT dependencies on FND_API

Line 72: -- It returns FND_API.G_TRUE if a receipt can be done. Otherwise, it returns FND_API.G_FALSE.

68: -- Start of Comments --
69: -- Function name : Can_Receive_Against_OSP
70: -- Type : Public
71: -- Functionality : Function to determine if an OSP Order is 'ready for receipt'.
72: -- It returns FND_API.G_TRUE if a receipt can be done. Otherwise, it returns FND_API.G_FALSE.
73: -- Pre-reqs :
74: --
75: -- Parameters:
76: --

Line 125: -- Check for the given OSP order id. If NULL, return FND_API.G_FALSE.

121: IF (FND_LOG.level_procedure >= FND_LOG.g_current_runtime_level) THEN
122: FND_LOG.string(FND_LOG.level_procedure, l_debug_key||'.begin', 'API called with p_osp_order_id: '||p_osp_order_id);
123: END IF;
124:
125: -- Check for the given OSP order id. If NULL, return FND_API.G_FALSE.
126: IF (p_osp_order_id IS NULL) THEN
127: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
128: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
129: 'OSP order id is NULL. Returning False.');

Line 132: RETURN FND_API.G_FALSE;

128: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
129: 'OSP order id is NULL. Returning False.');
130: END IF;
131:
132: RETURN FND_API.G_FALSE;
133: END IF;
134:
135: -- Get the shipment header id, i.e. oe_header_id, for the given OSP order id.
136: OPEN get_oe_header_id(p_osp_order_id);

Line 140: -- Check for the oe_header_id. If NULL, it means no shipment has been created. Return FND_API.G_FALSE.

136: OPEN get_oe_header_id(p_osp_order_id);
137: FETCH get_oe_header_id INTO l_oe_header_id;
138: CLOSE get_oe_header_id;
139:
140: -- Check for the oe_header_id. If NULL, it means no shipment has been created. Return FND_API.G_FALSE.
141: IF (l_oe_header_id IS NULL) THEN
142: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
143: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
144: 'oe_header_id is NULL for the OSP order: '||p_osp_order_id||'. Returning False.');

Line 147: RETURN FND_API.G_FALSE;

143: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
144: 'oe_header_id is NULL for the OSP order: '||p_osp_order_id||'. Returning False.');
145: END IF;
146:
147: RETURN FND_API.G_FALSE;
148: END IF;
149:
150: -- Check whether the shipment, i.e. oe_header_id is booked or not.
151: OPEN chk_shipment_booked(l_oe_header_id);

Line 154: -- The shipment is not booked. Return FND_API.G_FALSE.

150: -- Check whether the shipment, i.e. oe_header_id is booked or not.
151: OPEN chk_shipment_booked(l_oe_header_id);
152: FETCH chk_shipment_booked INTO l_dummy;
153: IF (chk_shipment_booked%NOTFOUND) THEN
154: -- The shipment is not booked. Return FND_API.G_FALSE.
155: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
156: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
157: 'Shipment '||l_oe_header_id||' is not booked. Returning False.');
158: END IF;

Line 161: RETURN FND_API.G_FALSE;

157: 'Shipment '||l_oe_header_id||' is not booked. Returning False.');
158: END IF;
159:
160: CLOSE chk_shipment_booked;
161: RETURN FND_API.G_FALSE;
162: END IF;
163: CLOSE chk_shipment_booked;
164:
165: -- For a booked shipment, get all the RMA type lines.

Line 172: IF (Can_Receive_Against_RMA(l_oe_line_id) = FND_API.G_TRUE) THEN

168: FETCH get_rma_lines INTO l_oe_line_id;
169: EXIT WHEN get_rma_lines%NOTFOUND;
170:
171: -- Check whether the receipt can be done against the RMA line id or not.
172: IF (Can_Receive_Against_RMA(l_oe_line_id) = FND_API.G_TRUE) THEN
173: -- Receipt against RMA can be done for this line. Return FND_API.G_TRUE.
174: CLOSE get_rma_lines;
175: RETURN FND_API.G_TRUE;
176: ELSIF (Can_Receive_Against_PO(l_oe_line_id) = FND_API.G_TRUE) THEN

Line 173: -- Receipt against RMA can be done for this line. Return FND_API.G_TRUE.

169: EXIT WHEN get_rma_lines%NOTFOUND;
170:
171: -- Check whether the receipt can be done against the RMA line id or not.
172: IF (Can_Receive_Against_RMA(l_oe_line_id) = FND_API.G_TRUE) THEN
173: -- Receipt against RMA can be done for this line. Return FND_API.G_TRUE.
174: CLOSE get_rma_lines;
175: RETURN FND_API.G_TRUE;
176: ELSIF (Can_Receive_Against_PO(l_oe_line_id) = FND_API.G_TRUE) THEN
177: -- Receipt against PO can be done for this line. Return FND_API.G_TRUE.

Line 175: RETURN FND_API.G_TRUE;

171: -- Check whether the receipt can be done against the RMA line id or not.
172: IF (Can_Receive_Against_RMA(l_oe_line_id) = FND_API.G_TRUE) THEN
173: -- Receipt against RMA can be done for this line. Return FND_API.G_TRUE.
174: CLOSE get_rma_lines;
175: RETURN FND_API.G_TRUE;
176: ELSIF (Can_Receive_Against_PO(l_oe_line_id) = FND_API.G_TRUE) THEN
177: -- Receipt against PO can be done for this line. Return FND_API.G_TRUE.
178: CLOSE get_rma_lines;
179: RETURN FND_API.G_TRUE;

Line 176: ELSIF (Can_Receive_Against_PO(l_oe_line_id) = FND_API.G_TRUE) THEN

172: IF (Can_Receive_Against_RMA(l_oe_line_id) = FND_API.G_TRUE) THEN
173: -- Receipt against RMA can be done for this line. Return FND_API.G_TRUE.
174: CLOSE get_rma_lines;
175: RETURN FND_API.G_TRUE;
176: ELSIF (Can_Receive_Against_PO(l_oe_line_id) = FND_API.G_TRUE) THEN
177: -- Receipt against PO can be done for this line. Return FND_API.G_TRUE.
178: CLOSE get_rma_lines;
179: RETURN FND_API.G_TRUE;
180: END IF;

Line 177: -- Receipt against PO can be done for this line. Return FND_API.G_TRUE.

173: -- Receipt against RMA can be done for this line. Return FND_API.G_TRUE.
174: CLOSE get_rma_lines;
175: RETURN FND_API.G_TRUE;
176: ELSIF (Can_Receive_Against_PO(l_oe_line_id) = FND_API.G_TRUE) THEN
177: -- Receipt against PO can be done for this line. Return FND_API.G_TRUE.
178: CLOSE get_rma_lines;
179: RETURN FND_API.G_TRUE;
180: END IF;
181: END LOOP;

Line 179: RETURN FND_API.G_TRUE;

175: RETURN FND_API.G_TRUE;
176: ELSIF (Can_Receive_Against_PO(l_oe_line_id) = FND_API.G_TRUE) THEN
177: -- Receipt against PO can be done for this line. Return FND_API.G_TRUE.
178: CLOSE get_rma_lines;
179: RETURN FND_API.G_TRUE;
180: END IF;
181: END LOOP;
182: CLOSE get_rma_lines;
183:

Line 184: -- If none of the shipment/PO lines can be received, return FND_API.G_FALSE.

180: END IF;
181: END LOOP;
182: CLOSE get_rma_lines;
183:
184: -- If none of the shipment/PO lines can be received, return FND_API.G_FALSE.
185: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
186: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
187: 'None of the shipment/PO lines can be received. Returnig False.');
188: END IF;

Line 190: RETURN FND_API.G_FALSE;

186: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
187: 'None of the shipment/PO lines can be received. Returnig False.');
188: END IF;
189:
190: RETURN FND_API.G_FALSE;
191: END Can_Receive_Against_OSP;
192:
193:
194: -- Start of Comments --

Line 198: -- It returns FND_API.G_TRUE if a receipt can be done. Otherwise, it returns FND_API.G_FALSE.

194: -- Start of Comments --
195: -- Function name : Can_Receive_Against_PO
196: -- Type : Public
197: -- Functionality : Function to determine if a receipt against PO can be done given an RMA line.
198: -- It returns FND_API.G_TRUE if a receipt can be done. Otherwise, it returns FND_API.G_FALSE.
199: -- Pre-reqs :
200: --
201: -- Parameters:
202: --

Line 349: -- The given return line is invalid. Return FND_API.G_FALSE.

345: -- Check whether the given return line is valid or not.
346: OPEN chk_return_line(p_return_line_id);
347: FETCH chk_return_line INTO l_dummy;
348: IF (chk_return_line%NOTFOUND) THEN
349: -- The given return line is invalid. Return FND_API.G_FALSE.
350: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
351: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
352: 'Return line: '||p_return_line_id||' is invalid. Returnig False.');
353: END IF;

Line 356: RETURN FND_API.G_FALSE;

352: 'Return line: '||p_return_line_id||' is invalid. Returnig False.');
353: END IF;
354:
355: CLOSE chk_return_line;
356: RETURN FND_API.G_FALSE;
357: END IF;
358: CLOSE chk_return_line;
359:
360: -- SATHAPLI::Bug 6877509 - changes start, 02-Apr-08

Line 375: -- ordered quantity, then it means there is still quantity left to be returned. Return FND_API.G_FALSE.

371: -- SATHAPLI::Bug 6877509 - changes end, 02-Apr-08
372:
373: -- PO receipt should be enabled only after RMA receipt is complete. For this, check for the ordered and
374: -- shipped quantities of the given return line. If the shipped quantity is less than the
375: -- ordered quantity, then it means there is still quantity left to be returned. Return FND_API.G_FALSE.
376: IF (l_oe_shipped_qty IS NULL OR l_oe_shipped_qty < l_oe_ordered_qty) THEN
377: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
378: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
379: 'Shipped quantity is NULL, or less than the ordered quantity for the return line: '||p_return_line_id||

Line 383: RETURN FND_API.G_FALSE;

379: 'Shipped quantity is NULL, or less than the ordered quantity for the return line: '||p_return_line_id||
380: '. As receipt against RMA is not complete yet, returning False.');
381: END IF;
382:
383: RETURN FND_API.G_FALSE;
384: END IF;
385:
386: -- Get the PO header id for the OSP order corresponding to the given return line id.
387: OPEN get_po_header_id(p_return_line_id);

Line 393: -- Even the requisition header id is NULL. Return FND_API.G_FALSE.

389: IF (get_po_header_id%FOUND) THEN
390: IF (l_po_header_id IS NULL) THEN
391: -- As the PO header id is NULL, check for the requisition header id.
392: IF (l_po_req_header_id IS NULL) THEN
393: -- Even the requisition header id is NULL. Return FND_API.G_FALSE.
394: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
395: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
396: 'Both PO and requisition headers are NULL for the OSP order: '||l_osp_order_id||
397: '. Returning False.');

Line 401: RETURN FND_API.G_FALSE;

397: '. Returning False.');
398: END IF;
399:
400: CLOSE get_po_header_id;
401: RETURN FND_API.G_FALSE;
402: ELSE
403: -- Check whether the Requisition is approved or not.
404: -- If not approved, return FND_API.G_FALSE.
405: OPEN chk_po_req_approved(l_po_req_header_id);

Line 404: -- If not approved, return FND_API.G_FALSE.

400: CLOSE get_po_header_id;
401: RETURN FND_API.G_FALSE;
402: ELSE
403: -- Check whether the Requisition is approved or not.
404: -- If not approved, return FND_API.G_FALSE.
405: OPEN chk_po_req_approved(l_po_req_header_id);
406: FETCH chk_po_req_approved INTO l_dummy;
407: IF (chk_po_req_approved%NOTFOUND) THEN
408: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN

Line 415: RETURN FND_API.G_FALSE;

411: END IF;
412:
413: CLOSE chk_po_req_approved;
414: CLOSE get_po_header_id;
415: RETURN FND_API.G_FALSE;
416: END IF;
417: CLOSE chk_po_req_approved;
418: END IF; -- if l_po_req_header_id IS NULL
419: ELSE

Line 421: -- If not approved, return FND_API.G_FALSE.

417: CLOSE chk_po_req_approved;
418: END IF; -- if l_po_req_header_id IS NULL
419: ELSE
420: -- Check whether the Purchase order is approved or not.
421: -- If not approved, return FND_API.G_FALSE.
422: OPEN chk_po_header_approved(l_po_header_id);
423: FETCH chk_po_header_approved INTO l_dummy;
424: IF (chk_po_header_approved%NOTFOUND) THEN
425: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN

Line 432: RETURN FND_API.G_FALSE;

428: END IF;
429:
430: CLOSE chk_po_header_approved;
431: CLOSE get_po_header_id;
432: RETURN FND_API.G_FALSE;
433: END IF;
434: CLOSE chk_po_header_approved;
435: END IF; -- if l_po_header_id IS NULL
436: ELSE

Line 437: -- This means that the OSP order is not in the PO_CREATED or REQ_CREATED status. Return FND_API.G_FALSE.

433: END IF;
434: CLOSE chk_po_header_approved;
435: END IF; -- if l_po_header_id IS NULL
436: ELSE
437: -- This means that the OSP order is not in the PO_CREATED or REQ_CREATED status. Return FND_API.G_FALSE.
438: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
439: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
440: 'OSP order: '||l_osp_order_id||' is not in status PO_CREATED or REQ_CREATED. Returnig False.');
441: END IF;

Line 444: RETURN FND_API.G_FALSE;

440: 'OSP order: '||l_osp_order_id||' is not in status PO_CREATED or REQ_CREATED. Returnig False.');
441: END IF;
442:
443: CLOSE get_po_header_id;
444: RETURN FND_API.G_FALSE;
445: END IF; -- if get_po_header_id%FOUND
446: CLOSE get_po_header_id;
447:
448: -- After the OSP order and Purchase order or Requisition checks above, check for the PO line quantity for each OSP order line.

Line 486: RETURN FND_API.G_FALSE;

482: END IF;
483:
484: CLOSE get_po_line;
485: CLOSE get_po_line_quantity1;
486: RETURN FND_API.G_FALSE;
487: END IF; -- if get_po_line%FOUND
488: CLOSE get_po_line;
489: END IF;
490:

Line 491: -- For any of the PO lines, if the total received quantity is not less than the line quantity, return FND_API.G_FALSE.

487: END IF; -- if get_po_line%FOUND
488: CLOSE get_po_line;
489: END IF;
490:
491: -- For any of the PO lines, if the total received quantity is not less than the line quantity, return FND_API.G_FALSE.
492: -- No need to check this for merged Requisition lines, this check would already have happened for the first Requisition line.
493: IF NOT l_merged_req_line AND NOT (l_po_line_tot_qty < l_po_line_qty) THEN
494: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
495: FND_LOG.string(FND_LOG.level_statement, l_debug_key,

Line 501: RETURN FND_API.G_FALSE;

497: ' Returning False.');
498: END IF;
499:
500: CLOSE get_po_line_quantity1;
501: RETURN FND_API.G_FALSE;
502: END IF;
503: END LOOP;
504: CLOSE get_po_line_quantity1;
505:

Line 506: -- If all the checks have been validated, return FND_API.G_TRUE.

502: END IF;
503: END LOOP;
504: CLOSE get_po_line_quantity1;
505:
506: -- If all the checks have been validated, return FND_API.G_TRUE.
507: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
508: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
509: 'All checks validated. Returnig True.');
510: END IF;

Line 512: RETURN FND_API.G_TRUE;

508: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
509: 'All checks validated. Returnig True.');
510: END IF;
511:
512: RETURN FND_API.G_TRUE;
513: END Can_Receive_Against_PO;
514:
515:
516: -- Start of Comments --

Line 520: -- It returns FND_API.G_TRUE if a receipt can be done. Otherwise, it returns FND_API.G_FALSE.

516: -- Start of Comments --
517: -- Function name : Can_Receive_Against_RMA
518: -- Type : Public
519: -- Functionality : Function to determine if a receipt can be done against a given RMA line.
520: -- It returns FND_API.G_TRUE if a receipt can be done. Otherwise, it returns FND_API.G_FALSE.
521: -- Pre-reqs :
522: --
523: -- Parameters:
524: --

Line 586: -- The given return line is invalid. Return FND_API.G_FALSE.

582: -- Check whether the given return line is valid or not.
583: OPEN chk_return_line(p_return_line_id);
584: FETCH chk_return_line INTO l_dummy;
585: IF (chk_return_line%NOTFOUND) THEN
586: -- The given return line is invalid. Return FND_API.G_FALSE.
587: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
588: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
589: 'Return line: '||p_return_line_id||' is invalid. Returnig False.');
590: END IF;

Line 593: RETURN FND_API.G_FALSE;

589: 'Return line: '||p_return_line_id||' is invalid. Returnig False.');
590: END IF;
591:
592: CLOSE chk_return_line;
593: RETURN FND_API.G_FALSE;
594: END IF;
595: CLOSE chk_return_line;
596:
597: -- Check whether the shipment is booked or not.

Line 601: -- The shipment is not booked. Return FND_API.G_FALSE.

597: -- Check whether the shipment is booked or not.
598: OPEN chk_shipment_booked(p_return_line_id);
599: FETCH chk_shipment_booked INTO l_oe_header_id;
600: IF (chk_shipment_booked%NOTFOUND) THEN
601: -- The shipment is not booked. Return FND_API.G_FALSE.
602: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
603: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
604: 'Shipment order: '||l_oe_header_id||' is not booked. Returnig False.');
605: END IF;

Line 608: RETURN FND_API.G_FALSE;

604: 'Shipment order: '||l_oe_header_id||' is not booked. Returnig False.');
605: END IF;
606:
607: CLOSE chk_shipment_booked;
608: RETURN FND_API.G_FALSE;
609: END IF;
610: CLOSE chk_shipment_booked;
611:
612:

Line 617: -- If the ship line id is NULL, return FND_API.G_FALSE.

613: -- Get the ship line id of the OSP order lines, that correspond to the given return line.
614: OPEN get_osp_ship_line_id(p_return_line_id);
615: FETCH get_osp_ship_line_id INTO l_oe_ship_line_id;
616: IF (get_osp_ship_line_id%FOUND) THEN
617: -- If the ship line id is NULL, return FND_API.G_FALSE.
618: IF (l_oe_ship_line_id IS NULL) THEN
619: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
620: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
621: 'Ship line id for the return line: '||p_return_line_id||' is NULL. Returning False.');

Line 625: RETURN FND_API.G_FALSE;

621: 'Ship line id for the return line: '||p_return_line_id||' is NULL. Returning False.');
622: END IF;
623:
624: CLOSE get_osp_ship_line_id;
625: RETURN FND_API.G_FALSE;
626: ELSE
627: -- Get the ordered and shipped quantities of the ship line.
628: OPEN get_oe_quantities(l_oe_ship_line_id);
629: FETCH get_oe_quantities INTO l_ship_line_qty_rec;

Line 638: -- If the shipped quantity is NULL or zero, it means shipment hasn't been done yet. Return FND_API.G_FALSE.

634: FND_LOG.string(FND_LOG.level_statement, l_debug_key, 'l_ship_line_qty_rec.shipped_quantity: '||l_ship_line_qty_rec .shipped_quantity);
635: END IF;
636:
637: -- Shipment should have been done for any receipt to take place. For this, check the shipped quantity.
638: -- If the shipped quantity is NULL or zero, it means shipment hasn't been done yet. Return FND_API.G_FALSE.
639: IF (l_ship_line_qty_rec.shipped_quantity IS NULL OR l_ship_line_qty_rec.shipped_quantity = 0) THEN
640: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
641: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
642: 'Shipment for the return line: '||p_return_line_id||' has not been done yet. Returning False.');

Line 646: RETURN FND_API.G_FALSE;

642: 'Shipment for the return line: '||p_return_line_id||' has not been done yet. Returning False.');
643: END IF;
644:
645: CLOSE get_osp_ship_line_id;
646: RETURN FND_API.G_FALSE;
647: END IF;
648: END IF;
649: END IF;
650: CLOSE get_osp_ship_line_id;

Line 658: -- ordered quantity, then it means there is no quantity left to be returned. Return FND_API.G_FALSE.

654: FETCH get_oe_quantities INTO l_return_line_qty_rec;
655: CLOSE get_oe_quantities;
656:
657: -- Check for the ordered and shipped quantities of the given return line. If the shipped quantity is not less than the
658: -- ordered quantity, then it means there is no quantity left to be returned. Return FND_API.G_FALSE.
659: IF NOT (nvl(l_return_line_qty_rec.shipped_quantity,0) < l_return_line_qty_rec.ordered_quantity) THEN
660: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
661: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
662: 'Shipped quantity is not less than the ordered quantity for the return line: '||p_return_line_id||'.'||

Line 666: RETURN FND_API.G_FALSE;

662: 'Shipped quantity is not less than the ordered quantity for the return line: '||p_return_line_id||'.'||
663: ' Returning False.');
664: END IF;
665:
666: RETURN FND_API.G_FALSE;
667: END IF;
668:
669: -- If all the checks have been validated, return FND_API.G_TRUE.
670: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN

Line 669: -- If all the checks have been validated, return FND_API.G_TRUE.

665:
666: RETURN FND_API.G_FALSE;
667: END IF;
668:
669: -- If all the checks have been validated, return FND_API.G_TRUE.
670: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN
671: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
672: 'All checks validated. Returnig True.');
673: END IF;

Line 675: RETURN FND_API.G_TRUE;

671: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
672: 'All checks validated. Returnig True.');
673: END IF;
674:
675: RETURN FND_API.G_TRUE;
676: END Can_Receive_Against_RMA;
677:
678: --salogan added the following for supplier warranty starts
679: -- Start of Comments --

Line 910: -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE

906: -- Parameters:
907: --
908: -- Standard IN Parameters:
909: -- p_api_version IN NUMBER Required
910: -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
911: -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
912: -- p_validation_level IN NUMBER Required
913: -- p_module_type IN VARCHAR2 Default NULL
914: --

Line 911: -- p_commit IN VARCHAR2 Default FND_API.G_FALSE

907: --
908: -- Standard IN Parameters:
909: -- p_api_version IN NUMBER Required
910: -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
911: -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
912: -- p_validation_level IN NUMBER Required
913: -- p_module_type IN VARCHAR2 Default NULL
914: --
915: -- Standard OUT Parameters:

Line 932: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

928: -- End of Comments --
929:
930: PROCEDURE Receive_Against_PO (
931: p_api_version IN NUMBER,
932: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
933: p_commit IN VARCHAR2 := FND_API.G_FALSE,
934: p_validation_level IN NUMBER,
935: p_module_type IN VARCHAR2 := NULL,
936: x_return_status OUT NOCOPY VARCHAR2,

Line 933: p_commit IN VARCHAR2 := FND_API.G_FALSE,

929:
930: PROCEDURE Receive_Against_PO (
931: p_api_version IN NUMBER,
932: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
933: p_commit IN VARCHAR2 := FND_API.G_FALSE,
934: p_validation_level IN NUMBER,
935: p_module_type IN VARCHAR2 := NULL,
936: x_return_status OUT NOCOPY VARCHAR2,
937: x_msg_count OUT NOCOPY NUMBER,

Line 1071: x_return_status := FND_API.G_RET_STS_SUCCESS;

1067: -- Standard start of API savepoint.
1068: SAVEPOINT Receive_Against_PO_Pvt;
1069:
1070: -- Initialize Procedure return status to success.
1071: x_return_status := FND_API.G_RET_STS_SUCCESS;
1072:
1073: -- Standard call to check for call compatibility.
1074: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,
1075: l_api_name, G_PKG_NAME) THEN

Line 1074: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,

1070: -- Initialize Procedure return status to success.
1071: x_return_status := FND_API.G_RET_STS_SUCCESS;
1072:
1073: -- Standard call to check for call compatibility.
1074: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,
1075: l_api_name, G_PKG_NAME) THEN
1076: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1077: END IF;
1078:

Line 1076: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1072:
1073: -- Standard call to check for call compatibility.
1074: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,
1075: l_api_name, G_PKG_NAME) THEN
1076: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1077: END IF;
1078:
1079: -- Initialize message list if p_init_msg_list is set to TRUE.
1080: IF FND_API.To_Boolean(p_init_msg_list) THEN

Line 1080: IF FND_API.To_Boolean(p_init_msg_list) THEN

1076: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1077: END IF;
1078:
1079: -- Initialize message list if p_init_msg_list is set to TRUE.
1080: IF FND_API.To_Boolean(p_init_msg_list) THEN
1081: FND_MSG_PUB.Initialize;
1082: END IF;
1083:
1084: -- Get the PO header id for the OSP order corresponding to the given return line id.

Line 1101: RAISE FND_API.G_EXC_ERROR;

1097:
1098: CLOSE get_po_header_id;
1099: FND_MESSAGE.set_name('AHL', 'AHL_OSP_PO_REQ_NULL'); -- Receipt cannot be done as neither the purchase order nor the requisition exist for this OSP order.
1100: FND_MSG_PUB.ADD;
1101: RAISE FND_API.G_EXC_ERROR;
1102: ELSE
1103: -- Check whether the Requisition is approved or not.
1104: -- If not approved, raise an exception.
1105: OPEN chk_po_req_approved(l_po_req_header_id);

Line 1117: RAISE FND_API.G_EXC_ERROR;

1113: CLOSE chk_po_req_approved;
1114: CLOSE get_po_header_id;
1115: FND_MESSAGE.set_name('AHL', 'AHL_OSP_REQ_NOT_APRVD'); -- Receipt cannot be done as the requisition is not approved.
1116: FND_MSG_PUB.ADD;
1117: RAISE FND_API.G_EXC_ERROR;
1118: END IF;
1119: CLOSE chk_po_req_approved;
1120: END IF; -- if l_po_req_header_id IS NULL
1121: ELSE

Line 1135: RAISE FND_API.G_EXC_ERROR;

1131: CLOSE get_po_header_details1;
1132: CLOSE get_po_header_id;
1133: FND_MESSAGE.set_name('AHL', 'AHL_OSP_PO_NOT_APRVD'); -- Receipt cannot be done as the purchase order is not approved.
1134: FND_MSG_PUB.ADD;
1135: RAISE FND_API.G_EXC_ERROR;
1136: END IF;
1137: CLOSE get_po_header_details1;
1138: END IF; -- if l_po_header_id IS NULL
1139: ELSE

Line 1150: RAISE FND_API.G_EXC_ERROR;

1146: CLOSE get_po_header_id;
1147: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORDER_INVALID'); -- The status of the OSP order (ORDER_NUM) is not valid for receiving.
1148: FND_MESSAGE.set_token('ORDER_NUM', l_osp_order_number);
1149: FND_MSG_PUB.ADD;
1150: RAISE FND_API.G_EXC_ERROR;
1151: END IF; -- if get_po_header_id%FOUND
1152: CLOSE get_po_header_id;
1153:
1154: -- Get the PO line quantity and the total received quantity.

Line 1199: RAISE FND_API.G_EXC_ERROR;

1195: CLOSE get_po_line;
1196: CLOSE get_po_line_quantity1;
1197: FND_MESSAGE.set_name('AHL', 'AHL_OSP_PO_NULL_OR_INVLD'); -- Either the purchase order is not created or it is not approved.
1198: FND_MSG_PUB.ADD;
1199: RAISE FND_API.G_EXC_ERROR;
1200: END IF; -- if get_po_line%FOUND
1201: CLOSE get_po_line;
1202: END IF;
1203:

Line 1231: RAISE FND_API.G_EXC_ERROR;

1227: CLOSE chk_pending_transaction;
1228: CLOSE get_po_line_quantity1;
1229: FND_MESSAGE.set_name('AHL', 'AHL_OSP_PO_PENDING_TRNSCTN'); -- Some of the purchase order lines for this return line have pending transactions.
1230: FND_MSG_PUB.ADD;
1231: RAISE FND_API.G_EXC_ERROR;
1232: END IF;
1233: CLOSE chk_pending_transaction;
1234:
1235: -- Insert a record in RCV_HEADERS_INTERFACE table as a header of these PO lines.

Line 1353: RAISE FND_API.G_EXC_ERROR;

1349: END IF;
1350:
1351: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ALL_PO_LINES_RCVD'); -- All the purchase order lines for this return line have been received.
1352: FND_MSG_PUB.ADD;
1353: RAISE FND_API.G_EXC_ERROR;
1354: END IF;
1355:
1356: -- After the interface tables been populated above, submit request for calling the Concurrent Program 'RVCTP'.
1357: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN

Line 1393: p_encoded => FND_API.G_FALSE

1389: -- Standard call to get message count and initialise the OUT parameters.
1390: FND_MSG_PUB.Count_And_Get
1391: ( p_count => x_msg_count,
1392: p_data => x_msg_data,
1393: p_encoded => FND_API.G_FALSE
1394: );
1395:
1396: -- Commit work if p_commit is TRUE.
1397: IF FND_API.TO_BOOLEAN(p_commit) THEN

Line 1397: IF FND_API.TO_BOOLEAN(p_commit) THEN

1393: p_encoded => FND_API.G_FALSE
1394: );
1395:
1396: -- Commit work if p_commit is TRUE.
1397: IF FND_API.TO_BOOLEAN(p_commit) THEN
1398: COMMIT WORK;
1399: END IF;
1400:
1401: IF (FND_LOG.level_procedure >= FND_LOG.g_current_runtime_level) THEN

Line 1405: WHEN FND_API.G_EXC_ERROR THEN

1401: IF (FND_LOG.level_procedure >= FND_LOG.g_current_runtime_level) THEN
1402: FND_LOG.string(FND_LOG.level_procedure, l_debug_key||'.end', 'End of the API. x_request_id: '||x_request_id);
1403: END IF;
1404: EXCEPTION
1405: WHEN FND_API.G_EXC_ERROR THEN
1406: ROLLBACK TO Receive_Against_PO_Pvt;
1407: x_return_status := FND_API.G_RET_STS_ERROR;
1408: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1409: p_data => x_msg_data,

Line 1407: x_return_status := FND_API.G_RET_STS_ERROR;

1403: END IF;
1404: EXCEPTION
1405: WHEN FND_API.G_EXC_ERROR THEN
1406: ROLLBACK TO Receive_Against_PO_Pvt;
1407: x_return_status := FND_API.G_RET_STS_ERROR;
1408: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1409: p_data => x_msg_data,
1410: p_encoded => FND_API.G_FALSE);
1411:

Line 1410: p_encoded => FND_API.G_FALSE);

1406: ROLLBACK TO Receive_Against_PO_Pvt;
1407: x_return_status := FND_API.G_RET_STS_ERROR;
1408: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1409: p_data => x_msg_data,
1410: p_encoded => FND_API.G_FALSE);
1411:
1412: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1413: ROLLBACK TO Receive_Against_PO_Pvt;
1414: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1412: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1408: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1409: p_data => x_msg_data,
1410: p_encoded => FND_API.G_FALSE);
1411:
1412: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1413: ROLLBACK TO Receive_Against_PO_Pvt;
1414: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1415: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1416: p_data => x_msg_data,

Line 1414: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1410: p_encoded => FND_API.G_FALSE);
1411:
1412: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1413: ROLLBACK TO Receive_Against_PO_Pvt;
1414: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1415: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1416: p_data => x_msg_data,
1417: p_encoded => FND_API.G_FALSE);
1418:

Line 1417: p_encoded => FND_API.G_FALSE);

1413: ROLLBACK TO Receive_Against_PO_Pvt;
1414: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1415: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1416: p_data => x_msg_data,
1417: p_encoded => FND_API.G_FALSE);
1418:
1419: WHEN OTHERS THEN
1420: ROLLBACK TO Receive_Against_PO_Pvt;
1421: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1421: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1417: p_encoded => FND_API.G_FALSE);
1418:
1419: WHEN OTHERS THEN
1420: ROLLBACK TO Receive_Against_PO_Pvt;
1421: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1422: FND_MSG_PUB.Add_Exc_Msg( p_pkg_name => G_PKG_NAME,
1423: p_procedure_name => l_api_name,
1424: p_error_text => SQLERRM);
1425:

Line 1428: p_encoded => FND_API.G_FALSE);

1424: p_error_text => SQLERRM);
1425:
1426: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
1427: p_data => x_msg_data,
1428: p_encoded => FND_API.G_FALSE);
1429: END Receive_Against_PO;
1430:
1431:
1432: -- Start of Comments --

Line 1443: -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE

1439: -- Parameters:
1440: --
1441: -- Standard IN Parameters:
1442: -- p_api_version IN NUMBER Required
1443: -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
1444: -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
1445: -- p_validation_level IN NUMBER Required
1446: -- p_module_type IN VARCHAR2 Default NULL
1447: --

Line 1444: -- p_commit IN VARCHAR2 Default FND_API.G_FALSE

1440: --
1441: -- Standard IN Parameters:
1442: -- p_api_version IN NUMBER Required
1443: -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
1444: -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
1445: -- p_validation_level IN NUMBER Required
1446: -- p_module_type IN VARCHAR2 Default NULL
1447: --
1448: -- Standard OUT Parameters:

Line 1466: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1462: -- End of Comments --
1463:
1464: PROCEDURE Receive_Against_RMA (
1465: p_api_version IN NUMBER,
1466: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1467: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1468: p_validation_level IN NUMBER,
1469: p_module_type IN VARCHAR2 := NULL,
1470: x_return_status OUT NOCOPY VARCHAR2,

Line 1467: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1463:
1464: PROCEDURE Receive_Against_RMA (
1465: p_api_version IN NUMBER,
1466: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1467: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1468: p_validation_level IN NUMBER,
1469: p_module_type IN VARCHAR2 := NULL,
1470: x_return_status OUT NOCOPY VARCHAR2,
1471: x_msg_count OUT NOCOPY NUMBER,

Line 1640: x_return_status := FND_API.G_RET_STS_SUCCESS;

1636: -- Standard start of API savepoint.
1637: SAVEPOINT Receive_Against_RMA_Pvt;
1638:
1639: -- Initialize Procedure return status to success.
1640: x_return_status := FND_API.G_RET_STS_SUCCESS;
1641:
1642: -- Standard call to check for call compatibility.
1643: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,
1644: l_api_name, G_PKG_NAME) THEN

Line 1643: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,

1639: -- Initialize Procedure return status to success.
1640: x_return_status := FND_API.G_RET_STS_SUCCESS;
1641:
1642: -- Standard call to check for call compatibility.
1643: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,
1644: l_api_name, G_PKG_NAME) THEN
1645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1646: END IF;
1647:

Line 1645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1641:
1642: -- Standard call to check for call compatibility.
1643: IF NOT FND_API.Compatible_API_Call(l_api_version, p_api_version,
1644: l_api_name, G_PKG_NAME) THEN
1645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1646: END IF;
1647:
1648: -- Initialize message list if p_init_msg_list is set to TRUE.
1649: IF FND_API.To_Boolean(p_init_msg_list) THEN

Line 1649: IF FND_API.To_Boolean(p_init_msg_list) THEN

1645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1646: END IF;
1647:
1648: -- Initialize message list if p_init_msg_list is set to TRUE.
1649: IF FND_API.To_Boolean(p_init_msg_list) THEN
1650: FND_MSG_PUB.Initialize;
1651: END IF;
1652:
1653: x_return_line_id := null;

Line 1686: RAISE FND_API.G_EXC_ERROR;

1682: END IF;
1683: CLOSE chk_pending_transaction;
1684: FND_MESSAGE.set_name('AHL', 'AHL_OSP_OE_TRANS_PENDING'); -- The return line has pending transactions.
1685: FND_MSG_PUB.ADD;
1686: RAISE FND_API.G_EXC_ERROR;
1687: END IF;
1688: CLOSE chk_pending_transaction;
1689:
1690: /* Validate the input parameters. This api will throw any validation errors */

Line 1704: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

1700: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'After calling validate_create_locator');
1701: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'l_return_status: '||l_return_status);
1702: END IF;
1703:
1704: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1705: RAISE FND_API.G_EXC_ERROR;
1706: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1707: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1708: END IF;

Line 1705: RAISE FND_API.G_EXC_ERROR;

1701: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'l_return_status: '||l_return_status);
1702: END IF;
1703:
1704: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1705: RAISE FND_API.G_EXC_ERROR;
1706: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1707: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1708: END IF;
1709: -- SALOGAN added to call prcedure to validate and create a new locator if needed for 9496606 END

Line 1706: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

1702: END IF;
1703:
1704: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1705: RAISE FND_API.G_EXC_ERROR;
1706: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1707: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1708: END IF;
1709: -- SALOGAN added to call prcedure to validate and create a new locator if needed for 9496606 END
1710:

Line 1707: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1703:
1704: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1705: RAISE FND_API.G_EXC_ERROR;
1706: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1707: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1708: END IF;
1709: -- SALOGAN added to call prcedure to validate and create a new locator if needed for 9496606 END
1710:
1711: -- Check for part number change attributes.

Line 1777: p_init_msg_list => FND_API.G_FALSE,

1773:
1774: AHL_OSP_SHIPMENT_PUB.Process_Osp_SerialNum_Change
1775: (
1776: p_api_version => 1.0,
1777: p_init_msg_list => FND_API.G_FALSE,
1778: p_commit => FND_API.G_FALSE,
1779: p_serialnum_change_rec => l_serialnum_change_rec,
1780: x_return_status => l_return_status,
1781: x_msg_count => l_msg_count,

Line 1778: p_commit => FND_API.G_FALSE,

1774: AHL_OSP_SHIPMENT_PUB.Process_Osp_SerialNum_Change
1775: (
1776: p_api_version => 1.0,
1777: p_init_msg_list => FND_API.G_FALSE,
1778: p_commit => FND_API.G_FALSE,
1779: p_serialnum_change_rec => l_serialnum_change_rec,
1780: x_return_status => l_return_status,
1781: x_msg_count => l_msg_count,
1782: x_msg_data => l_msg_data

Line 1790: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

1786: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'After calling AHL_OSP_SHIPMENT_PUB.Process_Osp_SerialNum_Change');
1787: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'l_return_status: '||l_return_status);
1788: END IF;
1789:
1790: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1791: RAISE FND_API.G_EXC_ERROR;
1792: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1793: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1794: END IF;

Line 1791: RAISE FND_API.G_EXC_ERROR;

1787: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'l_return_status: '||l_return_status);
1788: END IF;
1789:
1790: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1791: RAISE FND_API.G_EXC_ERROR;
1792: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1793: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1794: END IF;
1795: --Retrieve the new return line id

Line 1792: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

1788: END IF;
1789:
1790: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1791: RAISE FND_API.G_EXC_ERROR;
1792: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1793: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1794: END IF;
1795: --Retrieve the new return line id
1796: OPEN get_oe_line_id(l_osp_line_id);

Line 1793: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1789:
1790: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1791: RAISE FND_API.G_EXC_ERROR;
1792: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1793: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1794: END IF;
1795: --Retrieve the new return line id
1796: OPEN get_oe_line_id(l_osp_line_id);
1797: FETCH get_oe_line_id INTO l_new_oe_line_id;

Line 1810: RAISE FND_API.G_EXC_ERROR;

1806: ELSE
1807: --Part number change cannot be performed for the return line.
1808: FND_MESSAGE.Set_Name('AHL','AHL_OSP_CHG_OSPL_INV');
1809: FND_MSG_PUB.ADD;
1810: RAISE FND_API.G_EXC_ERROR;
1811: END IF;
1812:
1813: ELSIF (l_exchange_flag) THEN
1814: --Exchange is being performed for the return line

Line 1836: p_init_msg_list => FND_API.G_FALSE,

1832: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'Before calling AHL_OSP_ORDERS_PVT.process_osp_order for order conversion');
1833: END IF;
1834: AHL_OSP_ORDERS_PVT.process_osp_order(
1835: p_api_version => 1.0,
1836: p_init_msg_list => FND_API.G_FALSE,
1837: p_commit => FND_API.G_FALSE,
1838: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1839: p_module_type => NULL,
1840: p_x_osp_order_rec => l_osp_order_rec,

Line 1837: p_commit => FND_API.G_FALSE,

1833: END IF;
1834: AHL_OSP_ORDERS_PVT.process_osp_order(
1835: p_api_version => 1.0,
1836: p_init_msg_list => FND_API.G_FALSE,
1837: p_commit => FND_API.G_FALSE,
1838: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1839: p_module_type => NULL,
1840: p_x_osp_order_rec => l_osp_order_rec,
1841: p_x_osp_order_lines_tbl => l_osp_order_lines_tbl,

Line 1838: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

1834: AHL_OSP_ORDERS_PVT.process_osp_order(
1835: p_api_version => 1.0,
1836: p_init_msg_list => FND_API.G_FALSE,
1837: p_commit => FND_API.G_FALSE,
1838: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1839: p_module_type => NULL,
1840: p_x_osp_order_rec => l_osp_order_rec,
1841: p_x_osp_order_lines_tbl => l_osp_order_lines_tbl,
1842: x_return_status => l_return_status,

Line 1851: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

1847: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'After calling AHL_OSP_ORDERS_PVT.process_osp_order for order conversion');
1848: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'l_return_status: '||l_return_status);
1849: END IF;
1850:
1851: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1852: RAISE FND_API.G_EXC_ERROR;
1853: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1854: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1855: END IF;

Line 1852: RAISE FND_API.G_EXC_ERROR;

1848: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'l_return_status: '||l_return_status);
1849: END IF;
1850:
1851: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1852: RAISE FND_API.G_EXC_ERROR;
1853: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1854: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1855: END IF;
1856: l_rma_line_canceled := true;

Line 1853: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

1849: END IF;
1850:
1851: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1852: RAISE FND_API.G_EXC_ERROR;
1853: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1854: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1855: END IF;
1856: l_rma_line_canceled := true;
1857: --Need to change the order type, if the conversion is indeed successful. Depending on the order type, the serial number/lot

Line 1854: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1850:
1851: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1852: RAISE FND_API.G_EXC_ERROR;
1853: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1854: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1855: END IF;
1856: l_rma_line_canceled := true;
1857: --Need to change the order type, if the conversion is indeed successful. Depending on the order type, the serial number/lot
1858: --number are dervived for receipt.

Line 1921: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,

1917: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'l_osp_order_line_rec.exchange_instance_id:'||l_osp_order_line_rec.exchange_instance_id);
1918: END IF;
1919: IF(nvl(l_derived_instance_id,-1) <> nvl(l_osp_order_line_rec.exchange_instance_id,-1)) THEN
1920: AHL_OSP_SHIPMENT_PUB.Delete_IB_Transaction(
1921: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
1922: p_commit => FND_API.G_FALSE,
1923: p_validation_level => p_validation_level,
1924: x_return_status => x_return_status,
1925: x_msg_count => x_msg_count,

Line 1922: p_commit => FND_API.G_FALSE,

1918: END IF;
1919: IF(nvl(l_derived_instance_id,-1) <> nvl(l_osp_order_line_rec.exchange_instance_id,-1)) THEN
1920: AHL_OSP_SHIPMENT_PUB.Delete_IB_Transaction(
1921: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
1922: p_commit => FND_API.G_FALSE,
1923: p_validation_level => p_validation_level,
1924: x_return_status => x_return_status,
1925: x_msg_count => x_msg_count,
1926: x_msg_data => x_msg_data,

Line 1944: p_init_msg_list => FND_API.G_FALSE, -- Don't initialize the Message List

1940:
1941: l_del_oe_lines_tbl(1) := p_rma_receipt_rec.return_line_id;
1942: AHL_OSP_SHIPMENT_PUB.Delete_Cancel_Order (
1943: p_api_version => 1.0,
1944: p_init_msg_list => FND_API.G_FALSE, -- Don't initialize the Message List
1945: p_commit => FND_API.G_FALSE, -- Don't commit independently
1946: p_oe_header_id => null, -- Not deleting the shipment header: Only the lines
1947: p_oe_lines_tbl => l_del_oe_lines_tbl, -- Lines to be deleted/Cancelled
1948: p_cancel_flag => FND_API.G_FALSE, -- Do Deletes if possible, Cancels if not

Line 1945: p_commit => FND_API.G_FALSE, -- Don't commit independently

1941: l_del_oe_lines_tbl(1) := p_rma_receipt_rec.return_line_id;
1942: AHL_OSP_SHIPMENT_PUB.Delete_Cancel_Order (
1943: p_api_version => 1.0,
1944: p_init_msg_list => FND_API.G_FALSE, -- Don't initialize the Message List
1945: p_commit => FND_API.G_FALSE, -- Don't commit independently
1946: p_oe_header_id => null, -- Not deleting the shipment header: Only the lines
1947: p_oe_lines_tbl => l_del_oe_lines_tbl, -- Lines to be deleted/Cancelled
1948: p_cancel_flag => FND_API.G_FALSE, -- Do Deletes if possible, Cancels if not
1949: x_return_status => l_return_status ,

Line 1948: p_cancel_flag => FND_API.G_FALSE, -- Do Deletes if possible, Cancels if not

1944: p_init_msg_list => FND_API.G_FALSE, -- Don't initialize the Message List
1945: p_commit => FND_API.G_FALSE, -- Don't commit independently
1946: p_oe_header_id => null, -- Not deleting the shipment header: Only the lines
1947: p_oe_lines_tbl => l_del_oe_lines_tbl, -- Lines to be deleted/Cancelled
1948: p_cancel_flag => FND_API.G_FALSE, -- Do Deletes if possible, Cancels if not
1949: x_return_status => l_return_status ,
1950: x_msg_count => l_msg_count ,
1951: x_msg_data => l_msg_data
1952: );

Line 1956: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

1952: );
1953: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1954: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Returned from Delete_Cancel_Order, l_return_status = ' || l_return_status);
1955: END IF;
1956: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1957: RAISE FND_API.G_EXC_ERROR;
1958: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1960: END IF;

Line 1957: RAISE FND_API.G_EXC_ERROR;

1953: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1954: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Returned from Delete_Cancel_Order, l_return_status = ' || l_return_status);
1955: END IF;
1956: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1957: RAISE FND_API.G_EXC_ERROR;
1958: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1960: END IF;
1961: l_rma_line_canceled := true;

Line 1958: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

1954: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Returned from Delete_Cancel_Order, l_return_status = ' || l_return_status);
1955: END IF;
1956: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1957: RAISE FND_API.G_EXC_ERROR;
1958: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1960: END IF;
1961: l_rma_line_canceled := true;
1962: END IF;--IF(l_oe_order_line_rec.inventory_item_id = p_rma_receipt_rec.EXCHANGE_ITEM_ID) THEN

Line 1959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1955: END IF;
1956: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1957: RAISE FND_API.G_EXC_ERROR;
1958: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1960: END IF;
1961: l_rma_line_canceled := true;
1962: END IF;--IF(l_oe_order_line_rec.inventory_item_id = p_rma_receipt_rec.EXCHANGE_ITEM_ID) THEN
1963: END IF;--IF(l_osp_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE) THEN

Line 1986: l_oe_line_tbl(1).line_id := FND_API.G_MISS_NUM;

1982:
1983: /* Create a new RMA Line, corresponding to the receipt */
1984: l_oe_line_tbl(1) := l_oe_line_rec;
1985: l_oe_line_tbl(1).inventory_item_id := p_rma_receipt_rec.EXCHANGE_ITEM_ID;
1986: l_oe_line_tbl(1).line_id := FND_API.G_MISS_NUM;
1987: l_oe_line_tbl(1).line_number := FND_API.G_MISS_NUM;
1988: l_oe_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
1989:
1990: IF(p_rma_receipt_rec.EXCHANGE_SERIAL_NUMBER is not NULL OR p_rma_receipt_rec.EXCHANGE_LOT_NUMBER is not NULL) THEN

Line 1987: l_oe_line_tbl(1).line_number := FND_API.G_MISS_NUM;

1983: /* Create a new RMA Line, corresponding to the receipt */
1984: l_oe_line_tbl(1) := l_oe_line_rec;
1985: l_oe_line_tbl(1).inventory_item_id := p_rma_receipt_rec.EXCHANGE_ITEM_ID;
1986: l_oe_line_tbl(1).line_id := FND_API.G_MISS_NUM;
1987: l_oe_line_tbl(1).line_number := FND_API.G_MISS_NUM;
1988: l_oe_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
1989:
1990: IF(p_rma_receipt_rec.EXCHANGE_SERIAL_NUMBER is not NULL OR p_rma_receipt_rec.EXCHANGE_LOT_NUMBER is not NULL) THEN
1991: --populate the lot_serial_rec

Line 1992: l_oe_lot_serial_tbl(1).lot_serial_id := FND_API.G_MISS_NUM;

1988: l_oe_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
1989:
1990: IF(p_rma_receipt_rec.EXCHANGE_SERIAL_NUMBER is not NULL OR p_rma_receipt_rec.EXCHANGE_LOT_NUMBER is not NULL) THEN
1991: --populate the lot_serial_rec
1992: l_oe_lot_serial_tbl(1).lot_serial_id := FND_API.G_MISS_NUM;
1993: l_oe_lot_serial_tbl(1).lot_number := p_rma_receipt_rec.exchange_lot_number;
1994: l_oe_lot_serial_tbl(1).from_serial_number := p_rma_receipt_rec.exchange_serial_number;
1995: l_oe_lot_serial_tbl(1).quantity := l_oe_line_rec.ordered_quantity;
1996: l_oe_lot_serial_tbl(1).line_index := 1;

Line 2006: p_init_msg_list => FND_API.G_TRUE,

2002: END IF;
2003:
2004: OE_ORDER_GRP.PROCESS_ORDER(
2005: p_api_version_number => 1.0,
2006: p_init_msg_list => FND_API.G_TRUE,
2007: x_return_status => x_return_status,
2008: x_msg_count => x_msg_count,
2009: x_msg_data => x_msg_data,
2010: p_header_rec => x_header_rec,

Line 2045: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2041: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Completed OE_ORDER_GRP.PROCESS_ORDER, x_return_status = ' || x_return_status);
2042: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'x_return_line_id = ' || x_return_line_id);
2043: END IF;
2044:
2045: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2046: FOR i IN 1..x_msg_count LOOP
2047: OE_MSG_PUB.Get(p_msg_index => i,
2048: p_encoded => FND_API.G_FALSE,
2049: p_data => l_msg_data,

Line 2048: p_encoded => FND_API.G_FALSE,

2044:
2045: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2046: FOR i IN 1..x_msg_count LOOP
2047: OE_MSG_PUB.Get(p_msg_index => i,
2048: p_encoded => FND_API.G_FALSE,
2049: p_data => l_msg_data,
2050: p_msg_index_out => l_msg_index_out);
2051: fnd_msg_pub.add_exc_msg(p_pkg_name => 'OE_ORDER_PUB',
2052: p_procedure_name => 'processOrder',

Line 2061: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN

2057:
2058: END LOOP;
2059: END IF;
2060:
2061: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
2062: RAISE FND_API.G_EXC_ERROR;
2063: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2064: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2065: END IF;

Line 2062: RAISE FND_API.G_EXC_ERROR;

2058: END LOOP;
2059: END IF;
2060:
2061: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
2062: RAISE FND_API.G_EXC_ERROR;
2063: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2064: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2065: END IF;
2066:

Line 2063: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

2059: END IF;
2060:
2061: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
2062: RAISE FND_API.G_EXC_ERROR;
2063: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2064: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2065: END IF;
2066:
2067: /* Update the osp_line with the new RMA line id*/

Line 2064: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2060:
2061: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
2062: RAISE FND_API.G_EXC_ERROR;
2063: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2064: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2065: END IF;
2066:
2067: /* Update the osp_line with the new RMA line id*/
2068: OPEN get_same_phyitem_order_lines(l_osp_line_id);

Line 2078: p_oe_ship_line_id => FND_API.G_MISS_NUM ,

2074: END IF;
2075: Update_OSP_Order_Lines(
2076: p_osp_order_id => l_osp_order_id,
2077: p_osp_line_id => l_same_ser_ospline_id,
2078: p_oe_ship_line_id => FND_API.G_MISS_NUM ,
2079: p_oe_return_line_id => x_return_line_id);
2080: END LOOP;
2081: CLOSE get_same_phyitem_order_lines;
2082: END IF;--IF(l_rma_line_canceled) THEN

Line 2106: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,

2102: END IF;
2103:
2104: /* Create the new IB transaction */
2105: AHL_OSP_SHIPMENT_PUB.Create_IB_Transaction(
2106: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
2107: p_commit => FND_API.G_FALSE,
2108: p_validation_level => p_validation_level,
2109: x_return_status => l_return_status,
2110: x_msg_count => l_msg_count,

Line 2107: p_commit => FND_API.G_FALSE,

2103:
2104: /* Create the new IB transaction */
2105: AHL_OSP_SHIPMENT_PUB.Create_IB_Transaction(
2106: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
2107: p_commit => FND_API.G_FALSE,
2108: p_validation_level => p_validation_level,
2109: x_return_status => l_return_status,
2110: x_msg_count => l_msg_count,
2111: x_msg_data => l_msg_data,

Line 2121: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

2117: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2118: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Return status from Create_IB_Transaction: ' || l_return_status);
2119: END IF;
2120:
2121: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
2122: RAISE FND_API.G_EXC_ERROR;
2123: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2124: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2125: END IF;

Line 2122: RAISE FND_API.G_EXC_ERROR;

2118: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Return status from Create_IB_Transaction: ' || l_return_status);
2119: END IF;
2120:
2121: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
2122: RAISE FND_API.G_EXC_ERROR;
2123: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2124: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2125: END IF;
2126:

Line 2123: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

2119: END IF;
2120:
2121: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
2122: RAISE FND_API.G_EXC_ERROR;
2123: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2124: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2125: END IF;
2126:
2127: END IF;--IF(l_is_ib_trackable = 'Y' AND (l_rma_line_canceled OR l_ib_trans_deleted)) THEN

Line 2124: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2120:
2121: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
2122: RAISE FND_API.G_EXC_ERROR;
2123: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2124: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2125: END IF;
2126:
2127: END IF;--IF(l_is_ib_trackable = 'Y' AND (l_rma_line_canceled OR l_ib_trans_deleted)) THEN
2128:

Line 2495: p_encoded => FND_API.G_FALSE

2491: -- Standard call to get message count and initialise the OUT parameters.
2492: FND_MSG_PUB.Count_And_Get
2493: ( p_count => x_msg_count,
2494: p_data => x_msg_data,
2495: p_encoded => FND_API.G_FALSE
2496: );
2497:
2498: -- Commit work if p_commit is TRUE.
2499: IF FND_API.TO_BOOLEAN(p_commit) THEN

Line 2499: IF FND_API.TO_BOOLEAN(p_commit) THEN

2495: p_encoded => FND_API.G_FALSE
2496: );
2497:
2498: -- Commit work if p_commit is TRUE.
2499: IF FND_API.TO_BOOLEAN(p_commit) THEN
2500: COMMIT WORK;
2501: END IF;
2502:
2503: IF (FND_LOG.level_procedure >= FND_LOG.g_current_runtime_level) THEN

Line 2509: WHEN FND_API.G_EXC_ERROR THEN

2505: ' x_request_id: '||x_request_id||
2506: ', x_return_line_id: '||x_return_line_id);
2507: END IF;
2508: EXCEPTION
2509: WHEN FND_API.G_EXC_ERROR THEN
2510: ROLLBACK TO Receive_Against_RMA_Pvt;
2511: x_return_status := FND_API.G_RET_STS_ERROR;
2512: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2513: p_data => x_msg_data,

Line 2511: x_return_status := FND_API.G_RET_STS_ERROR;

2507: END IF;
2508: EXCEPTION
2509: WHEN FND_API.G_EXC_ERROR THEN
2510: ROLLBACK TO Receive_Against_RMA_Pvt;
2511: x_return_status := FND_API.G_RET_STS_ERROR;
2512: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2513: p_data => x_msg_data,
2514: p_encoded => FND_API.G_FALSE);
2515:

Line 2514: p_encoded => FND_API.G_FALSE);

2510: ROLLBACK TO Receive_Against_RMA_Pvt;
2511: x_return_status := FND_API.G_RET_STS_ERROR;
2512: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2513: p_data => x_msg_data,
2514: p_encoded => FND_API.G_FALSE);
2515:
2516: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2517: ROLLBACK TO Receive_Against_RMA_Pvt;
2518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2516: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2512: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2513: p_data => x_msg_data,
2514: p_encoded => FND_API.G_FALSE);
2515:
2516: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2517: ROLLBACK TO Receive_Against_RMA_Pvt;
2518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2519: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2520: p_data => x_msg_data,

Line 2518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2514: p_encoded => FND_API.G_FALSE);
2515:
2516: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2517: ROLLBACK TO Receive_Against_RMA_Pvt;
2518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2519: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2520: p_data => x_msg_data,
2521: p_encoded => FND_API.G_FALSE);
2522:

Line 2521: p_encoded => FND_API.G_FALSE);

2517: ROLLBACK TO Receive_Against_RMA_Pvt;
2518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2519: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2520: p_data => x_msg_data,
2521: p_encoded => FND_API.G_FALSE);
2522:
2523: WHEN OTHERS THEN
2524: ROLLBACK TO Receive_Against_RMA_Pvt;
2525: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2525: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2521: p_encoded => FND_API.G_FALSE);
2522:
2523: WHEN OTHERS THEN
2524: ROLLBACK TO Receive_Against_RMA_Pvt;
2525: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2526: FND_MSG_PUB.Add_Exc_Msg( p_pkg_name => G_PKG_NAME,
2527: p_procedure_name => l_api_name,
2528: p_error_text => SQLERRM);
2529:

Line 2532: p_encoded => FND_API.G_FALSE);

2528: p_error_text => SQLERRM);
2529:
2530: FND_MSG_PUB.Count_And_Get( p_count => x_msg_count,
2531: p_data => x_msg_data,
2532: p_encoded => FND_API.G_FALSE);
2533: END Receive_Against_RMA;
2534:
2535:
2536: -- Start of Comments --

Line 2810: RAISE FND_API.G_EXC_ERROR;

2806: FND_LOG.string(FND_LOG.level_statement, l_debug_key,
2807: 'As l_valid_flag is FALSE, raising an exception.');
2808: END IF;
2809:
2810: RAISE FND_API.G_EXC_ERROR;
2811: END IF;
2812: END Validate_Receiving_Params;
2813:
2814:

Line 2909: RAISE Fnd_Api.g_exc_error;

2905: IF (val_exg_instance_id_csr %NOTFOUND) THEN
2906: FND_MESSAGE.Set_Name('AHL','AHL_OSP_SHIP_COMPONENT');
2907: FND_MSG_PUB.ADD;
2908: CLOSE val_exg_instance_id_csr;
2909: RAISE Fnd_Api.g_exc_error;
2910: END IF;
2911: CLOSE val_exg_instance_id_csr;
2912: END IF;
2913:

Line 2969: RAISE Fnd_Api.g_exc_error;

2965:
2966: IF l_row_check = 'N' THEN
2967: Fnd_Message.set_name('AHL', 'AHL_OSP_INVALID_LINE_ITEM');
2968: Fnd_Msg_Pub.ADD;
2969: RAISE Fnd_Api.g_exc_error;
2970: END IF;
2971:
2972: END Update_OSP_Line_Exch_Instance;
2973:

Line 3047: AND p_oe_ship_line_id <> FND_API.G_MISS_NUM) THEN

3043: FOR l_osp_line_rec IN ahl_osp_lines_csr(p_osp_order_id, p_osp_line_id)
3044: LOOP
3045: l_row_check := 'Y';
3046: IF ( p_oe_ship_line_id IS NOT NULL
3047: AND p_oe_ship_line_id <> FND_API.G_MISS_NUM) THEN
3048: l_oe_ship_line_id := p_oe_ship_line_id;
3049: ELSE
3050: l_oe_ship_line_id := l_osp_line_rec.oe_ship_line_id;
3051: END IF;

Line 3054: AND p_oe_return_line_id <> FND_API.G_MISS_NUM) THEN

3050: l_oe_ship_line_id := l_osp_line_rec.oe_ship_line_id;
3051: END IF;
3052:
3053: IF (p_oe_return_line_id IS NOT NULL
3054: AND p_oe_return_line_id <> FND_API.G_MISS_NUM) THEN
3055: l_oe_return_line_id := p_oe_return_line_id;
3056: ELSE
3057: l_oe_return_line_id := l_osp_line_rec.oe_return_line_id;
3058: END IF;

Line 3111: RAISE Fnd_Api.g_exc_error;

3107:
3108: IF l_row_check = 'N' THEN
3109: Fnd_Message.set_name('AHL', 'AHL_OSP_INVALID_LINE_ITEM');
3110: Fnd_Msg_Pub.ADD;
3111: RAISE Fnd_Api.g_exc_error;
3112: END IF;
3113:
3114: END Update_OSP_Order_Lines;
3115:

Line 3198: x_return_status := FND_API.G_RET_STS_SUCCESS;

3194: FND_LOG.STRING(FND_LOG.level_procedure, l_debug_key, 'RECEIVING_LOCATOR_NAME:'||p_rma_receipt_rec.RECEIVING_LOCATOR_NAME);
3195: END IF;
3196:
3197: -- Initialize Procedure return status to success.
3198: x_return_status := FND_API.G_RET_STS_SUCCESS;
3199:
3200: -- Check for necessary fields.
3201: IF (p_rma_receipt_rec.receiving_org_id IS NULL OR p_rma_receipt_rec.receiving_subinventory IS NULL) THEN
3202: -- Add an error message to the FND stack.

Line 3209: x_return_status := FND_API.G_RET_STS_ERROR;

3205: 'Mandatory fields have not been entered.');
3206: END IF;
3207: FND_MESSAGE.set_name('AHL', 'AHL_COM_REQD_PARAM_MISSING'); -- Required parameter is missing.
3208: FND_MSG_PUB.ADD;
3209: x_return_status := FND_API.G_RET_STS_ERROR;
3210: RETURN;
3211: END IF;
3212:
3213: l_receiving_locator_name := p_rma_receipt_rec.receiving_locator_name;

Line 3221: AND l_receiving_locator_name <> FND_API.G_MISS_CHAR) THEN -- locator name

3217: 'Return value for Locator id is set using the record, IN param : '||x_receiving_locator_id);
3218: END IF;
3219:
3220: IF (l_receiving_locator_name IS NOT NULL
3221: AND l_receiving_locator_name <> FND_API.G_MISS_CHAR) THEN -- locator name
3222: OPEN is_valid_locator(p_rma_receipt_rec.receiving_org_id
3223: ,l_receiving_locator_name);
3224: FETCH is_valid_locator INTO x_receiving_locator_id,l_receiving_locator_name, l_sub_inv_code;
3225: IF (is_valid_locator%FOUND) THEN -- locator exists

Line 3234: x_return_status := FND_API.G_RET_STS_ERROR;

3230: ||l_sub_inv_code);
3231: END IF;
3232: FND_MESSAGE.set_name('AHL', 'AHL_OSP_RMA_INV_LOC'); -- The receiving locator is invalid.
3233: FND_MSG_PUB.ADD;
3234: x_return_status := FND_API.G_RET_STS_ERROR;
3235: CLOSE is_valid_locator;
3236: RETURN;
3237: ELSE
3238: IF (FND_LOG.level_statement >= FND_LOG.g_current_runtime_level) THEN

Line 3289: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

3285: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'After calling inv_loc_wms_pub.create_locator');
3286: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'x_return_status: '||x_return_status);
3287: END IF;
3288:
3289: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3290: x_receiving_locator_id := l_locator_id;
3291: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3292: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_debug_key, 'New Locator'|| l_locator_id || ' created in '
3293: || p_rma_receipt_rec.receiving_subinventory);

Line 3304: x_return_status := FND_API.G_RET_STS_ERROR;

3300: ||p_rma_receipt_rec.receiving_subinventory);
3301: END IF;
3302: FND_MESSAGE.set_name('AHL', 'AHL_OSP_RMA_INV_LOC'); -- The receiving locator is invalid.
3303: FND_MSG_PUB.ADD;
3304: x_return_status := FND_API.G_RET_STS_ERROR;
3305: CLOSE is_dyn_locator_sub_inv;
3306: CLOSE is_valid_locator;
3307: RETURN;
3308: END IF; -- dynamic locator Sub Inv