SAP Message AA397 - You cannot post to account & in period & &

Diagnosis
The posting period &V3& &V4& derived from the posting date is notwithin the posting period defined for account type &V2& account &V1&.

Procedure
Check the posting period using the Finance Customizing menu.