SAP Message 8A602 - Document type 'AB' not defined. No discount document can be posted

Diagnosis
There is no document type defined which can be used for the discountdocument that should be posted automatically.

System Response
The payment document cannot be posted, the transaction is aborted.

Procedure
Please, maintain your customizing tables. You have to define a documenttype for the discount documents or you have to define the document type'AB' (general accounting document) which can be used if no specialdocument is defined.