# Data Import Export Framework Error- 'MainAccount should be in the first segment'

**URL:** <https://www.dynamicsuser.net/t/data-import-export-framework-error-mainaccount-should-be-in-the-first-segment/49309>\
**Category:** Technical Forum\
**Created:** [November 14, 2013, 9:57pm UTC](https://www.dynamicsuser.net/t/data-import-export-framework-error-mainaccount-should-be-in-the-first-segment/49309 "2013-11-14T21:57:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TylerITK](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@TylerITK](https://www.dynamicsuser.net/u/TylerITK)\
**Post date:** [November 14, 2013, 9:57pm UTC](https://www.dynamicsuser.net/t/data-import-export-framework-error-mainaccount-should-be-in-the-first-segment/49309/1 "2013-11-14T21:57:48Z")

</div>

Hi All,

I’m working on bringing in opening balances using the DIEF Entity: “Opening Balance.” I have created a source document and mapped to staging…

I am successful in executing the following:

- “Preview source file” in the Entities screen.

- “Get staging data” and the preview within the process.

- Validating all staging data.

When I execute the **Copy data to target** , all of my entries fail with the following error message:

_‘MainAccount should be in the first segment’_

Reviewing my file, the following is true:

- MainAccount IS in the first segment of the full account+dimension string

- Account combination is a valid combination set in the Account Structure

- Source data formats are defined correctly, in the correct order.

- Data has been reviewed for erroneous spaces, commas, irregularities in the .txt file.

- I have attempted both Opening Balances and Ledger Balance entities resulting in the same error.

If anyone has encountered this, or has any suggestions – it would be greatly appreciated! I’m sure I’m missing something?

Thanks!

---

<div class="post-metadata">

**Author:** ![TylerITK](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@TylerITK](https://www.dynamicsuser.net/u/TylerITK)\
**Post date:** [November 21, 2013, 8:44pm UTC](https://www.dynamicsuser.net/t/data-import-export-framework-error-mainaccount-should-be-in-the-first-segment/49309/2 "2013-11-21T20:44:45Z")

</div>

## **UPDATE:**

**Quick answer:** Upgrade to CU7. DIEF has undergone significant improvements.

**Solution:** Microsoft provided me with an XPO file that has resolved the errors described above.

The XPO file also resolves the error: _“Financial dimension 0 does not exist”_

If you would like a copy of this XPO, please email me at [tbarron@itksolutionsgroup.com](mailto:tbarron@itksolutionsgroup.com) and I will be happy to provide it to you.

Tyler
