Wednesday, October 05, 2016

Purchasing API Example: PO_CHANGE_API1_S.update_po


I had to modify deliver to location and PO distribution DFF on multiple purchase orders. All those purchase orders had "Authorization Status" as "Approved". I thought of using Oracle Purchasing API PO_CHANGE_API1_S.update_po. It was not easy to use this API for following reasons.

  1. API did not allow update of Deliver to location although Purchase Orders form allows update of deliver to location.

  2. Handling of DFF update has bugs. When I updated flexfield, I got following error
    The flexfield on this field contains a flexfield bind variable with a :BLOCK.FIELD reference. This prohibits operation in the mode that optimizes performance over a wide-area network. To continue using this form, have the system administrator either remove all :BLOCK.FIELD references, or turn off wide area operation by setting the profile option - Flexfields: Validate on Server to N. The reference may be in a WHERE_CLAUSE token passed into the flexfield definition in the form, a WHERE clause in a table-validated value set, or a default value for one of the segments of this flexfield.

    We could not update PO distribution DFF to remove :block.field references. By setting profile option "Flexfields:Validate On Server" to "No" did not help. Refer to FLEXFIELDS: Validate on Server Profile Option (Doc ID 273044.1) for more information on this profile option.
Since I had created a test script so I tried to see how it works by updating PO description, item description.

Updating PO Line quantity worked very well. When I updated line quantity, it updated shipment quantity and distribution quantity too. I was thinking that I have provide these values in shipment and distribution records. Sample is given below. If you a better way to initialize TYPE PO_PUB_UPDATE_REC_TYPE, please let me know.

3 comments:

  1. Bhayya , did you test/try it? it will not work.

    ReplyDelete
  2. Did you try/test this? it will not work first there is no API with this name.
    If you try pls tell me.

    ReplyDelete
    Replies
    1. Bhayya , use this API- PO_DOCUMENT_UPDATE_GRP.UPDATE_DOCUMENT. it works.
      and I tried it.

      Delete