Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

Posted on by 205
In the Payable Payments, Payable Transaction window besides the voucher no. or payment no. there is a note button in where you click it contains a note, sometimes it doesn't depends on who wrote that record, but I want to know in what Table in the database is it stored? Or is it stored in the database at all? I need it because I want it to be shown on a report. Thanks in advance

*This post is locked for comments

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    Try the below code.

    CREATE VIEW dbo.CheckRegRp2t

    AS

    SELECT     dbo.PM20000.VENDORID, dbo.PM00200.VNDCHKNM, dbo.PM20000.DOCDATE,

    dbo.PM20000.VCHRNMBR, dbo.PM20000.TRXDSCRN, dbo.SY03900.TXTFIELD,

    dbo.SY03900.NOTEINDX

    FROM dbo.PM20000

    INNER JOIN dbo.SY03900

    ON dbo.SY03900.NOTEINDX = dbo.PM20000.NOTEINDX

    INNER JOIN dbo.PM00200

    ON dbo.PM00200.VENDORID = dbo.PM20000.VENDORID 

    UNION ALL

    SELECT     dbo.PM30200.VENDORID, dbo.PM00200.VNDCHKNM, dbo.PM30200.DOCDATE,

    dbo.PM30200.VCHRNMBR, dbo.PM30200.TRXDSCRN, dbo.SY03900.TXTFIELD,

    dbo.SY03900.NOTEINDX

    FROM dbo.PM30200

    INNER JOIN dbo.SY03900

    ON dbo.SY03900.NOTEINDX = dbo.PM30200.NOTEINDX

    INNER JOIN dbo.PM00200

    ON dbo.PM00200.VENDORID = dbo.PM30200.VENDORID 

    Note: If my answer solved your problem then mark it as a verified. Because this will helps to some others who having the same problem.

    Hope this helps!!!

  • ogmarvin21 Profile Picture
    ogmarvin21 205 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    OK so probably last question just in case the ones upstairs might need it, what if I wanted to add another table in there lets say PM00200 what would the code be like?

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    Yes. Typo error,  I have changed above code.

    Note: If my answer solved your problem then mark it as a verified. Because this will helps to some others who having the same problem.

    Good Luck!!!

  • ogmarvin21 Profile Picture
    ogmarvin21 205 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    Hey there!! at first there was an error regarding the dbo.PM30200.TXTFIELD, it showed an error since there was no TXTFIELD column inside dbo.PM30200 but ichanged it back to dbo.PM30200.SY03900 and it worked

    Thanks a lot guys! Oh and uhm if ever I might encounter another problem haha I might reply back in here.

  • Verified answer
    soma Profile Picture
    soma 24,406 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    Try the below code,

    CREATE VIEW dbo.CheckRegRp2t

    AS

    SELECT     dbo.PM20000.VENDORID, dbo.PM20000.DOCDATE,

    dbo.PM20000.VCHRNMBR, dbo.PM20000.TRXDSCRN, dbo.SY03900.TXTFIELD,

    dbo.SY03900.NOTEINDX

    FROM dbo.PM20000

    INNER JOIN dbo.SY03900

    ON dbo.SY03900.NOTEINDX = dbo.PM20000.NOTEINDX

    UNION ALL

    SELECT     dbo.PM30200.VENDORID, dbo.PM30200.DOCDATE,

    dbo.PM30200.VCHRNMBR, dbo.PM30200.TRXDSCRN, dbo.SY03900.TXTFIELD,

    dbo.SY03900.NOTEINDX

    FROM dbo.PM30200

    INNER JOIN dbo.SY03900

    ON dbo.SY03900.NOTEINDX = dbo.PM30200.NOTEINDX

    Hope this helps!!!

  • ogmarvin21 Profile Picture
    ogmarvin21 205 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    I have a new problem, Im studying your code and its confusing, sorry im a beginner in GP and SQL so I now have a table that displays

    VENDORID / DOCDATE / VCHRNMBR / TRXDSCRN / TXTFIELD / NOTEINDX

    all of them came from PM20000 and SY03900 and this is my code

    CREATE VIEW dbo.CheckRegRp2t

    AS

    SELECT     dbo.PM20000.VENDORID, dbo.PM20000.DOCDATE,

    dbo.PM20000.VCHRNMBR, dbo.PM20000.TRXDSCRN, dbo.SY03900.TXTFIELD,

    dbo.SY03900.NOTEINDX

    FROM dbo.PM20000

    INNER JOIN dbo.SY03900

    ON dbo.SY03900.NOTEINDX = dbo.PM20000.NOTEINDX

    but I want it to also include the data on PM30200 including its VENDORID, DOCDATE, VCHRNMBR, TRXDSCRN into one table. I don't want to put another column with the same name, I just want the data to go into the columns I already made

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    Hi, the below code is used to pull all the Payables & Payments(Work, Open & Hist) transactions with Note index details. 

    SELECT * FROM
    (SELECT
    PT.[Vendor ID],
    VM.VNDCHKNM,
    PT.[Voucher Number],
    PT.[Document Type],
    PT.[DOCUMENT DATE],
    PT.[Document Amount],
    PT.[TRX Source],
    PT.[PPS Amount Deducted],
    NM.TXTFIELD
    --APPLDAMT, APFRDCNM, APTVCHNM
    FROM PayablesTransactions PT --PAYABLES TRANSACTIONS WORK/OPEN/HIST
    LEFT OUTER JOIN PM00200 VM --VENDOR MASTER
    ON PT.[Vendor ID]= VM.VENDORID
    LEFT OUTER JOIN SY03900 NM --RECORD NOTE MASTER
    ON NM.NOTEINDX = PT.[NOTE INDEX]

    UNION ALL

    SELECT
    MPW.VENDORID [Vendor ID],
    VM.VNDCHKNM,
    MPW.VCHRNMBR [Voucher Number],
    'Payment',
    MPW.DOCDATE [DOCUMENT DATE],
    MPW.DOCAMNT [Document Amount],
    MPW.TRXDSCRN [TRX Source],
    MPW.PPSAMDED [PPS Amount Deducted],
    NM.TXTFIELD
    FROM PM10400 MPW --MANUAL PAYMENT WORK
    LEFT OUTER JOIN PM00200 VM --VENDOR MASTER
    ON MPW.VENDORID = VM.VENDORID
    LEFT OUTER JOIN SY03900 NM --RECORD NOTE MASTER
    ON NM.NOTEINDX = MPW.NOTEINDX) PAYABLES

    Note: To get the values for the column(APPLDAMT, APFRDCNM & APTVCHNM), join the tables PM10200 & pm30300 to the end of the above query.

    Please let me know if you need any other details.

    Hope this helps!!!

  • ogmarvin21 Profile Picture
    ogmarvin21 205 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    I found it sir, thanks, now how do you make an SQL Query in which it shows the data of VNDCHKNM, VCHRNMBR, DOCDATE, DOCAMNT, TRXDSCRN, PPSAMDED, TXTFIELD, APPLDAMT, APFRDCNM, APTVCHNM in one table in which it shows all of transactions and its notes alongside it in order, this might be off topic but I hope somebody helps

  • Verified answer
    Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: Get the Table that contains the NOTES on Payable Payments, Payable Transaction Window

    SY03900 in the Company database.  You'll have to link the Note Index column in SY03900 to the Note Index in the payables tables.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans