cancel
Showing results for 
Search instead for 
Did you mean: 

Create credit memo via API for a purchase order - S4HC

jnestares
Participant
0 Kudos
619

Hi,

we are using API_SUPPLIERINVOICE_PROCESS_SRV to create supplier invoices referenced to Purchase Orders, and we were wandering if credit memos could be created via api as well. In such case, how would it be?

We are in an S4Hana Cloud environement.

KR,

Jose

Accepted Solutions (1)

Accepted Solutions (1)

Hi Jose

It is possible to create a credit memo with the API.
The key is the header field -> "SupplierInvoiceIsCreditMemo" : "1".

You can test in your system with this format

Kind regards
Brian

/sap/opu/odata/sap/API_SUPPLIERINVOICE_PROCESS_SRV/A_SupplierInvoice

{
"d" : {
"PaymentTerms" : "",
"DueCalculationBaseDate" : "2022-02-10T00:00",
"NetPaymentDays" : "0",
"FiscalYear" : "2022",
"AccountingDocumentType" : "ER",
"CompanyCode" : "1010",
"TaxDeterminationDate":"2022-02-10T00:00",
"TaxIsCalculatedAutomatically" : true,
"DocumentDate" : "2022-02-10T00:00",
"PostingDate" : "2022-02-10T00:00",
"SupplierInvoiceIDByInvcgParty" : "SAPCRTest1",
"InvoicingParty" : "10300006",
"DocumentCurrency" : "EUR",
"InvoiceGrossAmount" : "12.00",
"SupplierInvoiceIsCreditMemo" : "1",
"to_SuplrInvcItemPurOrdRef" : {
"results" : [
{
"TaxCode" : "V0",
"DocumentCurrency" : "EUR",
"SupplierInvoiceItemAmount" : "12.00",
"PurchaseOrderQuantityUnit" : "PC",
"QuantityInPurchaseOrderUnit" : "1",
"FiscalYear" : "2022",
"IsNotCashDiscountLiable" : false,
"SupplierInvoiceItem" : "1",
"PurchaseOrder" : "4500005670",
"PurchaseOrderItem" : "10"
}
]
}
}
}

Answers (2)

Answers (2)

jnestares
Participant
0 Kudos

Hi,

thanks for your response, but we refer to the possibility of creation of supplier invoices referenced to purchase orders (MM module). We can do this via API_SUPPLIERINVOICE_PROCESS_SRV. The question here is if there is an API to create credit memo. This can be done manually in the system in app Create Supplier Invoice Advanced (MIRO in another SAP systems).

KR,

Jose

lokesh2
Advisor
Advisor
0 Kudos

Hi Jose,

Kindly refer to this previous thread on this topic

https://answers.sap.com/questions/12846100/s4-hana-public-cloud-v1908-upload-of-invoices-and-.html

Thanks

Lokesh