Solution : https://service.sap.com/sap/support/notes/841449 (SAP Service marketplace login required)
Key words : 
symptom customizing settings, document number assignment, leading ledger, terms newgl, lfagl_cust_belnrf02 reason, program error, solution implement, v_fagl_belnr_ld, prerequisites, corrections
Related Notes : 
       
| 890976 | Converting closing report to internal doc number assgnmnt | 
| 888704 | |
| 798458 |