RE: unable to run the report getting error
To modify a ledger entry, you need to specify the permission in your object.
On your codeunit or report that modifies the ledgers, click Properties (Shift +F4) and put the permission there.

Check Codeunit 391 Shipment Header - Edit for reference.