First the agio has to be reversed to be allowed to make transactions in period you are trying to close.

When this is done, the following steps can be taken:

1) To get this menu activated, you have to click in the lower part of the screen.

2) "Create initial..." must be done both for "Inventory Balances! and for "Work in progress"

When this is done, you will receive General Ledger Postings (ATR) for "import" as well - not just "reversal"

4) Create agio. When this is done, the period should again be in status = 8

5) It should now be possible to close the period to status = 9 (Close Period (ST=9)

Read more about closing the accounting periods here: Closing accounting period