Featured Post

Dynamics GP 2019 is now Released

It is now released, Microsoft Dynamics GP 2019 which moves the system to the modern product life cycle   " Beginning with the October...

Monday, October 26, 2015

SalesPerson and Sales Territory details - Customer Card and Customer Address Maintenance



In a previous post, an interesting case related to populating sales person and sales territory details when creating a new sales transaction entry sheds a light on an integration issue that is highly dependent on sales person and territory setup. In this essence, I believe it would be quite important to provide further valuable information as related to the same topic. 

In the sales module, there are two specific windows to be considered when filling out the sales person and territory assignment with a specific customer, which are: Customer Maintenance Window and Customer Address Maintenance window. Technically speaking, the data is stored in RM00101 (corresponding to the customer card) and RM00102 (corresponding to the customer address maintenance). 

Database Tables:
  • RM00101 - Customer Card (Cards > Sales > Customer)
  • RM00102 - Customer Address  (Cards > Sales > Customer Address)
Here are some facts:
  • When filling out the sales person and territory ID in the Customer Maintenance window, the corresponding customer address details are updated accordingly.
  • When filling out the sales person and territory ID in the Customer Address Maintenance window, the customer card is NOT updated accordingly.
  • When creating a new sales transaction (SOP document), sales person and territory details for a specific customer are derived from the Customer Address Maintenance window (not the customer card)
  • In case the both customer maintenance and customer address are filled with sales person and territory details, then the data stored in "Customer Address Maintenance"  will default when creating a sales order. Meanwhile, if there is no details in Customer Address window, the details will be derived from customer maintenance window.
Sales Person and Territory Details - Setup and Default Values
Therefore, when validating sales person and sales territory details. Checking the customer card, customers smart list or customer master report doesn't mean that the "Sales Person" and "Sales Territory" details are the ones that will be populated as default values when creating a sales order. The correct place to check is your customer address (RM00102)

The following SQL Statement will help you reconcile your sales person details between customer maintenance window and customer address window (RM00101 versus RM00102)

     
SELECT  A.CUSTNMBR ,
        A.ADRSCODE ,
        A.SLPRSNID Master_SalesPerson ,
        A.SALSTERR Master_SalesTerritory ,
        B.SLPRSNID Address_SalesPerson ,
        B.SALSTERR Address_SalesTerritory
FROM    dbo.RM00101 AS A
        LEFT OUTER JOIN dbo.RM00102 AS B ON A.CUSTNMBR = B.CUSTNMBR
                                            AND A.ADRSCODE = B.ADRSCODE
WHERE   RTRIM(LTRIM(A.SLPRSNID)) <> RTRIM(LTRIM(B.SLPRSNID))
        OR RTRIM(LTRIM(A.SALSTERR)) <> RTRIM(LTRIM(B.SALSTERR))
               


Best Regards, 
Mahmoud M. AlSaadi