Purpose:The purpose of this document is to illustrate how to use Microsoft Dynamics AX 2012 Excel Add-in for import of ledger transactions.
Challenge: Data model changes in Microsoft Dynamics related to high normalization and introduction of surrogate keys made some imports more complex. In fact the data model forming General Journal was not dramatically changed and import principle remains the same – populate the journal and then post the journal. However some information which is usually automatically generated in Microsoft Dynamics AX 2012 Rich Client by means of number sequences such as voucher number will have to be provided.
Solution: Microsoft Dynamics AX 2012 ships with General Journal AIF Web Service (LedgerGeneralJournalService) which can be used in integration scenarios. Also General Journal AIF Web Service can be used in Excel for import of ledger transactions. In order to import ledger transactions using Excel the mentioned AIF Web Service will be used.
Assumption: The assumption is that appropriate reference data such as main accounts, etc. was created in advance.
Data Model:
| Table Name | Table Description |
| LedgerJournalTable | The LedgerJournalTable table contains all the defaulting and state information pertaining to a single journal. The transaction details of a journal are managed in the LedgerJournalTrans table. |
| LedgerJournalTrans | The LedgerJournalTrans table contains the transaction detail information that pertains to a single journal. The individual transaction lines are also referred to as voucher lines. The journal is a record in the LedgerJournalTable table. |
Data Model Diagram:
Walkthrough:
Connection
Add Data

Field Chooser

Accounting structure

LedgerJournalTable
| Field Name | Field Description |
| | Journal batch number |
| | Name |
| | Description |

LedgerJournalTrans
| Field Name | Field Description |
| | Journal batch number |
| | Voucher |
| | Date |
| | Company accounts |
| | Account type |
| | LedgerDimension |
| | LedgerDimension.MainAccount |
| | LedgerDimension.Department |
| | Description |
| | Debit |
| | Credit |
| | Currency |
Sequence:
1. Publish All
Result:
Dynamics AX – General Journal

Dynamics AX – General Journal lines

Dynamics AX - Posting

SQL Trace:
Summary: For the purposes of small or medium data migration (data conversion) where performance is not a concern Excel can be used for import of ledger transactions into Microsoft Dynamics AX 2012. General Journal AIF Web Service (LedgerGeneralJournalService) can be used in Excel for import of ledger transactions. Excel template can be created and used for import of ledger transactions.
Author: Alex Anikiev, PhD, MCP
Tags: Dynamics ERP, Dynamics AX 2012, Excel, Dynamics AX 2012 Excel Add-in, Data Import, Data Conversion, Data Migration, Application Integration Framework, Ledger balances.
Note: This document is intended for information purposes only, presented as it is with no warranties from the author. This document may be updated with more content to better outline the concepts and describe the examples. It’s recommended that all Data Model changes introduced as a part of this demonstration will be removed once you complete data import exercise.
This comment has been removed by the author.
ReplyDeleteHi Praveen!
DeleteLedgerGeneralJournalService Service should be deployed as a part of LedgerServices Service Group, after that if you added and activated it in Document Data Sources you will see it available in Excel Add-in
Please see the document I created describing the sequence of steps you have to go through to enable LedgerGeneralJournalService Service for Excel Add-in: https://docs.google.com/open?id=0B3rbAZy5q2ExM2IyODRmM2MtOTJlZC00MjMyLWFjYWItZWQ4YTFlMGI5MDEx
Regards,
/Alex
Sorry Alex, I accidentally removed the comment. I didn't saw that you had already replied to the post. I followed the same way after quite a few trial and errors, but have managed to get it up now.
ReplyDeleteThanks and appreciate for sharing the screenshots for the steps.
Good to hear!
DeleteI also created another post with details on how to enable AIF Web Services either standard or custom for Excel Add-in, it's available here: http://ax2012exceldataimport.blogspot.com/2012/01/dynamics-ax-2012-excel-add-in-add-data.html
Regards,
/Alex
Thanks Alex, that's a very informative post for the Excel Add-in services.
DeleteHi Alex, any thoughts on how the voucher and journal batch number data should be entered in excel add-in especially in cases where there is a mandatory system generated number sequences like the one above in General Journal.
ReplyDeleteAppreciate your blog posts on the topic.
Hi Alex, I'm having problems with the import of the records in the LedgerJournalTrans(Unfortunately my Excel is German: Der GeneralJournalService-Dienst unterstützt keinen Aktualisierungsvorgang - sth like The GeneralJournalService-Service does not support updates).
ReplyDeleteFor the LedgerJournalTable is everything working fine.
Any ideas?
Hi Sandmann!
DeleteStandard GeneralJournalService Service doesn't support Update operation. Technically you can change "Update" property on AxdLedgerGeneralJournal Query data sources (LedgerJournalTable, LedgerJournalTrans) in AOT from "No" to "Yes" and then "Update document service" LedgerGeneralJournalService Service in Development workspace to enable Update operation in General Journal through AIF Web Service.
If you do so please don't forget to mark "Update", "Generate AxBC Classes" and "Regenerate existing AxBC Classes" checkboxes when going through "Update document service" Wizard
You can find relevant screenshots in this post: http://ax2012exceldataimport.blogspot.com/2012/01/dynamics-ax-2012-data-import-using_17.html
Please note that this is not necessary if you use Raw tables instead.
Best Regards,
/Alex
Hi Alex
ReplyDeleteHave you been able to import an AP invoice journal? Would need additional fields e.g. Invoice no., document date.
Regards
Michelle
Hi Michelle!
DeleteThank you for the interesting question!
In this case you have 2 main options: 1) modify LedgerGeneralJournalService AIF Web Service changing it Query to accommodate for more fields, or 2) use raw tables.
Modification to General Journal AIF Web Service will be much easier taking into account built-in processing for LedgerDimension fields and big number of relations on LedgerJournalTrans table in raw data model.
Working with raw tables will require much more tweaking.
Please see the following post for more details: http://ax2012exceldataimport.blogspot.com/2012/02/dynamics-ax-2012-excel-add-in-customer.html
Best Regards,
/Alex
Hi Michelle!
DeletePlease see General Journal AIF Web Service modification approach in details in the following post: http://ax2012exceldataimport.blogspot.com/2012/02/dynamics-ax-2012-excel-add-in-vendor.html
This approach is much easier for the user than raw tables approach
Enjoy!
/Alex
Really love your Blog on Dynamics AX 2012; been very helpful!
ReplyDeleteHave a question for you and would love to see if you could point us in the right direction. We recently installed AX 2012 and are struggling with General Ledger Uploads via Excel. We have over 60+ companies and over 16 accountants who need to upload data via excel. According to what we have experienced, we need to create a unique template for each company and for each employee? That’s insane. Is there no way to just have a connection to AX 2012 and allow the user to input a different company in the template when they are going to upload? And what makes matters worse, if we save the template, it remembers the company that was used prior even if we have selected a new company, thus it attempts to load entries into the wrong company.
Any and all help would be greatly appreciated.
Thank you kindly,
dsy