If the company code does not exist or has not been fully saved, for example during material creation in transaction MM01, the main reason is that the fiscal period has not been set.