# Table Extraction for costing Element

Navigate to **Settings → Document Processing → Classification and Extraction**

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-5a0c3c375f1e35283869088359a22eacc676a661%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">**Note:**</mark> To enable table extraction for **Costing Elements**, you must first import the relevant Costing Element table into **DocBits**. Without this configuration, users will encounter the following error when opening a document:

***"Costing elements are not properly configured. Please ask your admin to configure it."***

## Steps to Import Costing Elements from M3

1. **Access PPS280 in M3:**
   * From the M3 homepage, press `Command + R` and search for **PPS280**.
   * Select any/all lines from the results.
2. **Export the Data:**
   * In the next menu, click **TOOLS → Export to Excel**.\\

     <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-b2b57a1c088205d0db51424a2e268cce175ab785%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
   * Choose **Export All Rows**, then press **EXPORT**.

     <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-2ad8d6e99756c4df8fcb2235043aca4a32d6ba73%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
3. **Modify the Excel File:**\
   Open the downloaded Excel file and make the following changes:
   * **Rename columns:**
     * Column A → `costing_element`
     * Column B → `description`
     * Column H → `charge_operator`
     * Column J → `charge_type`
     * Column K → `distribution_method`
     * Column L → `distribution_type`
     * Column N → `charge_sequence_number`.
       * Enter the appropriate sequence numbers.
       * If left empty, the system will default to **10**.
   * **Remove all other columns** that are **not listed above**, even if they **contain data or are not empty**.
4. **Visual Example – Before and After:**\
   Below are examples of the Excel file *before* and *after* applying the required modifications:
   * **Before Modification:**

     <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-20366348f30ba041406219d9ecc30fb3f8713508%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
   * **After Modification:**

     <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-38853891291544660ae8a669a3d67b169bee0432%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
5. **Convert to CSV:**
   * Save the modified Excel file as a `.csv`
6. **Upload to DocBits:**

* Go to **Settings → Document Processing → Master Data Lookup**
* Click on the Plus next to imported

  <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e5ba2bc88c3a016e8c6aae05705ff472d56efa3e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
* Fill in the required informations
  * **Data Type**: `costing_element`
  * **File**: Select your modified `.csv` file
  * **Delimiter**: `comma`
  * **On Conflict**: Choose a conflict resolution strategy
  * **Auto-generate ID**: Make sure this option is **checked**\\

    <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-a713f20725403a3a46614e922e5b90b4b752f61e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
