This API is used to make any changes in the existing purchase order details
result number := null;
-- Do not forget to commit after the result returns 1
-- and rollback if result returns 0.
-- This needs to change as per your application.
fnd_global.apps_initialize(1318, 50578, 201);
result := PO_CHANGE_API1_S.update_po(
1263, -- po num
1, -- release num
1,-- line num
1, -- shipment num
null, -- price
null, -- date
'Y', -- launch approvals
null, -- update source
'APITEST', -- interface type
null, -- txn id
'1.0'); -- version
WHEN OTHERS THEN
Purchase order number.
Required if the purchase order is a release. The pass-in value must be a number.
Which revision of the purchase order/release is being acted upon.
Purchase order line number to update.
If provided, indicates the update occurs at shipment level, otherwise it's at line level
Indicates the new value of quantity ordered that the order should be updated to
Indicates the new value of unit price that the order should be updated to.
Indicates the new value of promised date that the order should be updated to. Must be in the format of 'MM/DD/YY' or 'MM-DD-YY'
Indicates if you want to launch APPROVAL workflow after the update. Its value could be either 'Y' or 'N'. If not provided, the default value is 'N'.
Reserved for future use to record the source of the update. Purchase Order Change APIs
Used to fetch any error messages recorded in PO_INTERFACE_ERRORS table if the update process fails. If not provided, a default value will be used.
Version of the current API (currently 1.0)
That's really nice work... I have a requirement to update PO Line quantity, when the line has multiple shipments. If I given the shipment number in the above api call, the qty is getting updated at shipment level and doesn't reflecting back the sum of shipment qty at PO Line level.
If I pass the shipment number as NULL, then it is giving the error message like below:
"To change the quantity or amount on a line with multiple shipments, you must also specify quantity or amount on one or more shipments".
It would be great, if you share some info.. on how to update PO Line qty in this case.