Amazon Recomendations

Tuesday, February 20, 2024

SAOP API to Update Descriptive Flexfield on Financial entities at Oracle Fusion

Lately, we have been required to update several Financial entities' (namely Receivables and Payables)  DFFs. Our need came from the new requirement from the Israel Tax Authority for the AP and AR Invoices to our client. Every invoice will be reported LIVE to the IRS and a unique authorization code will be provided back to the client. Subsequently, Oracles' localization team provided Global DFF segments to store those codes.

Unfortunately, an EDIT part of those DFF segments was entirely missing from the corresponding entities' REST APIs. (I believe there is an improvement request already at Metalink)

Following a short search on the Web, I came upon a SOAP service Oracle provided for that very purpose:

https://docs.oracle.com/en/cloud/saas/financials/23d/oeswf/erpobjectdescriptiveflexfieldupdateservice-d16476e12.html#u30243261

Plus there is a Note at Metalink that provides more technical insight on the matter:

How to Update DFF - Descriptive Flexfields Within an Invoice using updateDffEntityDetails? (Doc ID 2482375.1)

I would like to share step-by-step implementation inside the OIC (Oracle Integration Cloud) we have been using.

1. Confirm the DFFs and Localizations' Context in your system:

Oracle established that the IRS Authorization code would be stored in GLOBAL_ATTRIBUTE2 under the VAT Reporting for Israel regional context:






2. Create a suitable connection in OIC as per Oracles documentation mentioned above:











3. The following is a basic (working!) Request for the API calls in your integrations:

AP Invoice Payload example:

<updateDffEntityDetails xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" 
......... xmlns="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/">
  <nstrgmpr:Body>
    <tns:updateDffEntityDetails>
      <tns:operationMode>SINGLE</tns:operationMode>
      <tns:object>
        <ns1:EntityName>Payables Invoice</ns1:EntityName>
        <ns1:ContextValue>JE_IL_VAT_REPORTING</ns1:ContextValue>
        <ns1:UserKeyA>1302</ns1:UserKeyA>
        <ns1:UserKeyD>300000026329373</ns1:UserKeyD>
        <ns1:DFFAttributes>{"GLOBAL_ATTRIBUTE2":"234233333333333"}</ns1:DFFAttributes>
      </tns:object>
    </tns:updateDffEntityDetails>
  </nstrgmpr:Body>
</updateDffEntityDetails>

According to Oracles documentation, currently, only the SINGLE mode is supported. Context is an absolute MUST - provide a correct code, if no context is defined use #NULL. 
***UserKeysA and UserKeysD are invoice_number and invoice_id accordingly. 
Make sure to follow the exact syntax as above for DFFAttributes, should you need to update more than one attribute, list them within the brackets separated by a comma: {"ATTRIBUTE1":"BlahBlah", .., "ATTRIBUTE(N)":"BlahBlah"}.

***Following the issue we have been facing lately - multiple AP Invoices bearing the same Invoice_Number (invoices originated from different vendors). Oracle provided more specific instructions regarding data passed to API as per SR 3-36709718271 I logged at Oracle Support:

Please follow the template below for Invoices with the same number:
====
User Key Details for the Payables Invoice Entity Name.
User Key
Details
User Key A Invoice Number *
User Key B Business Unit Name **
User Key C Supplier Name **
User Key D Supplier Number **
User Key E Supplier Site Name **
User Key F Invoice Identifier (Invoice_Id)
User Key G null
User Key H null
* Mandatory
** Needed if there are multiple invoices with the same number

To stay on the SAFE side - populate the Keys from A to E:

<nstrgmpr:Body>
<tns:updateDffEntityDetails>
<tns:operationMode>SINGLE</tns:operationMode>
<tns:object>
<ns1:EntityName>Payables Invoice</ns1:EntityName>
<ns1:ContextValue>JE_IL_VAT_REPORTING</ns1:ContextValue>
<ns1:UserKeyA>Invoice_Number</ns1:UserKeyA>
<ns1:UserKeyB>Organization BU</ns1:UserKeyB>
<ns1:UserKeyC>Vendor Name</ns1:UserKeyC>
<ns1:UserKeyD>Vendor Number</ns1:UserKeyD>
<ns1:UserKeyE>Vendor Site</ns1:UserKeyE>
<ns1:DFFAttributes>{"GLOBAL_ATTRIBUTE2":"2842888888888888"}</ns1:DFFAttributes>
</tns:object>
</tns:updateDffEntityDetails>
</nstrgmpr:Body>


It generally throws exceptions if something is amiss but the best indication of a successful execution is result =1 in Response:

<ns0:updateDffEntityDetailsResponse xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/">
  <result xmlns="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/">1</result>
</ns0:updateDffEntityDetailsResponse>

Naturally, the same syntax would work for the Receivables Invoice entity as well.

enjoy



No comments:

Post a Comment