Microsoft Dynamics GP: Data Management

0
129
13 min read

 

Microsoft Dynamics GP 2010 Reporting

Microsoft Dynamics GP 2010 Reporting

Create and manage business reports with Dynamics GP

        Read more about this book      

(For more resources on Microsoft Dynamics, see here.)

Knowing where to begin is a critical first step in the development process. The aim of this article is to provide helpful tips for finding and locating data in the Dynamics GP 2010 ERP system and company databases. Although we’ll discuss some reporting tools that do not require us to know the SQL database structure for Dynamics GP companies, it is still helpful to understand how GP stores its data.

DYNAMICS database versus company database

The first task of identifying where our data is located is making sure we are using the correct database! Microsoft Dynamics GP 2010 utilizes the Microsoft SQL Server platform as its database engine. When Dynamics GP 2010 is installed on our environment and a new company is created, the installation process creates several databases on a server that has been designated during the install. These databases will store all the information entered through the Dynamics GP 2010 application, and we can use SQL Server Management Studio to access the underlying tables that store this data.

Microsoft Dynamics GP has two types of databases: a system database (DYNAMICS) and company database(s). For first-time report developers and seasoned writers, knowing which of these databases stores a particular piece of information we need is crucial for an accurate report.

What is the DYNAMICS database?

When Microsoft Dynamics GP is first installed and some initial settings are provided, a system database will be created. This database is the DYNAMICS database. It includes such things as records for each company that you create, the organizations registration information, the maximum account framework, and so on.

Regardless of how many company databases we have, they will all share a single DYNAMICS database.

From a reporting standpoint, there is certain information located in the system database that we may need to report on at one time or another. We have provided a quick reference for this information below:

  • Multicurrency System Setups – This includes the setup of the currencies, the exchange rates, and the currency symbols for those organizations that process transactions in any number of foreign currencies.
  • Intercompany Setup – This is where the intercompany relationships are stored and the specific due to/due from accounts are mapped.
  • Organizations Structures – This will include the organizational levels and entities that have been created for those organizations that use this feature.
  • User Master – This table stores information about the users in the ERP system, including their user ID and username.
  • User Tasks – This table stores the tasks that users set up in Dynamics GP. These are the tasks that are displayed on the users’ Home screens in GP.
  • Company Master – Stores company setup information such as whether security is enabled, the company ID is in the form of the company database ID in SQL Management Studio, primary address information, tax schedule defaults, and any number of options for the company.
  • Security Setups – This includes all of the security tasks, security roles, and user security assignments.
  • User-Company Access – Includes the companies that each user has access to.

Company database

Each company that we create in Dynamics GP has its own company database. As information such as transactions, accounts, and customer or vendor data is entered through GP, this information is recorded in individual fields. These fields comprise the smallest unit of data stored. All of this data makes up a record and a record is grouped with similar records and stored in a table.

For obvious reasons, this data is segmented by company database so that each company can maintain unique records. In addition to this transactional data, numerous additional company setups exist in the company database. As with the DYNAMICS database, we may need to report on some of these company system setups. Here is a quick reference to the more common company setup tables:

  • Account Formats – Stores the chart of accounts format for the company.
  • Posting Definitions – Stores how the individual modules post to the General Ledger.
  • Company Locations – Lists additional addresses for each company.
  • Source Document Master & Audit Trail Codes – Every transaction is assigned both a source document and an audit trail code. This table can be used to report on the full description of these codes.
  • Shipping Methods Master – Stores the setup details of the shipping methods for the company.
  • Payment Terms Master – Stores the setup details of the payment terms created for the company.
  • Record Notes Master – Stores all of the record level notes for the particular company.
  • Comment Master – Stores predefined comments to be used across multiple series in Dynamics GP.
  • Electronic Funds Transfer – Stores the EFT setup information for the company for both Payables and Receivables modules. This includes customer and vendor banking information.
  • Period Setup – Stores the fiscal period setup for the company.
  • Sales/Purchases Tax Tables – These tables store the tax detail and tax schedule records as well as the tax summary amounts.

Dynamics GP table naming/numbering conventions

Dynamics GP has a rather interesting and sometimes frustrating table naming structure. When developers or consultants first see this, they are overwhelmed, to say the least. However, once you learn that there is a rhyme and reason to the madness, it actually makes a lot of sense and it is quite easy to follow and locate the tables that we need.

