uploading opening balances

after creation of chart of accounts, go GL >General Journal , create one ledger account (offset a/c)only for to enter opening balances, for eg ledger account no 66666. eg :

Asset a/c Dr 20000

To opening balance A/c (66666) 20000

Opening Balance A/c (66666) Dr 100000

To Capital A/c 100000

Customer A/c Dr 55000

To opening Balance A/c 55000

Opening Balance A/c 60000

To Vendor A/c 60000

After posting this entry verify balance of 66666 A/c , it should be zero . becauze debit = credit as per your trial balance.

but we have COGS account in Ax and not purchase. so how can we import balances for COGS if we have purchase account in legacy system.

Without using an OB account you can post them with a single voucher.Enter all the accounts and their amounts without any offset account.

What do you mean by that ?