Solution : https://service.sap.com/sap/support/notes/1040152 (SAP Service marketplace login required)
Key words : 
prerequisites program error solution apply code corrections, deriving thealternate gl accounts, billing documents posted, defined tax account, function module j_1i_vat_tax_account_det_sd, sd billing documents, gl accounts, sd billing, crm billing, alternate account
Related Notes : 
       
| 607907 | Alternate G/L Account determination: VAT Sales/Purchases |