Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Combine payables and accounts view tables

Posted on by 3,015

I am using report builder 2.0, GP 2010

Can someone help me write a SQL query that joins the PayablesTransaction and AccountsTransactions view?

PayablesTransaction:

Purchases Amount

Doc Date

Vendor Name

Vendor ID

Document Number

AccountsTransactions:

Account Number

Account Category Number

*This post is locked for comments

  • GPBiztalk Profile Picture
    GPBiztalk 125 on at
    RE: Combine payables and accounts view tables

    PAINTERISAAC,

    Top 100 is to limit the data results as we didn't specify any particular condition in the WHERE clause...

    You can remove the Top 100 from the query which will list all the transactions.

    thanks!

    KJ

  • painterisaac Profile Picture
    painterisaac 3,015 on at
    RE: Combine payables and accounts view tables

    KJ, what is the "TOP 100" in your query.

    It might be throwing off what I need. It is limiting the amount of transactions. There should be a lot more than what is being displayed.

  • painterisaac Profile Picture
    painterisaac 3,015 on at
    RE: Combine payables and accounts view tables

    Mahmoud, it is the purchasing account.

  • Suggested answer
    Mahmoud Saadi Profile Picture
    Mahmoud Saadi 32,738 on at
    RE: Combine payables and accounts view tables

    Find the "All Posted Payable Transactions" script on Ms. Victoria website, It may be missing the account number based on you requirements;

    SQL view for all posted Payables transactions in Dynamics GP

    Can you specify which account are you looking for ? Is it the Purchasing or Account Payable distribution type ?

  • Verified answer
    GPBiztalk Profile Picture
    GPBiztalk 125 on at
    RE: Combine payables and accounts view tables

    Hi,

    Following script should help you.


    SELECT DISTINCT TOP 100 PM00200.VENDORID,VENDNAME,DOCDATE,DOCAMNT as 'Purchase Amount',DOCNUMBR,ACTNUMST as 'Account Number',ACCATNUM
    FROM dbo.PM30200 WITH (NOLOCK) join dbo.PM30600 WITH (NOLOCK) on PM30200.VCHRNMBR = PM30600.VCHRNMBR
    JOIN dbo.PM00200 WITH (NOLOCK) on PM30200.VENDORID = PM00200.VENDORID
    join dbo.GL00105 WITH (NOLOCK) ON PM30600.DSTINDX = ACTINDX
    join dbo.GL00100 WITH (NOLOCK) on GL00105.ACTINDX = GL00100.ACTINDX

    thanks!

    KJ

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans