Error Message
Only a customer/vendor is allowed for document type DZ.
Message No. F5167
Analysis & Diagnosis
During posting of payment transaction using document type DZ, the above error message occured when more than one customer account open item entered.
This transaction contains the document type ‘DZ’ and several open items. Document type ‘DZ’ has been so configured, however, that only a customer or vendor is permitted.
Solution and Procedures
Check the settings of document type ‘DZ’. The field “Cust/Vend Check” should not be activated.
Path: IMG → Financial Accounting (New) → Financial Accounting Global Settings (New) → Document → Document Types → Define Document Types for Entry View.
Transaction Code: OBA7

The checkbox “Cust/Vend Check” should be deactivated to allow more than one customer account in the document. Save your configuration changes and repeat posting the transaction.
You should now be able to post your transaction.