Skip to Content

Cancelling Documents using DI API

Good day,

I am developing a code where I have to cancel a documents using DI API SDK.

I see some documents using the method Cancel and ther others using the method

CreateCancellationDocument.

For Example:

The Sales Orders use the Method: ObjectOrder.Cancel()

The Invoices use the method: ObjectTarget = ObjectInvoice.CreateCancellationDocument()

The Question is, How do i know which documents use the method Cancel or

CreateCancellationDocument?

Thanks and Regard.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 29 at 03:02 PM

    It is the same idea when you are using SAP as an user. You don`t need to create a document to cancel an Order, but in order to cancel an invoice, you need to create another document.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi david,

      You will know when you should use each when you get more familiar with SAP
      But as a rule of Thumb, most documents that has a journal entry posting will need to use the CreateCancellationDocument.
      All of this documents will have a TransId Value in the table.

      Regards
      Edy