on 03-17-2021 12:58 PM
Hi,
I am trying to park a supplier invoice for which only header data is available, no item data is added, using odata API API_SUPPLIERINVOICE_PROCESS_SRV.
Below an example:
{ "CompanyCode": "BE10",
"DocumentDate": "2021-03-12T00:00",
"PostingDate": "2021-03-12T00:00",
"SupplierInvoiceIDByInvcgParty": "Test SDW 2",
"InvoicingParty": "1001242",
"DocumentCurrency": "EUR",
"InvoiceGrossAmount": "112.00",
"SupplierInvoiceStatus": "A",
"SupplierInvoiceIsCreditMemo": "",
"TaxDeterminationDate": "2021-03-12T00:00",
"AccountingDocumentType": "RE",
"TaxIsCalculatedAutomatically": true }
However, when posting, I get the error: The requested service is not supported by entity CDS~A_SUPPLIERINVOICE
How to park this invoice in S4 HANA Cloud?
Hi Stephanie
Parking an invoice is not yet supported in the Odata API. You can use the SOAP service II_IVE_SUPLRINVCERPCRTRC instead. With this service you can hold/park invoices. The SOAP API is in the same communication arrangement as the OData service (SAP_COM_0057).
https://api.sap.com/api/ECC_SUPLRINVCERPCRTRC/overview
Kind regards
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Brian,
thanks for this answer.
Is there a plan / release date when the feature "Parking an Invoice" will be available for the SupplierInvoice ODATA API (SAP_COM_0057)?
It would be very important for us, as we are using the odata api more and more and this feature is needed.
Thanks in advance!
Regards
Stephan
Hi Stephan
You will be glad to know that the functionality has already been delivered in the meantime.
Setting the “SupplierInvoiceStatus” in the header, the way you did before will now work.
The value “A” would result in a parked invoice and the value “B” would result in parked and completed invoice.
I tested it with this sample payload below.
Kind regards
Brian
Sample payload
/sap/opu/odata/sap/API_SUPPLIERINVOICE_PROCESS_SRV/A_SupplierInvoice
{
"d" : {
"PaymentTerms" : "",
"DueCalculationBaseDate" : "2022-02-04T00:00",
"NetPaymentDays" : "0",
"FiscalYear" : "2022",
"AccountingDocumentType" : "",
"CompanyCode" : "1010",
"TaxDeterminationDate" : "2022-02-04T00:00",
"SupplierInvoiceStatus" : "A",
"TaxIsCalculatedAutomatically" : true,
"DocumentDate" : "2022-02-04T00:00",
"PostingDate" : "2022-02-04T00:00",
"SupplierInvoiceIDByInvcgParty" : "SAPTest1",
"InvoicingParty" : "10300006",
"DocumentCurrency" : "EUR",
"InvoiceGrossAmount" : "100.00",
"to_SuplrInvcItemPurOrdRef" : {
"results" : [
{
"TaxCode" : "V0",
"DocumentCurrency" : "EUR",
"SupplierInvoiceItemAmount" : "100.00",
"PurchaseOrderQuantityUnit" : "AU",
"QuantityInPurchaseOrderUnit" : "1",
"FiscalYear" : "2022",
"IsNotCashDiscountLiable" : false,
"SupplierInvoiceItem" : "1",
"PurchaseOrder" : "4500005211",
"PurchaseOrderItem" : "10"
}
]
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Brian,
thanks a lot! It worked with the status "A".
I have another question considering the API for Supplier Invoice.
Is it possible to change the "SupplierInvoiceStatus" for an existing invoice (for example from "parked" (A) to posted)?
I did not find any API Call for this in the API Business Hub.
Thanks in advance!
Kind Regards
Stephan
Hi Stephan
With the API you can delete a parked invoice or cancel a posted invoice but not change them.
Examples:
DELETE parked invoice
DELETE OPERATION
/sap/opu/odata/SAP/API_SUPPLIERINVOICE_PROCESS_SRV/A_SupplierInvoice(SupplierInvoice='5105602353',FiscalYear='2022')
Cancel posted invoice
POST OPERATION
/sap/opu/odata/SAP/API_SUPPLIERINVOICE_PROCESS_SRV/Cancel?SupplierInvoice='5105602353'&FiscalYear='2022'&ReversalReason='02'&PostingDate=datetime'2022-02-11T10%3A00%3A00'
Kind regards
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
8 | |
7 | |
6 | |
6 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.