97: EXCEPTION
98: WHEN OTHERS THEN
99: add_error_to_msg_list ( p_api_name => l_api_name,
100: p_message => 'An exception Occurred ');
101: RAISE FND_API.G_EXC_ERROR;
102: END;
103:
104:
105: -- bug 5255550 : Reschedule API rewrite
185: add_error_to_msg_list (
186: p_api_name => l_api_name,
187: p_message => 'Incorrect format for supply number: '||x_supply_number
188: );
189: RAISE FND_API.G_EXC_ERROR;
190: end if;
191:
192: select to_number(substr(x_supply_number, x_pare_left+1,
193: x_pare_right - x_pare_left-1))
219: add_error_to_msg_list (
220: p_api_name => l_api_name,
221: p_message => 'Incorrect format for supply number: '||x_supply_number
222: );
223: RAISE FND_API.G_EXC_ERROR;
224: end;
225: end if;
226:
227: l_progress:= '040';
260: add_error_to_msg_list (
261: p_api_name => l_api_name,
262: p_message => 'Could not obtain the document operating unit.'
263: );
264: RAISE FND_API.G_EXC_ERROR;
265: END;
266: /*STEP 3: get all the shipments */
267:
268: /* It is not possible to use forall, and bulk collect simultaneously.
448: -- debug
449: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status', l_return_status);
450: -- debug
451:
452: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
453: RAISE FND_API.G_EXC_ERROR;
454: END IF;
455: END IF;
456: -- Construct the shipment changes object.
449: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status', l_return_status);
450: -- debug
451:
452: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
453: RAISE FND_API.G_EXC_ERROR;
454: END IF;
455: END IF;
456: -- Construct the shipment changes object.
457: /*Bug 5633563
493: /*Step 7: Call update_documents; */
494: l_progress:= '150';
495: PO_DOCUMENT_UPDATE_PVT.update_document(
496: p_api_version => 1.0,
497: p_init_msg_list => FND_API.G_TRUE,
498: x_return_status => l_return_status,
499: p_changes => l_changes,
500: p_run_submission_checks => FND_API.G_FALSE,
501: p_launch_approvals_flag => FND_API.G_TRUE,
496: p_api_version => 1.0,
497: p_init_msg_list => FND_API.G_TRUE,
498: x_return_status => l_return_status,
499: p_changes => l_changes,
500: p_run_submission_checks => FND_API.G_FALSE,
501: p_launch_approvals_flag => FND_API.G_TRUE,
502: p_buyer_id => NULL,
503: p_update_source => NULL,
504: p_override_date => NULL,
497: p_init_msg_list => FND_API.G_TRUE,
498: x_return_status => l_return_status,
499: p_changes => l_changes,
500: p_run_submission_checks => FND_API.G_FALSE,
501: p_launch_approvals_flag => FND_API.G_TRUE,
502: p_buyer_id => NULL,
503: p_update_source => NULL,
504: p_override_date => NULL,
505: x_api_errors => l_api_errors
511: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After return from update document');
512: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status', l_return_status);
513: -- debug
514:
515: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
516: -- PO Change API returned some errors. Add them to the API message list.
517: FND_MSG_PUB.initialize;
518: FOR i IN 1..l_api_errors.message_text.COUNT LOOP
519: add_error_to_msg_list ( p_api_name => l_api_name,
518: FOR i IN 1..l_api_errors.message_text.COUNT LOOP
519: add_error_to_msg_list ( p_api_name => l_api_name,
520: p_message => l_api_errors.message_text(i) );
521: END LOOP;
522: RAISE FND_API.G_EXC_ERROR;
523: END IF;
524:
525: l_progress:= '160';
526: -- debug
546: return TRUE;
547:
548:
549: EXCEPTION
550: WHEN FND_API.G_EXC_ERROR THEN
551: -- Set the org context back to the original operating unit.
552: IF (l_original_org_context IS NOT NULL) THEN
553: PO_MOAC_UTILS_PVT.set_org_context(l_original_org_context) ; --
554: END IF;
605: l_log_head CONSTANT VARCHAR2(200) := g_module_prefix || l_api_name;
606: l_progress VARCHAR2(3);
607: BEGIN
608: -- Bug 5255550
609: x_return_status := FND_API.G_RET_STS_SUCCESS;
610: l_progress:= '000';
611: PO_DEBUG.debug_begin(l_log_head);
612:
613: --SQL What: line_location_id, query out
629: PO_DEBUG.debug_end(l_log_head);
630:
631: EXCEPTION
632: WHEN OTHERS THEN
633: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
634: FND_MSG_PUB.initialize;
635: add_error_to_msg_list (
636: p_api_name => l_api_name,
637: p_message => 'Can not update estimated_pickup_date and ship_method on requisitions');