+ All Categories
Home > Documents > Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export...

Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export...

Date post: 06-Feb-2018
Category:
Upload: phamhanh
View: 400 times
Download: 23 times
Share this document with a friend
53
1 Setup of the GoBD export for Germany in Microsoft Dynamics AX 2012 Table of Contents Table of Contents .................................................................................................................................... 1 1. Introduction..................................................................................................................................... 3 2. Prerequisites for using the GoBD export functionality ................................................................... 4 2.1. List of the required hotfixes .................................................................................................... 4 2.2. New display methods on table MainAccount ......................................................................... 5 2.2.1. Display method for showing, whether a main account is blocked ................................. 5 2.3. New display methods on table GeneralJournalEntry .............................................................. 5 2.3.1. Display method for showing a ledger journal number.................................................... 5 2.4. New method on table TaxTransGeneralJournalAccountEntry to create a TaxRefId............... 6 2.4.1. Method for creating a tax reference number ................................................................. 6 2.5. New display methods on table GeneralJournalAccountEntry................................................. 8 2.5.1. Display method for showing the offset accounts............................................................ 8 2.5.2. Display method for showing a reference to sales tax transactions related to the current general ledger transaction line ........................................................................................... 8 2.5.3. Display method for filling the journal sequence number ............................................... 9 2.6. New display methods on table TaxTrans .............................................................................. 10 2.6.1. Display method for showing a reference to sales tax transactions related to the current transaction line ................................................................................................................. 10 2.6.2. Display method for showing a ledger account to which the sales tax transaction refers 10 2.7. New display methods on table VendTable............................................................................ 11 2.7.1. Display method for showing the related customer account number ........................... 11 3. Creation of an export definition group for the GoBD export ........................................................ 12 3.1. Definition of the GoBD table containing the general ledger account data ........................... 12 3.1.1. Prerequisites .................................................................................................................. 12 3.1.2. Query structure for searching the general ledger accounts ......................................... 13 3.1.3. Field list of the fields in the export file .......................................................................... 14 3.2. Definition of the GoBD table containing the general ledger transaction data ..................... 15 3.2.1. Query structure for searching the general ledger transactions .................................... 15 3.2.2. Field list of the fields in the export file with their AX data sources .............................. 16 3.2.3. Additional setup to be performed................................................................................. 18 3.3. Definition of the GoBD table containing the sales tax code data ......................................... 19
Transcript
Page 1: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

1

Setup of the GoBD export for Germany in Microsoft Dynamics AX 2012

Table of Contents Table of Contents .................................................................................................................................... 1

1. Introduction ..................................................................................................................................... 3

2. Prerequisites for using the GoBD export functionality ................................................................... 4

2.1. List of the required hotfixes .................................................................................................... 4

2.2. New display methods on table MainAccount ......................................................................... 5

2.2.1. Display method for showing, whether a main account is blocked ................................. 5

2.3. New display methods on table GeneralJournalEntry .............................................................. 5

2.3.1. Display method for showing a ledger journal number .................................................... 5

2.4. New method on table TaxTransGeneralJournalAccountEntry to create a TaxRefId............... 6

2.4.1. Method for creating a tax reference number ................................................................. 6

2.5. New display methods on table GeneralJournalAccountEntry................................................. 8

2.5.1. Display method for showing the offset accounts ............................................................ 8

2.5.2. Display method for showing a reference to sales tax transactions related to the

current general ledger transaction line ........................................................................................... 8

2.5.3. Display method for filling the journal sequence number ............................................... 9

2.6. New display methods on table TaxTrans .............................................................................. 10

2.6.1. Display method for showing a reference to sales tax transactions related to the

current transaction line ................................................................................................................. 10

2.6.2. Display method for showing a ledger account to which the sales tax transaction refers

10

2.7. New display methods on table VendTable ............................................................................ 11

2.7.1. Display method for showing the related customer account number ........................... 11

3. Creation of an export definition group for the GoBD export ........................................................ 12

3.1. Definition of the GoBD table containing the general ledger account data ........................... 12

3.1.1. Prerequisites .................................................................................................................. 12

3.1.2. Query structure for searching the general ledger accounts ......................................... 13

3.1.3. Field list of the fields in the export file .......................................................................... 14

3.2. Definition of the GoBD table containing the general ledger transaction data ..................... 15

3.2.1. Query structure for searching the general ledger transactions .................................... 15

3.2.2. Field list of the fields in the export file with their AX data sources .............................. 16

3.2.3. Additional setup to be performed ................................................................................. 18

3.3. Definition of the GoBD table containing the sales tax code data ......................................... 19

Page 2: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

2

3.3.1. Query structure for searching the sales tax codes ........................................................ 19

3.3.2. Field list of the fields in the export file with their AX data sources .............................. 20

3.4. Definition of the GoBD table containing the sales tax group data ........................................ 21

3.4.1. Query structure for searching the sales tax groups ...................................................... 21

3.4.2. Field list of the fields in the export file with their AX data sources .............................. 22

3.5. Definition of the GoBD table containing the sales tax transaction data ............................... 23

3.5.1. Query structure for searching the sales tax transactions ............................................. 23

3.5.2. Field list of the fields in the export file with their AX data sources .............................. 24

3.5.3. Additional setup to be performed ................................................................................. 25

3.6. Definition of the GoBD table containing the customer data ................................................ 26

3.6.1. Query structure for searching the customer data......................................................... 26

3.6.2. Field list of the fields in the export file with their AX data sources .............................. 27

3.7. Definition of the GoBD table containing the customer transactions .................................... 28

3.7.1. Query structure for searching the customer transaction data ..................................... 29

3.7.2. Field list of the fields in the export file with their AX data sources .............................. 29

3.7.3. Additional setup to be performed ................................................................................. 30

3.8. Definition of the GoBD table containing the vendor data .................................................... 32

3.8.1. Query structure for searching the vendor data ............................................................ 32

3.8.2. Field list of the fields in the export file with their AX data sources .............................. 33

3.9. Definition of the GoBD table containing the vendor transactions ........................................ 34

3.9.1. Query structure for searching the vendor transaction data ......................................... 34

3.9.2. Field list of the fields in the export file with their AX data sources .............................. 35

3.9.3. Additional setup to be performed ................................................................................. 36

3.10. Definition of the GoBD table containing the fixed asset base data .................................. 37

3.10.1. Query structure for searching the fixed asset data ....................................................... 37

3.10.2. Field list of the fields in the export file with their AX data sources .............................. 38

3.11. Definition of the GoBD table containing the fixed asset transactions .............................. 39

3.11.1. Query structure for searching the fixed asset transaction data ................................... 39

3.11.2. Field list of the fields in the export file with their AX data sources .............................. 40

3.11.3. Additional setup to be performed ................................................................................. 41

4. Perform a GoBD data export ......................................................................................................... 42

4.1. Prerequisites .......................................................................................................................... 42

4.2. Execution of the GoBD export ............................................................................................... 48

4.3. How to create a Display method ........................................................................................... 52

Page 3: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

3

1. Introduction In Germany, tax auditors have the right to receive an export of the financial data which have been

created in the ERP system of the company to be audited. The functionality is referred to as “GoBD

export”.

In Microsoft® Dynamics® AX 2012, this functionality is provided in the submenu “General ledger\

Periodic\ Data export”:

