Tuesday, October 12, 2010

PO Change API

This API is used to make any changes in the existing purchase order details

declare
result number := null;
begin
-- 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,-- revision
1,-- line num
1, -- shipment num
5,-- qty
null, -- price
null, -- date
'Y', -- launch approvals
null, -- update source
'APITEST', -- interface type
null, -- txn id
'1.0'); -- version

dbms_output.put_line('result:'result);
EXCEPTION
WHEN OTHERS THEN
raise;
end;

Parameter Description

PO_NUM:
Purchase order number.
RELEASE_NUM:
Required if the purchase order is a release. The pass-in value must be a number.
REVISION_NUM:
Which revision of the purchase order/release is being acted upon.
LINE_NUM:
Purchase order line number to update.
SHIPMENT_NUM:
If provided, indicates the update occurs at shipment level, otherwise it's at line level
NEW_QUANTITY:
Indicates the new value of quantity ordered that the order should be updated to
NEW_PRICE:
Indicates the new value of unit price that the order should be updated to.
NEW_PROMISED_DATE:
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'
LAUNCH_APPROVALS_FLAG:
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'.
SOURCE_OF_UPDATE:
Reserved for future use to record the source of the update. Purchase Order Change APIs
TRANSACTION_ID:
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:
Version of the current API (currently 1.0)

/

No comments:

Post a Comment