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** at once. 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. Only one section is open at a time.
If you chose the accounting file before you clicked **New** or **Edit**, KOSMA fills in empty fields from the file. KOSMA changes nothing you have already filled in. It enters the letter of each column whose header it recognises in German or English: *Datum* or *Date*, *Beleg* or *Reference*, *Konto* or *Account*, *Text* or *Description*, *Bezahlt* or *Paid*, *Zahldatum* or *Payment Date*, *Tags*, *Effekte* or *Effects*. KOSMA assigns an effect code from the file to the effect whose name starts with that code, unless the name of another effect also starts with it. If no account has a number yet, KOSMA ticks **Budget and import file use identical account numbers** (see step 4).
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--**. **Company** then shows **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 KOSMA gives this currency to every imported line. 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  in **Columns** with this message:
**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 accounting books the account under several numbers, separate them with a comma or a semicolon: 4000, 4010.
Every account needs at least one number, even an account that your accounting system never books to. KOSMA frames an account without a number in red and shows  with this message:
**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 frames both accounts in red and shows:
**Message:** 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  with this message:
**Message:** All matched
Otherwise it shows  with this message:
**Message:** Effects not matched (not required)
If you entered a letter for **Effects** in step 3, every effect code in that column of the file must belong to an effect. KOSMA compares the codes letter for letter, capitals included. A line with an unknown code stops the import at the preview. Give the effect that code, 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**.
**If an account was added or renumbered after you saved.** KOSMA enters the account numbers once, when you tick **Budget and import file use identical account numbers**. An import checks only the numbers saved in the mapping set. An account you renumbered later still has its old number there. An account you added later has no number, and neither does the **Unmapped** account that an import creates. Until each of them has a number, the import cannot assign their lines, and **Save** stays greyed out in every mapping set of the cost control set. The mapping set then shows the message from step 4 that importing will not work. An import still runs with the mapping set as you saved it. 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. This also applies to a cost control set that an import created with **Copy Cost Control Dataset**. 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:
**Message:** Are you sure you want to delete this mapping set?
Markdown