Tables versus table groups

When data is entered into windows via the Microsoft Dynamics GP application, that data is stored in tables in the underlying SQL database. In most cases, data entered via a single process can be stored in two or more tables. In such cases, it is common for these tables to be grouped together by a certain naming convention. For example, entering journal entry information may update the Transactions Work table (contains General Ledger transaction header information), the Transaction Amounts Work table (contains the General Ledger transaction distributions), and the Transaction Clearing Amounts Work table (contains the General Ledger clearing transactions distributions). These make up what are called Table Groups. These table groups are also referred to as logical tables.

Each Microsoft Dynamics GP table has three names: a technical name, a display name, and a physical name. The technical name is used solely by the software and will usually be seen in some alert messages instead of the display name. The display name is the name that will appear in most of the alert messages generated by the system and is typically the name used for a given table when referring to it in speech, for example, Vendor Master. The physical name is the name that will be found in the SQL database when looking in Microsoft SQL Server Management Studio.

Physical table naming/numbering conventions

When working within the context of a SQL database to generate reports, developers and consultants will make use of the table physical names. A quick scan through the various tables in a standard GP install reveals a bewildering array of table numbers. How can there possibly be any rhyme or reason to these table names? Surprisingly, it does actually follow a certain pattern. For the most part, the table numbering follows a special convention. This schema packs a lot of information into a small number, and it can help developers and consultants know where to begin looking for their data.

As Dynamics GP has grown into a more comprehensive accounting solution, it has expanded, in part, by incorporating third-party applications into the solution. While many of the third-party programmers tried to stick within the relative bounds of the GP physical table naming conventions, as we will soon see, this is not always the case. So, while many of the tables that belong to the core GP modules maintain a fairly standard numbering convention, we will find that this does not hold true for all GP modules.

Generally speaking, GP table physical names contain a two or three digit alpha prefix followed by a five digit number. The three digit prefix represents the module for which the table holds data. The numbers that follow identify what type of data is held in the table. For example, is it posted transaction data? Or, is it information related to the module setup?

As we see in the next image and following sections of this chapter, the numbering schema for a Dynamics GP physical table can be broken down to reveal information about the kind of data that is found in that table.

Microsoft Dynamics GP 2010 Reporting

Alpha code

Let’s begin by taking a look at the alpha-prefix for these tables. We have put together a handy reference of some of the most common prefixes and the modules that they represent:

Prefix Module Prefix Module
AA Analytical Accounting MRP Material Requirements Planning
AF Advanced Financials MXLS Audit Trails/Electronic Signatures
ASI SmartList NLB Navigation List Builder
BM Bill of Materials (Mfg) OC Sales Configurator (Mfg)
CFM Cash Flow Management OSRC Outsourcing (Mfg)
CLM Certification Manager PA Project Accounting
CM Checkbook Master PDK Personal Data Keeper (Proj. Acct.)
CN Collections Management PM Payables Management
CP Capacity Requirements Planning (Mfg) POP Purchase Order Processing
DD Direct Deposit PP Revenue Expense Deferrals
EC Engineering Change Management (Mfg) QA Quality Assurance (Mfg)
ERB Excel Report Builder RM Receivables Management
EXT Extender RT Routings (Mfg)
FA Fixed Assets SC Sales Forecasting (Mfg)
GL General Ledger SLB SmartList Builder
HR Human Resources SOP Sales Order Processing
ICJC Job Costing (Mfg) SVC Field Service
IV Inventory SY System/Company Setup
IVC Invoicing (Sales) UPR Payroll
MC Multicurrency VAT Intrastat
ME Electronic Reconcile (EFT) WC Work Centers (Mfg)
MOP Manufacturing Order Processing WO Manufacturing Orders

In some modules, such as Manufacturing, tables are broken down even further with Routing tables represented by one set of digits while Material Requirements Planning data is found in tables represented by another set of digits. More commonly, however, entire modules are generally represented by a single alpha code, such as is the case with Project Accounting where all project transactions, billing, and revenue recognition tables are represented with the same alpha code.

Table type