- The menu option “Data export definition groups” is used to define, which data have to be exported from the AX installation. The export definitions are organized in export definition groups, so that several export requirements can be configured in one AX installation.

- The menu option “Data export” is used to perform the data export using one of the defined export definition groups.

If a company uses Microsoft® Dynamics® AX 2009, the tax auditors request an export which can be

created mainly from the fields in the standard AX tables. In recent years, the tax auditors even

provide a document containing the field names to be exported.

In Microsoft® Dynamics® AX 2012, the data model of the general ledger data has been changed

considerably. As a result, the document which the tax auditors use for Microsoft® Dynamics® AX

2009 does not show the table names and field names which are present in Microsoft® Dynamics® AX

2012.

This document describes, how the export definition groups can be setup, so that the GoBD export of

a Microsoft® Dynamics® AX 2012 installation contains the same fields as the GoBD export of a

Microsoft® Dynamics® AX 2009 installation.

The document is divided into the parts

- Prerequisites for using the GoBD export functionality This section lists the available hotfixes for Microsoft® Dynamics® AX 2012. Additionally, the modifications in the data model of Microsoft® Dynamics® AX 2012 require the creation of display methods in order to fill some fields in the data export. Suggestions for such display methods are given in this section, either.

- Definition of the GoBD export tables This section lists the export data, which are requested from a Microsoft® Dynamics® AX 2009 installation, and shows, how an export table may be defined to achieve this requirement in a Microsoft® Dynamics® AX 2012 installation.

- Perform a GoBD data export This section shows how the GoBD export may be performed, using the example definition created in the preceding sections.

Page 4: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

4

2. Prerequisites for using the GoBD export functionality

2.1. List of the required hotfixes The following hotfixes have to be adapted in order to setup and run the GoBD export in an AX2012

RTM installation:

- KB2837480, Definition group selection is not used when using GOBD Export wizard - KB3051520, Germany/DEU: RecIDs cannot be selected in setup of German GOBD – released

for R2, to be adjusted to RTM - KB3063661, Germany/DEU: GoBD Export file not corresponding to definition and index once

data was imported from another instance of AX2012– released for R2, to be adjusted to RTM - KB3068317, Germany/DEU: GoBD export does not export int64 methods– released for R2 and

R3, to be adjusted to RTM - KB2922493, France/FRA: Empty or incorrect values are exported from ledger when you use

the GOBD export tool

The following hotfixes have to be installed in order to setup and run the GoBD export in an AX2012

R2 installation:

- KB3051520, Germany/DEU: RecIDs cannot be selected in setup of German GOBD - KB3063661, Germany/DEU: GoBD Export file not corresponding to definition and index once

data was imported from another instance of AX2012 - KB3068317, Germany/DEU: GoBD export does not export int64 methods - KB2922493, France/FRA: Empty or incorrect values are exported from ledger when you use

the GOBD export tool

The following hotfixes have to be installed in order to setup and run the GoBD export in an AX2012

R3 installation:

- KB3021144, Germany/DEU: RecIDs cannot be selected in setup of German GOBD export tables

- KB3022466, Germany/DEU: RecId cannot be exported into GOBD data exported file - KB3058338, France/FRA and Germany/DEU: Performance issue of German GoBD and French

financial data export processes - KB3063661, Germany/DEU: GoBD Export file not corresponding to definition and index once

data was imported from another instance of AX2012 - KB3068317, Germany/DEU: GoBD export does not export int64 methods

Page 5: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

5

2.2. New display methods on table MainAccount

2.2.1. Display method for showing, whether a main account is blocked The information, whether a main account is blocked for manual entries, is not held in the

MainAccount table any more. A display method is required for displaying the information.

Suggested source code of the display method //BP Deviation Documented public display Boolean displayIsBlocked() { return this.isBlockedForManualEntry(); }

2.3. New display methods on table GeneralJournalEntry

2.3.1. Display method for showing a ledger journal number The ledger journal numbers are present in a separate table LedgerEntryJournal, whose RefId is

present in the GeneralJournalEntry records. As the existence of the LedgerEntryJournal record is not

mandatory, a display method is required to fetch any existing LedgerEntryJournal record and display

its field JournalNumber.

Suggested source code of the display method //BP Deviation Documented public display LedgerJournalId displayLedgerJournalId() { LedgerEntryJournal ledgerEntryJournal; LedgerJournalId ledgerJournalId = ''; ; if (this.LedgerEntryJournal) { select ledgerEntryJournal where ledgerEntryJournal.RecId == this.LedgerEntryJournal; ledgerJournalId = ledgerEntryJournal.JournalNumber; } return ledgerJournalId; }

Page 6: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

6

2.4. New method on table TaxTransGeneralJournalAccountEntry to create a

TaxRefId

2.4.1. Method for creating a tax reference number In Microsoft® Dynamics® AX 2009, a field TaxRefId was used to link the general ledger transactions to the sales tax transactions. The GoBD export has to contain such a link field. The table field TaxRefId has been disabled in Microsoft® Dynamics® AX 2012. Instead, a table TaxTransGeneralJournal-AccountEntry has been introduced, which provides a m:n relationship between the general ledger transaction lines and the sales tax lines. A method is required, which scans for a given voucher, which records in the tables TaxTrans and GeneralJournalAccountEntry are related through records in the table TaxTransGeneralJournalAccountEntry, and provides a unique identifier for each such relation. The method in the code suggestion uses the smallest RecId in table TaxTransGeneralJournalAccount-Entry as the identifier for this relation.

Suggested source code of the TaxRefId creator method public RefRecId getTaxRefId() { // search all TaxTransGeneralJournalAccountEntry records, // which belong together due to a common TaxTrans or a common GeneralLedgerJournalEntry RecId taxTransId[]; RecId ledgerTransId[]; int taxTransCount, taxTransCurrent, taxCurrent; int ledgerTransCount, ledgerTransCurrent, ledgerCurrent; TaxTransGeneralJournalAccountEntry taxEntry, ledgerEntry; RecId minimumId; void setMinimumId(RecId _testId) { ; if (_testId && _testId < minimumId) { minimumId = _testId; } } void addTaxTrans(RecId _taxTransRecId) { ; if (_taxTransRecId) { taxTransCurrent = 1; while ( (taxTransCurrent <= taxTransCount) && (taxTransId[taxTransCurrent] != _taxTransRecId)) { taxTransCurrent++; } if (taxTransCurrent > taxTransCount)

Page 7: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

7

{ taxTransCount++; taxTransId[taxTransCount] = _taxTransRecId; setMinimumId(ledgerEntry.RecId); } } } void addLedgerTrans(RecId _ledgerTransRecId) { ; if (_ledgerTransRecId) { ledgerTransCurrent = 1; while ( (ledgerTransCurrent <= ledgerTransCount) && (ledgerTransId[ledgerTransCurrent] != _ledgerTransRecId)) { ledgerTransCurrent++; } if (ledgerTransCurrent > ledgerTransCount) { ledgerTransCount++; ledgerTransId[ledgerTransCount] = _ledgerTransRecId; setMinimumId(taxEntry.RecId); } } } // Initialize the arrays with the RecId values of the records to be used taxTransCount = 0; taxTransId[0] = 0; ledgerTransCount = 0; ledgerTransId[0] = 0; minimumId = this.RecId; ledgerCurrent = ledgerTransCount; taxCurrent = taxTransCount; addTaxTrans(this.TaxTrans); // Search, until all taxTrans values have been treated while (taxCurrent < taxTransCount) { taxCurrent++; // add all GeneralJournalAccountEntry RecIds to the array to be checked while select taxEntry where taxEntry.TaxTrans == taxTransId[taxCurrent] { addLedgerTrans(taxEntry.GeneralJournalAccountEntry); } // For all unchecked GeneralJournalAccountEntry RecIds // add all TaxTrans RecIds to the array to be checked while (ledgerCurrent < ledgerTransCount) { ledgerCurrent++; while select ledgerEntry where ledgerEntry.GeneralJournalAccountEntry == ledgerTransId[ledgerCurrent] { addTaxTrans(ledgerEntry.TaxTrans); } } // In case that the found number of Taxrans RecIds has been increased, run the loop again } // Return the smallest found RecId value from table TaxTransGeneralJournalAccountEntry return minimumId; }

Page 8: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

8

2.5. New display methods on table GeneralJournalAccountEntry

2.5.1. Display method for showing the offset accounts The display method deCompteAuxNum_FR does not always show an offset account, but only if a customer account or a vendor account is present. If the current transaction line refers to a customer account or a vendor account, a star is displayed. A possibility is needed to show a certain number of offset accounts.

Suggested source code of the display method //BP Deviation Documented public display DirPartyName displayOffsetAccounts() { GeneralJournalAccountEntry line; MainAccountNum accountNum; DirPartyName accountList; int accPos; ; while select line where line.GeneralJournalEntry == this.GeneralJournalEntry { accountNum = MainAccount::findByLedgerDimension(line.LedgerDimension).MainAccountId; if (!strScan(accountList,','+accountNum,1,100)) { accountList += ','+accountNum; } } accountNum = MainAccount::findByLedgerDimension(this.LedgerDimension).MainAccountId; accountList = strDel(accountList,strScan(accountList, ','+accountNum, 1, 100), strLen(accountNum)+1); if (subStr(accountList,1,1) == ',') { accountList = strDel(accountList,1,1); } return accountList; }

2.5.2. Display method for showing a reference to sales tax transactions related to the

current general ledger transaction line In Microsoft® Dynamics® AX 2009, a field TaxRefId was used to link the general ledger transactions to the sales tax transactions. The GoBD export has to contain such a link field. The table field TaxRefId has been disabled in Microsoft® Dynamics® AX 2012. Instead, a new table TaxTransGeneralJournal-AccountEntry has been introduced, which provides a m:n relationship between the general ledger transaction lines and the sales tax lines. As the existence of a record in this table is not ensured, a

Page 9: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

9

display method is required on the table GeneralJournalAccountEntry, which reads the related records in the table TaxTransGeneralJournalAccountEntry and extracts a unique identifier per subledger voucher and per m:n relation.

Suggested source code of the display method //BP Deviation Documented public display RefRecId displayTaxRefId() { RefRecId result = 0; TaxTransGeneralJournalAccountEntry taxTransGeneralJournalAccountEntry; ; select taxTransGeneralJournalAccountEntry where taxTransGeneralJournalAccountEntry.GeneralJournalAccountEntry == this.RecId; if (taxTransGeneralJournalAccountEntry) { result = taxTransGeneralJournalAccountEntry.getTaxRefId(); } return result; }

2.5.3. Display method for filling the journal sequence number The export of the general ledger transactions has to contain a field JournalizeSeqNum. This field is taken from table LedgerEntryJournalizing, which is related to the journalizing functionality in Microsoft® Dynamics® AX. As the journalization record for a ledger transaction line may not be available, the table cannot be searched by adding it to the search query for the ledger transaction lines. Instead, the link has to be done in a display method, which returns an empty value, if the journalization record does not exist.

Suggested source code of the display method //BP Deviation Documented public display LedgerJournalizeSeqNum displayLedgerJournalizeSeqNum() { LedgerEntryJournalizing ledgerEntryJournalizing; ; select ledgerEntryJournalizing where ledgerEntryJournalizing.GeneralJournalAccountEntry == this.RecId; return ledgerEntryJournalizing.SequenceNumber; }

Page 10: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

10

2.6. New display methods on table TaxTrans

2.6.1. Display method for showing a reference to sales tax transactions related to the

current transaction line In Microsoft® Dynamics® AX 2009, the general ledger transactions were linked to the sales tax transactions, using a field TaxRefId. This field has been disabled. Instead, a new table TaxTransGeneralJournalAccountEntry has been introduced, which provides a m:n relationship between the general ledger transaction lines and the sales tax lines. As the existence of a record in this table is not ensured, a display method is required on the table TaxTrans, which reads the related records in the table TaxTransGeneralJournalAccountEntry and extracts a unique identifier per subledger voucher and per m:n relation.

Suggested source code of the display method //BP Deviation Documented public display RefRecId displayTaxRefId() { RefRecId result = 0; TaxTransGeneralJournalAccountEntry taxTransGeneralJournalAccountEntry; ; select taxTransGeneralJournalAccountEntry where taxTransGeneralJournalAccountEntry.TaxTrans == this.RecId; if (taxTransGeneralJournalAccountEntry) { result = taxTransGeneralJournalAccountEntry.getTaxRefId(); } return result; }

2.6.2. Display method for showing a ledger account to which the sales tax transaction

refers In Microsoft® Dynamics® AX 2009, the sales tax transactions held a ledger account number, on which the user can find the tax dutiable amount. This field has been disabled. Instead, a new table TaxTransGeneralJournalAccountEntry has been introduced, which provides a m:n relationship

Page 11: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

11

between the general ledger transaction lines and the sales tax lines. As the existence of a record in this table is not ensured, a display method is required on the table TaxTrans, which reads the related records in the table TaxTransGeneralJournalAccountEntry and extracts the account number of the account, on which a tax dutiable amount is held.

Suggested source code of the display method //BP Deviation Documented display MainAccountNum costAccountNum() { LedgerDimensionAccount ledgerDimension; ledgerDimension = TaxTransGeneralJournalAccountEntry::getLedgerDimensionForTaxTrans(this.RecId, TaxTransRelationshipType::TransactionLineAccount); return DimensionStorage::getMainAccountNumFromLedgerDimension(ledgerDimension); }

2.7. New display methods on table VendTable

2.7.1. Display method for showing the related customer account number In Microsoft® Dynamics® AX 2012, the customer account number of the customer related to the current vendor was indicated by a field in the VendTable record. This field has been disabled. Instead, the related customer has to be found by searching the customer, which uses the same PartyId in the global address book.

Suggested source code of the display method //BP Deviation Documented display CustAccount custAccount() { return CustTable::findByPartyRecId(this.Party).AccountNum; }

Page 12: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

12

3. Creation of an export definition group for the GoBD export In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, create a

definition group “GoBD” and add a suitable descriptive name.

Save the record and click the “Data export tables” button.

In the form “Data export tables”, create one line for each GoBD table, which is described in the

following chapters.

3.1. Definition of the GoBD table containing the general ledger account data

3.1.1. Prerequisites The export table “Sachkonten” contains the main accounts, which are used in the current legal

entity. In Microsoft® Dynamics® AX 2012, the table MainAccount has been defined not to be saved

per company. In order to ensure that only the correct chart of accounts is used, a relation has to be

