According to SuiteAnswers Article 11154 Posting Vendor Bill Variances, the accounting period must be open for the entries being considered and the A/P must be unlocked. Hence, you cannot select an A/P locked Accounting Period for the Journal Posting Period field on the Post Vendor Bill Variances page.
As long as the Accounting Period you would like to use is only A/P locked and/or G/L locked, and is still open, you may follow the steps as an alternate solution (Please note that for some cases the alternate solution might work and for some, it does not):
1. Proceed to post the Journal Entry on the Post Vendor Bill Variances page by clicking the Create Journal Entries button
2. Click the Journal Entry created on the Post Vendor Bill Variances Results page
3. Edit the Journal Entry.
4. Select the correct Accounting Period on the Posting Period field.
5. Save the Journal Entry.
I hope this helps! Let us know your insights about this. 😊