Once we’ve identified the module in which our data might be stored, our next thought should be towards the type of data that we are trying to find. Before we return to the numbering convention, let’s take a look at the various types of data that exist in GP tables:

  • Setup: Almost all modules in GP have set up windows that allow users to define default options or other settings for how that module will be used. The options selected in these windows can be found in the Setup tables.
  • Master: Some modules, such as Payables Management, allow users to record master records. These master records represent permanent records, such as vendors, for the company. Typically, master records must be entered prior to using a module, as transactions will utilize these master records.
  • Transaction: These tables contain the transaction-level data from Dynamics GP. These include the most basic of GP transactions, the journal entry, to transactions entered in sub-ledgers, such as the distribution records of a posted Receivables invoice. Transactions entered in various modules will, depending on their status, be stored in one of three types of transaction tables:
    • Work: Un-posted transactions can generally be found in work tables. The name is appropriate, as these transactions can be considered a “work-in-progress”. They have not been committed to the sub or general ledgers via posting processes, so we should factor this into our thinking when deciding whether or not to include these records in our reports.
    • Open: Generally speaking, records in these tables have been posted, but are awaiting an additional action before they can be considered “closed” or “history”. In the General Ledger module, the open table represents all journal entries for the current open year. In other modules, such as Receivables Management, open tables contain data for receivables transactions that have not yet been fully applied.
    • History: Transactions that are “completed” generally end up in the history tables. Again, this depends on the module. For example, in Payables Management, fully applied invoices are moved to history. In Purchase Order Processing, however, a routine exists to move completed purchase orders to history. Until this routine is run, records will not be moved to history.
  • Cross Reference: Some tables represent data that spans multiple modules. For example, GP users can link purchase orders to unfulfilled sales order line items via Sales Order Commitment. The prefix of the table that contains these links indicates that this is a Sales Order Processing table, but in actuality, it contains data from Purchase Order Processing, as well.
  • In addition to these main table types, other table types exist that are less commonly used for reporting purposes. Nonetheless, it is helpful to understand what these table types contain:
    • Report Options: Before users can generate a report from the Reports menu, a series of options must be designated for that report. These report options are recorded in a series of report options tables.
    • Temp: As the name implies, data is only stored in these tables temporarily. Temporary tables can be used in a variety of situations, such as when a user presses the “Post” button for a transaction. Although rare, it may be necessary to use a temp table when designing a report that should contain data from the time of posting. For example, a sales invoice can be generated at the time the user posts the invoice and can be based on data stored in a temp table at the time.

In terms of the physical naming convention for GP tables, the data type is represented by the first digit following the module code. The following table contains the various table types and their associated number in the numbering convention:

Table Type Number
Master 0
Work 1
Open 2
History 3
Setup 4
Temporary 5
Cross Reference 6
Report Options 7

Sequence

The next two digits in the numbering convention make up the sequence number. This number indicates the logical table to which the table belongs. As we discussed earlier in the article, logical tables are related tables, or table groups, that share similar data. Not only do these table groups share similar data, but they also share the same data type and sequence number when it comes to the physical table numbering convention.

For example, let’s consider the following set of logical tables:

  • PM00200 (Vendor Master)
  • PM00201 (Vendor Master Summary)
  • PM00202 (Vendor Master Period Summary)
  • PM00203 (Vendor Accounts)
  • PM00204 (Purchasing 1099 Detail)

These tables comprise the Payables Vendor Master Logical File table group. We can easily see this by the numbers that follow the module code. First, we see that these tables share the same data type—remember, 0 means these are Master tables—and second, we see that these tables share the same sequence number. Although we need other tools to help us determine the name of the table group, we are able to easily scan through a list of table physical names in SQL Management Studio and see that these tables are in the same table group.

Variant

The final two digits of the physical numbering convention represent the logical group variant. Within a logical group, numbers are incremented sequentially. This is evident in our example using the Payables Vendor Master Logical File above; as we see the final two digits of each table increment by one.

In table groups related to transactions, the variant often distinguishes between header tables, detail tables, distribution tables, and other related tables.

Keep in mind, what we have discussed is only a general naming and numbering convention for GP tables in their SQL databases. Unfortunately, to the frustration of developers and consultants everywhere, these conventions do not hold true in all cases! At the very least, knowing this convention can point us in the right direction. We can rely on other tools and resources to help us pinpoint the right table when these conventions fall short.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here