set towards the table CompanyInfo. Though table CompanyInfo is not saved per company any more,

table CompanyInfo has relations to the company-specific tables BankAccount and TaxVatNumTable.

Page 13: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

13

This export assumes that the user has opened the menu option “Organization administration\ Setup\ Organization\ Legal entities”, then opened the tabulator “Foreign trade and logistics” and has filled the field “VAT exempt number export (field CompanyInfo.VatNum). Additionally, the suggested setup assumes that the table TaxVatNumTable has not been altered in a way that it is not saved per company any more. If the table TaxVatNumTable is not saved by company, the user has to fill the field

CompanyInfo.BankAccount (tabulator “Bank account information”, field “Bank account”) and in the

following steps has to replace the table TaxVatNumTable by the table BankAccountTable.

3.1.2. Query structure for searching the general ledger accounts In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Sachkonten” (Main accounts).

Page 14: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

14

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. After having followed

the prerequisites above, the query structure has to look like shown below.

3.1.3. Field list of the fields in the export file After the user set up the query structure, the user has to click the “Next >” button to specify the definition, which fields have to be shown in the export file and how these fields have to be filled. The fields of the definition for Microsoft® Dynamics® AX 2012, look like this: Data export field Description Table Field Array

index Method Primary

key

SACHKONTONUMMER Nummer des Sachkontos

MainAccount MainAccountId 1 Yes

SACHKONTONAME Bezeichnung des Sachkontos

MainAccount Name 1

SACHKONTOTYP Typ des Sachkontos

MainAccount Type 1

SACHKONTOSPERRE Gesperrt für manuelle Buchungen

MainAccount 0 displayIsBlocked

SACHKONTOEXCLUSIVBENUTZER Exklusiver Benutzer dieses Sachkontos

MainAccount UserInfoId 1

SACHKONTOBENUTZUNG Einstellung für einzelnen Benutzer des Sachkontos

MainAccount ValidateUser 1

KONTENART Kontenart MainAccount Type 1

Page 15: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

15

After the export fields have been defined, the user closes the form using the “Finish” button.

3.2. Definition of the GoBD table containing the general ledger transaction data The export table “Sachkontobuchungen” contains the general ledger transactions, which have been

created in the current legal entity. In Microsoft® Dynamics® AX 2012, the table GeneralLedger-

AccountJournal has been defined not to be saved per company. In order to ensure that only the

correct ledger transactions are exported, a relation has to be set towards a table, which is saved per

company and which does surely exist for each ledger transaction. The table TransactionLog does not

qualify for this task any more: In case that the setup in the general ledger parameters in tab page

“Batch transfer rules” has caused a ledger transaction to be created in batch mode, AX has not

created an entry in table TransactionLog for this ledger transaction. For this reason, this document

uses the table CompanyInfo, assuming that the prerequisites explained in the chapter “Definition of

the GoBD table containing the general ledger account data” have been followed.

3.2.1. Query structure for searching the general ledger transactions In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Sachkontobuchungen” (General ledger transactions).

Page 16: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

16

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. After having followed

the prerequisites above, the query structure has to look like shown below.

3.2.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

Page 17: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

17

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this: Data export field Description Table Field Array

index Method Primary

key

SACHKONTONUMMER Nummer des Sachkontos GeneralJournal-AccountEntry

0 de-LedgerAccount_FR

BUCHUNGSDATUM BUCHUNGSDATUM GeneralJournalEntry AccountingDate 1

BUCHUNGSNUMMER Interne Belegnummer der Buchung

GeneralJournalEntry SubledgerVoucher 1

BUCHUNGSTEXT Text zur Buchung GeneralJournal-AccountEntry

0 deEcritureLib_FR

BUCHUNGSBETRAG Betrag der Buchung in Buchungswährung

GeneralJournal-AccountEntry

TransactionCurrencyAmount

1

BUCHUNGSWÄHRUNG Währung der Buchung GeneralJournal-AccountEntry

TransactionCurrencyCode

1

BUCHUNGSWERT Wert der Buchung in Firmenwährung

GeneralJournal-AccountEntry

AccountingCurrency-Amount

1

BELEGDATUM Datum des Belegs GeneralJournalEntry DocumentDate 1

BELEGNUMMER Externe Belegnummer der Buchung

GeneralJournalEntry DocumentNumber 1

SPEZIALBUCHUNG 0-Steuerbil.; andere Buchungsebene: int. Buchung

GeneralJournalEntry PostingLayer 1

STEUERBUCHUNGSREFERENZ

Gibt es hierzu eine Mehrwertsteuerbuchung?-lfd Nr

GeneralJournal-AccountEntry

0 displayTaxRefId

PERIODENZUGEHÖRIGKEIT

Vortrag, Normal oder Abschlussbuchung

FiscalCalendarPeriod Type 1

ERFASSUNGSNUMMER Nummer der Erfassung GeneralJournalEntry 0 displayLedger-JournalId

JOURNALZEILE Zeile des Journals GeneralJournal-AccountEntry

0 displayLedger-JournalizeSeqNum

GEGENKONTO Nummer des Gegenkontos

GeneralJournal-AccountEntry

0 displayOffset-Accounts

BUCHUNGSTYP Buchungstyp GeneralJournal-AccountEntry

PostingType 1

KORREKTUR Korrektur GeneralJournal-AccountEntry

IsCorrection 1

HABENBUCHUNG Habenbuchung GeneralJournal-AccountEntry

IsCredit 1

PERIODENCODE Periodencode FiscalCalendarPeriod Type 1

After the export fields have been defined, the user closes the form using the “Finish” button.

Page 18: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

18

3.2.3. Additional setup to be performed The transaction tables have to contain only records of the date interval, for which the GoBD export is

created. The records, which belong to this date interval, are determined from a date field, which has

to be specified on each export table. If no such export field is present, the whole table has to be

exported.

On the general ledger transaction table “Sachkontobuchungen” (see chapter “Query structure for

searching the general ledger transactions”), the following setup is required:

- In form “Data export tables”, the field “Data export field for period” has to be set to “BUCHUNGSDATUM”.

The German GoBD export consists of the data files and of a file INDEX.XML, in which the internal

structure of the export has to be specified. This structure consists of

- the name and size of each data file, - the field sequence and field contents in each data file - and the relations between the fields in different data files. Some data files contain key fields,

which are referenced in other tables. These key fields have to be specified in the definition groups.

On the general ledger transaction table “Sachkontobuchungen”, the relation to the main account

table “Sachkonten” has to be defined in the following way:

- In form “Data export tables”, click the “Data export relations” button and create a line, in which the data export field “SACHKONTONUMMER” has a related data export table “Sachkonten”.

Page 19: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

19

3.3. Definition of the GoBD table containing the sales tax code data The export table “Umsatzsteuercodes” contains the sales tax codes, which have been created in the

current legal entity and the tax percentages, which have to be used with these tax codes.

3.3.1. Query structure for searching the sales tax codes In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Umsatzsteuercodes” (Sales tax codes).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. The query structure

has to look like shown below.

Page 20: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

20

3.3.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

The fields, which correspond to the definition for Microsoft® Dynamics® AX 2012, look like this:

Page 21: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

21

Data export field Description Table Field Array index

Method Primary key

MWST_CODE MWST Bezeichnung TaxTrans TaxCode 1 Yes

