This content has been marked as final. Show 2 replies
1. Answer is YES. You can add a line to an existing standard purchase order by choosing the UPDATE. This can be done through Purchase Documents Open Interface.
I can not give an example. It's quite long to write it. But You should use Open interface user guide to find nessesary columns. Just insert new row with status UPDATE and try to import
2. Think You can NOT.
3. Answer is YES. You can do it. Use "Cancel PO API". Function name is PO_Document_Control_PUB.control_document ().
For technical details read Open interface UG.
You must create exception to be avoid problems if some lines can not be canceled.
4. Answer is YES. You can do it if there's still expected quantity to recive.
boldJust from UG:*bold* :)
bold1. Purchase Order Change APIs. bold
boldThe APIs enable you to do the following*bold*:
- Record Acceptance/Rejection in Oracle Purchasing
- Update quantity, price, and promise date on standard purchase orders or releases in Oracle Purchasing
boldSo only qty, promissed date, price*bold*
Line Level Validation and Update: This logic occurs when LINE_NUM is not null
and SHIPMENT_NUM is null.
1. No update occurs if the line status is FINALLY CLOSED or CANCELLED.
2. The new quantity or price value must be positive.
3. If updating quantity, the new quantity must be greater than or equal to the
greater of total quantity_received of all shipments and total quantity_billed
of all shipments for this line. After the update takes place, the new quantity
will be prorated at the shipment level and for each shipment the quantity is
prorated at the distribution level if applicable.
4. If updating price, no update occurs if a receipt has been created against one
of the line’s shipments and it's been accrued upon receipt. No update
occurs if an invoice has been created against one of the line’s shipments.
After a price update takes place, price changes are rolled down to the
shipment level for standard POs. No price update occurs for a release if the
Price Override flag on the blanket purchase agreement Line is No.
boldYou can update qty if still there's a qty to receive (Expected) and if PO still is not canceled*bold*
set serveroutput on;
-- After the API completes, do not forget to commit if the result is 1
-- and rollback if the result is 0.
-- This needs to be changed according to your environment setup.
FND_GLOBAL.apps_initialize ( user_id => 1318, resp_id => 50578, resp_appl_id => 201 );
-- Record an acceptance of Y for PO 1261.
l_result := PO_CHANGE_API1_S.record_acceptance(
x_po_number => 1261,
x_release_number => null,
x_revision_number => 0,
x_action => 'NEW',
x_action_date => null,
x_employee_id => 588,
x_accepted_flag => 'Y',
x_acceptance_lookup_code => 'On Schedule',
x_note => 'All valid',
x_interface_type => 'APITEST',
x_transaction_id => null,
version => '1.0');
IF (l_result <> 1) THEN
-- Handle the errors in the PO_INTERFACE_ERRORS table.
-- Change the quantity to 5 on line 1, shipment 1 of PO 1263.
l_result := PO_CHANGE_API1_S.update_po (
x_po_number => 1263,
x_release_number => 1,
x_revision_number => 1,
x_line_number => 1,
x_shipment_number => 1,
new_quantity => 5,
new_price => NULL,
new_promised_date => NULL,
update_source => NULL,
version => '1.0',
x_override_date => NULL,
x_api_errors => l_api_errors,
p_buyer_name => null
IF (l_result <> 1) THEN
-- Display the errors
FOR i IN 1..l_api_errors.message_text.COUNT LOOP
dbms_output.put_line ( l_api_errors.message_text(i) );
Thank you Eugene
Kind regards - Hugues