Stop posting of a Journal entry if that posting document No. already exisits in G/L entries

How to Stop posting of a Journal entry if that posting document No. already exisits in G/L entries?

You most likely have to make a change in very central codeunit 12. And there you have to check tab 17 as this is a very central table.
On the other hand - some postings do use the same Document No., e.g. adjust inventory; and that will probably cause some problems…

I would not make a change like that without checking all routines in the company before going live!

I believe a simple test in the OnValidate trigger in the “Document No.” field in table 18 would do the the job, but - as Anfinnur pointed out - there might be occasions where to use a previously used number might be useful