NAME Name TaxTable TaxName 1

BUCHUNGSGRUNDLAGE Buchungsgrundlage TaxTable TaxBase 1

PROZENTSATZ Prozentsatz TaxData TaxValue 1

GÜLTIGAB Gültig ab TaxData TaxFromDate 1

GÜLTIGBIS Gültig bis TaxData TaxToDate 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.4. Definition of the GoBD table containing the sales tax group data The export table “MehrwertsteuerGruppen” contains the sales tax groups and the sales tax code,

which belong to that sales tax group.

3.4.1. Query structure for searching the sales tax groups In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “MehrwertsteuerGruppen” (Sales tax groups).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. As the tax authorities

request the information, whether the tax on cash discount has to be deducted, the query structure

has to look like shown below.

Page 22: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

22

3.4.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this:

Data export field Description Table Field Array index

Method Primary key

MEHRWERTSTEUERGRUPPE Mehrwertsteuergruppe TaxGroupData TaxGroup 1

Page 23: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

23

Data export field Description Table Field Array index

Method Primary key

BESCHREIBUNG Beschreibung TaxGroupHeading TaxGroupName 1

MWST_AUF_SKONTO_STORNIEREN MWSt auf Skonto stornieren

TaxGroupHeading TaxReverseOnCashDisc 1

MEHRWERTSTEUERCODE Mehrwertsteuercode TaxGroupData TaxCode 1

MWST_CODE_NAME MWSt Code Name TaxGroupData 0 taxName

ERWERBSSTEUER Erwerbssteuer TaxGroupData UseTax 1

PROZENTSATZ Prozentsatz TaxGroupData 0 showTaxValue

After the export fields have been defined, the user closes the form using the “Finish” button.

3.5. Definition of the GoBD table containing the sales tax transaction data The export table “Umsatzsteuerbuchungen” contains the sales tax transactions, which have been

created in the current legal entity.

3.5.1. Query structure for searching the sales tax transactions In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Umsatzsteuerbuchungen” (Sales tax transactions).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. The query structure

has to look like shown below.

Page 24: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

24

3.5.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this:

Data export field Description Table Field Array index

Method Primary key

STEUERART Beschreibung der Steuerart

TaxTable TaxName 1

MWST_CODE MWST Bezeichnung TaxTrans TaxCode 1

Page 25: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

25

Data export field Description Table Field Array index

Method Primary key

WERTSTELLUNG Datum der Wertstellung der Buchung

TaxTrans TransDate 1

BELEGNUMMER Interne Nummer des Buchungsbelegs

TaxTrans Voucher 1

BUCHUNGSWÄHRUNG Währung der Buchung TaxTrans CurrencyCode 1

BUCHUNGSBETRAG Betrag der Buchung TaxTrans TaxAmountCur 1

BUCHUNGSWERT Wert der Buchung in Firmenwährung

TaxTrans TaxAmount 1

STEUERBUCHUNGSREFERENZ Gibt es hierzu eine MWST-Buchung? - Referenz Sachkonto.

TaxTrans 0 displayTaxRefId

QUELLE Quelle TaxTrans Source 1

STEUERRICHTUNG Mehrwertsteuerart TaxTrans TaxDirection 1

BELEGWÄHRUNG Belegwährung TaxTrans SourceCurrencyCode 1

GRUNDLAGE Grundlage TaxTrans SourceBaseAmountCur 1

PROZENTSATZ Prozentsatz TaxTrans 0 taxValueFromTaxCode

MWST_GRUPPE MwSt Gruppe TaxTrans TaxGroup 1

KONTO_MWST_AUSGABEN Konto MwSt Ausgaben TaxTrans 0 accountName

SACHKONTO Sachkonto TaxTrans 0 costAccountNum

ARTIKEL_MWST_GRUPPE Artikel-Mehrwertsteuergruppe

TaxTrans TaxItemGroup 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.5.3. Additional setup to be performed The transaction tables have to contain only records of the date interval, for which the GoBD export is

created. The records, which belong to this date interval, are determined from a date field, which has

to be specified on each export table. If no such export field is present, the whole table has to be

exported.

On the tax transaction table “Umsatzsteuerbuchungen” (see chapter “Query structure for searching

the sales tax transactions”), the following setup is required:

- In form “Data export tables”, the field “Data export field for period” has to be set to “WERTSTELLUNG”.

The German GoBD export consists of the data files and of a file INDEX.XML, in which the internal

structure of the export has to be specified. This structure consists of

- the name and size of each data file, - the field sequence and field contents in each data file

Page 26: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

26

- and the relations between the fields in different data files. Some data files contain key fields, which are referenced in other tables. These key fields have to be specified in the definition groups.

On the tax transaction table, the relation to the tax code table has to be defined in the following way:

- In form “Data export tables”, click the “Data export relations” button and create a line, in which the data export field “MWST_CODE” has the data export table “Umsatzsteuercodes”, which exports the sales tax code data.

3.6. Definition of the GoBD table containing the customer data The export table “Kunden” contains the customer data, which have been created in the current legal

entity.

3.6.1. Query structure for searching the customer data In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Kunden” (Customers).

Page 27: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

27

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. Since the introduction

of the global address book, the address date of the customer are not saved in the customer table any

more. Instead, the customer table contains a link to a record in the global address book, which

contains the name and the primary address of that contact. In order to resolve these references, the

query structure has to look like shown below.

3.6.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

Page 28: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

28

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this:

Data export field Description Table Field Array index

Method

Primary key

KUNDENKONTO-NUMMER Nummer des Kundenkontos CustTable AccountNum 1 Yes

KUNDENNAME Name des Kunden DirPartyTable Name 1

KUNDENSTRAßE Straße des Kunden LogisticsPostal-Address Street 1

KUNDENPLZ Postleitzahl des Kunden LogisticsPostal-Address ZipCode 1

KUNDENORT Ort des Kunden LogisticsPostal-Address City 1

KUNDENSTAAT Staat des Kunden LogisticsPostal-Address Country-RegionId 1

KUNDENGRUPPE Gruppe, der der Kunde zugeordnet ist

CustTable CustGroup 1

KUNDENUSTIDNR USt-IdNr des Kunden CustTable VATNum 1

KUNDENEIGENE-KONTONR Eigene Kontonummer beim Kunden

CustTable OurAccount-Num 1

KUNDEN-LIEFERANTENNR Lieferantenkonto bei uns CustTable VendAccount 1

KUNDEN-RECHNUNGSKONTO

Kundenkonto für Rechnungen CustTable InvoiceAccount 1

MWST_GRUPPE MWSt Gruppe - Inland / EU / Drittland

CustTable TaxGroup 1

WÄHRUNG Währung CustTable Currency 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.7. Definition of the GoBD table containing the customer transactions The export table “Kundenbuchungen” contains the customer transaction data, which have been

created in the current legal entity.

Page 29: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

29

3.7.1. Query structure for searching the customer transaction data In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Kundenbuchungen” (Customer transactions).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. The query structure

has to look like shown below.

3.7.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

Page 30: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

30

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this:

Data export field Description Table Field Array index Method Primary key

KUNDENKONTONUMMER Kontonummer des Kundenkontos

CustTrans AccountNum 1

BUCHUNGSNUMMER Interne Belegnummer der Buchung

CustTrans Voucher 1

