Diagnosis
In cross-company code document entry, either all of the company codes involved must be allocated to a company OR none of these company codes may be allocated to a company. This is the only way that the consolidation application can be supplied with relevant data. In the case that led to this error message, only some of the company codes are allocated to a company.
System Response
The system will not accept the posting.
Procedure
Correct the allocation of company codes to companies.
SOLUTION:
The reason for this error is one of the company code is not assigned to a company while the other company code is assigned to company.
STEP 1: Go to SPRO > IMG > follow the below path

STEP 2: Assign different company for both company codes
NOTE: Both company codes must not be blank, or neither only one company code is assigned to company.

Thanks,
Adharsh K S