Cost Control
You can describe the columns and account numbers of your accounting file once in a mapping set and choose that set in every import of the same file.
A mapping set records which column of your accounting file holds which field, and which accounting numbers belong to which account of the cost control set. You set it up once and choose it again in every import of the same file. To create or change a mapping set, you need a licence that lets you edit Cost Control. With any other licence, KOSMA greys out the controls in the dialog. See [what your licence includes](/kb/article/what-your-licence-includes).
In the first step of an import, **File**, click **New** under **Select Import Mapping Set**. To change an existing mapping set, choose it there and click **Edit**. KOSMA opens **Import Mapping**. **New** creates a mapping set named **New Mapping Set**. If you then click **Cancel**, KOSMA removes it again.
The dialog has the fields **Mapping Set Name**, **Company** and **Currency**, and the sections  **Columns**,  **Accounts** and  **Effects**. Click the name of a section to open it.
If you chose the accounting file before clicking **New** or **Edit**, KOSMA fills in empty fields from it. It enters the column letter for these headers: *Datum* or *Date*, *Beleg* or *Reference*, *Konto* or *Account*, *Text* or *Description*, *Bezahlt* or *Paid*, *Zahldatum* or *Payment Date*, *Tags*, *Effekte* or *Effects*. An effect code from the file goes to the effect whose name starts with that code. If it matches several effects, KOSMA enters it nowhere. If no account has a number yet, KOSMA ticks the step 4 option **Budget and import file use identical account numbers**.
In **Mapping Set Name**, enter a name you will recognise under **Select Import Mapping Set**, for example the name of your accounting system. If you clear the field, KOSMA keeps the previous name.
KOSMA assigns every imported line to the company in  **Company**. A new mapping set starts with the first company of the project. To import the lines without a company, choose **--none--**. If the project has no companies, **Company** is greyed out.
In  **Currency**, choose the currency of the accounting file. The file has no currency column, so every imported line gets this currency. A new mapping set starts with the default currency of the project.
Open  **Columns**. For each field, enter the letter of the column in your accounting file that holds it, for example C or AB. A field takes one or two letters. KOSMA changes lower-case letters to capitals and removes digits.
The blue fields **Account**, **Text**, **Paid** and **Payment date** are required. **Date**, **Reference**, **Tags** and **Effects** are optional. A cell in the tags or effects column of your file can hold several values, separated by a comma or a semicolon.
**First row in import file contains headers** is ticked for a new mapping set. If your file has no header row, untick it.
As long as a required field has no letter, KOSMA shows a caution sign  in **Columns** with this message:
{columns} still need a column letter.
Open  **Accounts**. Under **KOSMA Budget Accounts**, KOSMA lists every account of this cost control set under its category and group. Under **Matching Accounting Accounts**, enter the number your accounting system uses for that account, for example 4000. If your accounting system uses several numbers for the account, separate them with a comma or a semicolon: 4000, 4010.
Every account needs at least one number, even one your accounting system never posts to. Give it any number that is not in the file and not used by another account. KOSMA outlines an account without a number in red and shows a caution sign  with this message:
Not all accounts are matched, importing will not work
A number can belong to one account only. If you enter it for a second account, KOSMA outlines both accounts in red and shows:
This code is already used by another account.
If your accounting system uses the same account numbers as the budget, KOSMA can enter them for you.
Ticking **Budget and import file use identical account numbers** replaces every number you entered by hand. Unticking it deletes the numbers of all accounts.
Tick **Budget and import file use identical account numbers**. KOSMA enters the current number of each account as its accounting number.
Open  **Effects**. KOSMA lists the visible effects of the budget, at most eight, in the order in which the budget lists them. For each effect, enter the code your accounting system uses for it. KOSMA then assigns imported lines with that code to the effect. When every effect has a code, **Effects** shows a check mark  with this message:
All matched
Otherwise **Effects** shows an info sign  with this message:
Effects not matched (not required)
If you entered a letter for **Effects** in step 3, every code in that column of the file must appear here next to an effect, matching letter for letter, capitals included. If a code is missing, you cannot continue past the preview. Add the code to the right effect, or clear the letter for **Effects**. See [match accounts, effects and companies](/kb/article/match-accounts-effects-and-companies).
**Save** stays greyed out until the four required fields have a letter, every account has a number and no number belongs to two accounts. Click **Save**. KOSMA returns to the first step of the import with this mapping set chosen. To discard all changes in the dialog, click **Cancel**.
An import checks only the numbers saved in the mapping set. **Budget and import file use identical account numbers** enters them only when you tick it. For example, you renumber account 4000 to 4005. The mapping set still lists it as 4000. A new account has no number there, and neither does the **Unmapped** account that an import creates. The import cannot assign lines to these accounts until the mapping set has their current numbers. The import still runs, so the step 4 message that importing will not work concerns only these accounts. As long as they have no number, **Save** stays greyed out in every mapping set of the cost control set.
Open the mapping set with **Edit** and enter the numbers. If you use identical account numbers, untick the box and tick it again. For the lines an import could not assign, see [match accounts, effects and companies](/kb/article/match-accounts-effects-and-companies).
**If the mapping set is missing in another cost control set.** A mapping set belongs to the cost control set in which you created it. **Select Import Mapping Set** lists only the mapping sets of the cost control set you have open. In another cost control set, set up the mapping set again. A backup made by an import with **Back up this set first** counts as another cost control set, so the mapping set is not there. See [import accounting data](/kb/article/import-accounting-data).
Choose it under **Select Import Mapping Set** and click **Edit**. In **Import Mapping**, click **Delete**. KOSMA opens **Delete Mapping Set** and asks:
Are you sure you want to delete this mapping set?
To delete it, click **Delete**.
Markdown