BUCHUNGSDATUM Wertstellung der Buchung CustTrans TransDate 1

BELEGNUMMER Externe Belegnummer der Buchung

CustTrans DocumentNum 1

BELEGDATUM Datum des externen Belegs CustTrans DocumentDate 1

BUCHUNGSTEXT Buchungstext der Buchung CustTrans Txt 1

BUCHUNGSBETRAG Betrag der Buchung in Buchungswährung

CustTrans AmountCur 1

BUCHUNGSWÄHRUNG Währung der Buchung CustTrans CurrencyCode 1

BUCHUNGSWERT Wert der Buchung in Firmenwährung

CustTrans AmountMST 1

LETZTER_AUSGLEICHSBELEG Letzter Ausgleichsbeleg CustTrans LastSettleVoucher 1

LETZTER_AUSGLEICH Letzter Ausgleich CustTrans LastSettleDate 1

BUCHUNGSART Buchungsart CustTrans TransType 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.7.3. Additional setup to be performed The transaction tables have to contain only records of the date interval, for which the GoBD export is

created. The records, which belong to this date interval, are determined from a date field, which has

to be specified on each export table. If no such export field is present, the whole table has to be

exported.

On the customer transaction table “Kundenbuchungen” (see chapter “Query structure for searching

the customer transaction data”), the following setup is required:

Page 31: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

31

- In form “Data export tables”, the field “Data export field for period” has to be set to “BUCHUNGSDATUM”.

The German GoBD export consists of the data files and of a file INDEX.XML, in which the internal

structure of the export has to be specified. This structure consists of

- the name and size of each data file, - the field sequence and field contents in each data file - and the relations between the fields in different data files. Some data files contain key fields,

which are referenced in other tables. These key fields have to be specified in the definition groups.

On the customer transaction table, the relation to the customer table has to be defined in the

following way:

- In form “Data export tables”, click the “Data export relations” button and create a line, in which the data export field “KUNDENKONTONUMMER” has a related data export table, which exports the customer data.

Page 32: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

32

3.8. Definition of the GoBD table containing the vendor data The export table “Lieferanten” contains the vendor data, which have been created in the current

legal entity.

3.8.1. Query structure for searching the vendor data In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Lieferanten” (Vendors).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. Since the introduction

of the global address book, the address date of the vendor are not saved in the vendor table any

more. Instead, the vendor table contains a link to a record in the global address book, which contains

the name and the primary address of that contact. In order to resolve these references, the query

structure has to look like shown below.

Page 33: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

33

3.8.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

The fields, which correspond to the definition for Microsoft® Dynamics® AX 2009, look like this:

Page 34: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

34

Data export field Description Table Field Array index Method Primary key

LIEFERANTENKONTO-NUMMER

Nummer des Lieferantenkontos

VendTable AccountNum 1 Yes

LIEFERANTENNAME Name des Lieferanten DirPartyTable Name 1

LIEFERANTENSTRAßE Straße des Lieferanten LogisticsPostalAddress Street 1

LIEFERANTENPLZ Postleitzahl des Lieferanten LogisticsPostalAddress ZipCode 1

LIEFERANTENORT Ort des Lieferanten LogisticsPostalAddress City 1

LIEFERANTENSTAAT Staat des Lieferanten LogisticsPostalAddress CountryRegionId 1

LIEFERANTENGRUPPE Gruppe, der der Lieferant zugeordnet ist

VendTable VendGroup 1

LIEFERANTENUSTIDNR USt-IdNr des Lieferanten VendTable VATNum 1

LIEFERANTENKUNDEN-KONTO

Kundenkonto des Lieferanten bei uns

VendTable 0 CustAccount

LIEFERANTEN-RECHNUNGSKONTO

Lieferantenkonto für Rechnungsstellung

VendTable InvoiceAccount 1

MWST_GRUPPE MWSt Gruppe - Inland / EU / Drittland

VendTable TaxGroup 1

WÄHRUNG Währung VendTable Currency 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.9. Definition of the GoBD table containing the vendor transactions The export table “Lieferantenbuchungen” contains the vendor transaction data, which have been

created in the current legal entity.

3.9.1. Query structure for searching the vendor transaction data In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Lieferantenbuchungen” (Vendor transactions).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. The query structure

has to look like shown below.

Page 35: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

35

3.9.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this:

Data export field Description Table Field Array index Method Primary key

LIEFERANTENKONTONUMMER Nummer des Lieferantenkontos

VendTrans AccountNum 1

BUCHUNGSNUMMER Interne Belegnummer der Buchung

VendTrans Voucher 1

Page 36: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

36

Data export field Description Table Field Array index Method Primary key

BUCHUNGSDATUM Wertstellung der Buchung VendTrans TransDate 1

BELEGNUMMER Externe Belegnummer der Buchung

VendTrans DocumentNum 1

BELEGDATUM Datum des externen Belegs VendTrans DocumentDate 1

BUCHUNGSTEXT Buchungstext der Buchung VendTrans Txt 1

BUCHUNGSBETRAG Betrag der Buchung in Buchungswährung

VendTrans AmountCur 1

BUCHUNGSWÄHRUNG Währung der Buchung VendTrans CurrencyCode 1

BUCHUNGSWERT Wert der Buchung in Firmenwährung

VendTrans AmountMST 1

LETZTER_AUSGLEICHSBELEG Letzter Ausgleichsbeleg VendTrans LastSettleVoucher 1

LETZTER_AUSGLEICH Letzter Ausgleich VendTrans LastSettleDate 1

BUCHUNGSART Buchungsart VendTrans TransType 1

STATUS Status VendTrans Approved 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.9.3. Additional setup to be performed The transaction tables have to contain only records of the date interval, for which the GoBD export is

created. The records, which belong to this date interval, are determined from a date field, which has

to be specified on each export table. If no such export field is present, the whole table has to be

exported.

On the vendor transaction table “Lieferantenbuchungen” (see chapter “Query structure for searching

the vendor transaction data”), the following setup is required:

- In form “Data export tables”, the field “Data export field for period” has to be set to “BUCHUNGSDATUM”.

The German GoBD export consists of the data files and of a file INDEX.XML, in which the internal

structure of the export has to be specified. This structure consists of

- the name and size of each data file, - the field sequence and field contents in each data file - and the relations between the fields in different data files. Some data files contain key fields,

which are referenced in other tables. These key fields have to be specified in the definition groups.

Page 37: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

37

On the vendor transaction table, the relation to the vendor table has to be defined in the following

way:

- In form “Data export tables”, click the “Data export relations” button and create a line, in which the data export field “LIEFERANTENKONTONUMMER” has a related data export table, which exports the vendor data.

3.10. Definition of the GoBD table containing the fixed asset base data The export table “Anlagen” contains the fixed asset base data, which have been created in the

current legal entity.

3.10.1. Query structure for searching the fixed asset data In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Anlagen” (Fixed assets).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. The query structure

has to look like shown below.

Page 38: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

38

3.10.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this:

Data export field Description Table Field Array index Method Primary key

ANLAGENNUMMER Interne Nummer der Anlage AssetTable AssetId 1 Yes

ANLAGENBEZEICHNUNG Bezeichnung der Anlage AssetTable Name 1

Page 39: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

39

Data export field Description Table Field Array index Method Primary key

