Total Pageviews

September 25, 2015

9/25/2015 12:16:00 PM
The Change Purchase Orders APIs provides the following public procedures:
 record_acceptance - Record the acceptance or rejection of a purchase order by a supplier.
 update_po -
Update a standard purchase order or release changes of quantity, price, and promise date.


DECLARE
   result   NUMBER := NULL;
BEGIN
   -- Do not forget to commit after the result returns 0 and rollback if result returns 1.
   -- This needs to change as per your application.
   fnd_global.apps_initialize (1318, 50578, 201);
   result :=
      PO_CHANGE_API1_S.record_acceptance (1261,                       --po num
                                          NULL,                 -- release num
                                          0,                   -- revision num
                                          ’NEW’,                     -- action
                                          NULL,                 -- action date
                                          588,                  -- employee_id
                                          'N',                -- accepted flag
                                          'On Schedule', -- acceptance lookup code
                                          'All valid',                 -- note
                                          'APITEST',         --- interfacetype
                                          NULL,              -- transaction_id
                                          '1.0');               -- api version
   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;




The API will return a numeric zero if the update was successful and a numeric one if some error was encountered. When an error is encountered the APIs will update the PO_INTERFACE_ERRORS table with the detailed error messages. You can view transactions that failed validation by running the Purchasing Interface Errors Report.
 
 
Related Posts Plugin for WordPress, Blogger...