Fist Step
The customer number must be entered in the corresponding vendor master record
a. FK02->General Data -> Control
In the 'Account control' tab, in the 'Customer' field, enter the customer number
b. In the Company Code Data --> Payment Transaction Accounting, select the checkbox - 'Clrg with Cust'(LFB1-XVERR)
Second Step
The vendor number must be entered in the corresponding customer master record
a. FD02->General Data -> Control
In the 'Account control' tab, in the 'Vendor' field, enter the vendor number
b. In the Company Code Data --> Payment Transaction Accounting, select the checkbox - 'Clearing with vendor' (KNB1-XVERR)
Third Step
For testing, create a vendor invoice through FB60 and customer invoice through FB70. Note that customer and vendor are properly selected.
Fuorth Step
To see the vendor/customer balance both together use FBL1N/FBL5N, when you execute FBL1N select customer check box, when you execute FBL5N select vendor check box along with open item/cleared item check box
Fifth Step
For clearing the open items. Use the TCode F-32. On clicking the 'Process open Items', the vendor invoice (KR) and customer invoice (DR) are shown automatically. It will generate the FI document with proper entry.
Note: Partial / Residual payment between customer and vendor is also possible