We refreshed the production client data to testing client. while posting financial document getting an error "Company code is not defined". I have checked the config and could find any major observation.
Checked the company code in the IMG activity and found this error in number ranges for many objects
"error in foreign key dependencies"