You can create a default account assignment for any cost element using Transaction code OKB9. Later, you can also post a document to check if that account assignment works.
Transaction code - OKB9
Step 1 − To create a new Account Assignment, click New Entries
Step 2 − In the next window, you have to enter the following fields −
Step 3 − To save the entry, click the Save button at the top
Step 4 − To post a test document to check that the account assignment works, use Transaction code fb50. In the next window, click Tree On.
Step 5 − Select the Screen Variant in the next window and click Tree Off button.
Step 6 − In the next window, enter the following details −
Step 7 − To make the document assignment, click the Save button at the top.