Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

GL Posting Date in ProdTable

Posted on by 2,135

Hello,

Does anyone  know which date in ProdTable is associated with GL Posting Date?  Your help would be greatly appreciated.

thanks,

Tremor

*This post is locked for comments

  • Tremor Olaes Profile Picture
    Tremor Olaes 2,135 on at
    RE: GL Posting Date in ProdTable

    Thanks Brandon!  I also did not get any results!  I really appreciate it!

  • Brandon Wiese Profile Picture
    Brandon Wiese 17,786 on at
    RE: GL Posting Date in ProdTable

    Simply remove the [PARTITION] parts from the ON join clauses, and from the GROUP BY and SELECT clauses.

  • Tremor Olaes Profile Picture
    Tremor Olaes 2,135 on at
    RE: GL Posting Date in ProdTable

    Thanks Brandon.  We are still on AX2012 R1,  it is not recognizing column "Partition".

  • Brandon Wiese Profile Picture
    Brandon Wiese 17,786 on at
    RE: GL Posting Date in ProdTable

    I tested the theory that ProdTable.RealDate should be equal to MAX(InventTrans.DateFinancial), and across all 270k ProdTable records in my business database where the order was Ended, they are identical.

    Here's a quick query I used to look for cases where they were different, and 0 records returned.

    select p.[PARTITION], p.DATAAREAID, p.PRODID, p.REALDATE, MAX(t.DATEFINANCIAL) AS DATEFINANCIAL

     from PRODTABLE p

     join INVENTTRANSORIGIN o ON o.[PARTITION] = p.[PARTITION] AND o.DATAAREAID = p.DATAAREAID AND o.REFERENCEID = p.PRODID AND o.REFERENCECATEGORY = 2

     join INVENTTRANS t ON t.[PARTITION] = o.[PARTITION] AND t.DATAAREAID = o.DATAAREAID AND t.INVENTTRANSORIGIN = o.RECID

     where t.STATUSISSUE <= 1 AND t.STATUSRECEIPT <= 1

       and p.PRODSTATUS = 7  -- 7=ProdStatus::Ended

     group by p.[PARTITION], p.DATAAREAID, p.PRODID, p.REALDATE

     having p.REALDATE <> MAX(t.DATEFINANCIAL)  -- where different

  • Verified answer
    Brandon Wiese Profile Picture
    Brandon Wiese 17,786 on at
    RE: GL Posting Date in ProdTable

    ProdTable has a field named RealDate which indicates the date the production order was Ended.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: GL Posting Date in ProdTable

    Hi Tremor,

    You can view the log or all journals to see which date had been used. Also you can browse the inventory transactions and look at the financial date for the "Ended" date.

  • Tremor Olaes Profile Picture
    Tremor Olaes 2,135 on at
    RE: GL Posting Date in ProdTable

    Thanks Andre!  Is it safe to say that the ones with status of "Ended" would have a posting date in the journals?

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: GL Posting Date in ProdTable

    Hi Tremor,

    The production order table does not contain a date field for transactions. The posting date is determined at journals and status updates.

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