ANLAGENGRUPPE Gruppe, der die Anlage zugeordnet ist

AssetTable AssetGroup 1

ANLAGENTYP Typ der Anlage AssetTable AssetType 1

ANLAGENSTANDORT Standort der Anlage AssetTable Location 1

HAUPTANLAGE Nummer der Anlage, der die Anlage zugeordnet ist

AssetTable MainAssetId 1

ANLAGENHERSTELLER Hersteller der Anlage AssetTable Make 1

ANLAGENMODELL Modellnummer der Anlage AssetTable Model 1

STATUS Status der Anlage, ob vorhanden oder nicht

AssetBook Status 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.11. Definition of the GoBD table containing the fixed asset transactions The export table “Anlagenbuchungen” contains the fixed asset transaction data, which have been

created in the current legal entity.

3.11.1. Query structure for searching the fixed asset transaction data In menu option “General ledger\ Periodic\ Data export\ Data export definition groups”, the user

selected the definition group “GoBD”, clicked the “Data export tables” button and created the line

for the GoBD export table “Anlagenbuchungen” (Fixed asset transactions).

Then the user clicks the “Data export fields” button. The form “Data export fields” opens and the

user has to specify the tables, from which data have to be read and exported. The query structure

has to look like shown below.

Page 40: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

40

3.11.2. Field list of the fields in the export file with their AX data sources After the user set up the query structure, the user has to click the “Next >” button to specify the

definition, which fields have to be shown in the export file and how these fields have to be filled.

The fields of the definition for Microsoft® Dynamics® AX 2012, look like this:

Data export field Description Table Field Array index Method Primary key

ANLAGENNUMMER Interne Nummer der Anlage AssetTrans AssetId 1

Page 41: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

41

Data export field Description Table Field Array index Method Primary key

WERTSTELLUNG Datum der Wertstellung der Buchung

AssetTrans TransDate 1

BELEGNUMMER Interne Nummer des Buchungsbelegs

AssetTrans Voucher 1

BUCHUNGSBETRAG Betrag der Buchung AssetTrans AmountCur 1

BUCHUNGSWÄHRUNG Währung der Buchung AssetTrans CurrencyCode 1

BUCHUNGSWERT Wert der Buchung in Firmenwährung

AssetTrans AmountMST 1

BUCHUNGSART Art der Anlagenbuchung AssetTrans TransType 1

BUCHUNGSTEXT Text zur Anlagenbuchung AssetTrans Txt 1

ANLAGENGRUPPE Gruppe, der die Anlagenbuchung zugeordnet ist

AssetTrans AssetGroup 1

BUCHUNGSEBENE 0- Steuerbilanz; sonst: interne Buchungen

AssetBookTable CurrentOperationsTax 1

After the export fields have been defined, the user closes the form using the “Finish” button.

3.11.3. Additional setup to be performed The transaction tables have to contain only records of the date interval, for which the GoBD export is

created. The records, which belong to this date interval, are determined from a date field, which has

to be specified on each export table. If no such export field is present, the whole table has to be

exported.

On the fixed asset transaction table “Anlagenbuchungen“ (see chapter “Query structure for searching

the fixed asset transaction data”), the following setup is required:

- In form “Data export tables”, the field “Data export field for period” has to be set to “WERTSTELLUNG”.

The German GoBD export consists of the data files and of a file INDEX.XML, in which the internal

structure of the export has to be specified. This structure consists of

- the name and size of each data file, - the field sequence and field contents in each data file - and the relations between the fields in different data files. Some data files contain key fields,

which are referenced in other tables. These key fields have to be specified in the definition groups.

On the asset transaction table, the relation to the asset table has to be defined in the following way:

Page 42: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

42

- In form “Data export tables”, click the “Data export relations” button and create a line, in

which the data export field “ANLAGENNUMMER” has a related data export table, which exports the asset base data.

4. Perform a GoBD data export

4.1. Prerequisites The file INDEX.XML, which contains the data structure of the GoBD export files, uses an XML syntax,

which is defined in a DTD file. This DTD file needs to be copied into the file system, on which the

GoBD export has to be executed.

The file is named GoBD-01-08-2002.dtd and has the following contents

<?xml version="1.0" encoding="UTF-8"?>

<!--Versions available:

1.1 (August-01-2002)

-->

<!-- Start Simple Types -->

<!-- Supplementary Vocabulary -->

<!ELEMENT Version (#PCDATA)>

<!ELEMENT Location (#PCDATA)>

<!ELEMENT Comment (#PCDATA)>

<!ELEMENT Length (#PCDATA)>

<!ELEMENT References (#PCDATA)>

<!ELEMENT From (#PCDATA)>

<!ELEMENT To (#PCDATA)>

Page 43: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

43

<!-- Specifying a maximum length for a VariableLength column can

reduce a VariableLength tables' import time. If MaxLength

is not specified then we parse URL to determine the MaxLength

for each column.

* Only applies to VariableLength tables. -->

<!ELEMENT MaxLength (#PCDATA)>

<!-- Specifies which character (if any) encapsulates a

VariableLength AlphaNumeric column.

Doublequote is the default TextEncapsulator "

* Only applies to VariableLength tables. (Optional) -->

<!ELEMENT TextEncapsulator (#PCDATA)>

<!-- Specifies how many digits appear to the right of the decimal symbol.

CAUTION: Results are undefined when importing numeric data with

greater Accuracy than the Accuracy defined in index.xml

For example trying to import the value 1000,25 with an

accuracy of 0 might result in 1000 or an error. This

behavior is specific to the implementation.

Zero is the default Accuracy '0' (Optional)

-->

<!ELEMENT Accuracy (#PCDATA)>

<!-- The decimal place is not always stored with numbers. If each number

Page 44: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

44

is supposed to have decimal places use ImpliedAccuracy -->

<!ELEMENT ImpliedAccuracy (#PCDATA)>

<!-- Enables you to change how GoBD displays dates.

DD.MM.YYYY is the default Format -->

<!ELEMENT Format (#PCDATA)>

<!-- Specifies the symbol that indicates decimal values.

Comma is the default DecimalSymbol. ','

Specified once per Table. -->

<!ELEMENT DecimalSymbol (#PCDATA)>

<!-- Specifies the symbol that groups the digits in large numbers.

Dot is the default DigitGroupingSymbol or ThousandsSeperator. '.'

Specified once per Table -->

<!ELEMENT DigitGroupingSymbol (#PCDATA)>

<!-- Command(s) are executed in the following manner

* before the import process

* after the import process

* before a Media is imported

* after a Media is imported

-->

<!ELEMENT Command (#PCDATA)>

<!-- Only the file protocol is supported at this time.

* The standard uses relative URLs.

Absolute URLs are not allowed. The following are all invalid:

* http://www.somewhere.com/data/Accounts.dat

Page 45: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

45

* ftp://ftp.somewhere.com/data/Accounts.dat

* file://localhost/Accounts.dat

* file:///Accounts.dat

The following are valid examples

* Accounts.dat

* data/Accounts.dat

* data/january/Accounts.dat

* ../Accounts.dat

-->

<!ELEMENT URL (#PCDATA)>

<!-- Textual description of specified element (Optional) -->

<!ELEMENT Description (#PCDATA)>

<!-- The logical name of specified element.

Sometimes referred to business name.

If missing, URL will be used in place of Name. -->

<!ELEMENT Name (#PCDATA)>

<!-- Y2K Window Any year before Epoch is 2000+

Default value 30. -->

<!ELEMENT Epoch (#PCDATA)>

<!-- Element(s) that separate columns or records.

Semicolon is the default ColumnDelimiter. ';'

CRLF or &#13;&#10; is the default RecordDelimiter. -->

<!ELEMENT ColumnDelimiter (#PCDATA)>

<!ELEMENT RecordDelimiter (#PCDATA)>

Page 46: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

46

<!-- The number of bytes skipped before reading of URL commences.

Zero is the default when not specified. '0'

-->

<!ELEMENT SkipNumBytes (#PCDATA)>

<!-- End Simple Types -->

<!-- Start Complex Types -->

<!-- Self-explanatory -->

<!ELEMENT Range (From, (To | Length)?)>

<!ELEMENT FixedRange (From, (To | Length))>

<!-- The document element -->

<!ELEMENT DataSet (Version, DataSupplier?, Command*, Media+, Command*)>

<!-- Supported datatypes (mandatory) -->

<!ELEMENT AlphaNumeric EMPTY>

<!ELEMENT Date (Format?)>

<!ELEMENT Numeric ((ImpliedAccuracy | Accuracy)?)>

<!-- Supported codepages:

Be careful to explicitly define RecordDelimiter when using

a non-default codepage.

ANSI is the default codepage when not specified -->

<!ELEMENT ANSI EMPTY>

<!ELEMENT Macintosh EMPTY>

<!ELEMENT OEM EMPTY>

<!ELEMENT UTF16 EMPTY>

<!ELEMENT UTF7 EMPTY>

<!ELEMENT UTF8 EMPTY>

Page 47: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

47

<!-- Supported file formats:

FixedLength

VariableLength -->

<!ELEMENT FixedLength ((Length | RecordDelimiter)?, ((FixedPrimaryKey+, FixedColumn*) |

(FixedColumn+)), ForeignKey*)>

<!ELEMENT FixedColumn (Name, Description?, (Numeric | AlphaNumeric | Date), Map*,

FixedRange)>

<!ELEMENT FixedPrimaryKey (Name, Description?, (Numeric | AlphaNumeric | Date), Map*,

FixedRange)>

<!ELEMENT VariableLength (ColumnDelimiter?, RecordDelimiter?, TextEncapsulator?,

((VariablePrimaryKey+, VariableColumn*) | (VariableColumn+)), ForeignKey*)>

<!ELEMENT VariableColumn (Name, Description?, (Numeric | (AlphaNumeric, MaxLength?) | Date),

Map*)>

<!ELEMENT VariablePrimaryKey (Name, Description?, (Numeric | (AlphaNumeric, MaxLength?) |

Date), Map*)>

<!-- Description of the entity supplying the data. (Optional) -->

<!ELEMENT DataSupplier (Name, Location, Comment)>

<!-- The first Media will contain index.xml. Importing will process each media listed -->

<!ELEMENT Media (Name, Command*, Table+, Command*)>

<!-- Elements common to FixedLength & VariableLength are propagated to Table. -->

<!ELEMENT Table (URL, Name?, Description?, Validity?, (ANSI | Macintosh | OEM | UTF16 | UTF7 |

UTF8)?, (DecimalSymbol, DigitGroupingSymbol)?, SkipNumBytes?, Range?, Epoch?, (VariableLength |

FixedLength))>

<!-- ForeignKeys denote joins or relationships between tables.

To successfully join two tables make sure both the PrimaryKey

and the referenced column (foreignkey) are of the same datatype.

Results are undefined when joining two tables with different

key datatypes. Most likely an error will occur. -->

<!ELEMENT ForeignKey (Name+, References)>

Page 48: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

48

<!-- Maps AlphaNumeric columns from 'From' to 'To'

ie. From To

============ =============

True 1

True -1

False 0

Basically, a map is an associative container.

The standard implementation only supports

AlphaNumeric datatypes. The following

conversions are NOT supported.

Numeric -> AlphaNumeric

Date -> AlphaNumeric

AplhaNumeric -> Date

AlphaNumeric -> Numeric

-->

<!ELEMENT Map (Description?, From, To)>

<!-- Documentation for table validity. -->

<!ELEMENT Validity (Range, Format?)>

<!-- End Complex Types -->

You may copy the contents above and save them in an ANIS text file on the system, where the GoBD

export is executed.

4.2. Execution of the GoBD export

In Microsoft® Dynamics® Ax 2012, the user has to run the menu option “General ledger\ Periodic\

Data export\ Data export”.

Page 49: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

49

AX opens a wizard form, which will lead the user through the process.

On the first page, the user may only use the “Next >” button to continue the process or the “Cancel”

button to abort the export.

On the next page, the user specifies the export definition group, which has to be used for the export.

Then the user specifies the date interval, for which the export has to be created. Please note that

separate exports have to be created for each fiscal year. Then, the user has to click the “Next >”

button to continue the export process.

Page 50: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

50

On the next screen, the user has to assign a version number and a comment to the export. The

location of the DTD file has to be specified as well as the drive, on which the export data will be

written. AX assumes that the data are written on the hard disk into directories, which will be named

like the CDs or DVDs, on which the export will be copied for delivery to the tax auditors. For this

reason, an expected capacity of the media, on which the export will be copied, has to be specified

together with the estimated length of the file INDEX.XML, which will be created during the export

and write on the first CD respectively the first export directory.

The user specifies the information on this screen and then clicks the “Next >” button.

On the last screen, the user starts the export by clicking the “Finish” button.

Depending on the number of records to be exported, the export may take from some minutes to

several hours. During this time, the AX session has to remain up and running.

Page 51: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

51

After the export has finished, the user will find at least one directory starting with the data media

name, in which the files specified in the data export definition group have been created.

Page 52: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

52

4.3. How to create a Display method Example: new Display method on Table GeneralJournalAccountEntry

A) Press Ctrl +D in order to open the AOT B) Use button View - Project

C) Create a new Shared Project (right mouse-click on Shared)

D) Open the new Project (right mouse-click – Open)

E) Go to the AOT – Tables – GeneralJournalAccountEntry. Click on table GeneralJournalAccountEntry, keep the left mouse clicked and move it to the new Project – hover over Project2 and let the mouse loose

F) Create a new method: open the node Methods of Table GeneralJournalAccountEntry, highlight the Methods, right mouse-click – New method

Page 53: Setup GDPdU export for Germany with AX 2012 - Microsoft · PDF fileSetup of the GoBD export for Germany in Microsoft Dynamics AX ... a Microsoft® Dynamics® AX 2012 ... AX 2009, a

53

G) Delete the content of the new method

H) and copy the following lines into the method: public display RefRecId displaySalesTaxTransId() { RefRecId result = 0; TaxTransGeneralJournalAccountEntry taxTransGeneralJournalAccountEntry; ; select taxTransGeneralJournalAccountEntry where taxTransGeneralJournalAccountEntry.GeneralJournalAccountEntry == this.RecId; if (taxTransGeneralJournalAccountEntry) { result = taxTransGeneralJournalAccountEntry.TaxTrans; } return result; }

I) save the method J) save the project

K) Generate Incremental CIL

L) In AOT highlight table GeneralJournalAccountEntry, right mouse-click - Synchronize


Recommended