web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Relation between InventTrans and InventSettlement Tables

(0) ShareShare
ReportReport
Posted on by

Dear All,

I am trying to write a SQL query to find the cost amount posted and Cost amount adjusted for every item from AX database. 

In my query, I am using InventTrans, InventTransOrigin and InventSettlement tables. Relation between InventTrans table and InventSettlement table is based on TransRecid in InventSettlement and recid in InventTrans table. But for each line in InventTrans, I am getting multiple lines in InventSettlement. Should I apply any more filter on InventSettlement table.

Regards

Suneel

*This post is locked for comments

I have the same question (0)
  • Hariharans87 Profile Picture
    36 on at

    Please make sure that have you considered the dataareaid column in the join part.

    Please also share your code.

  • Guy Terry Profile Picture
    29,003 Moderator on at

    I don't think you need to use InventSettlement. Does the SQL in my comment on this thread help?

    community.dynamics.com/.../163560

  • Verified answer
    5400 Profile Picture
    7,162 on at

    You have to decide first, you want to calculate cost amount adjusted only after invoice or packing slip also. if you are doing packing slip and invoice same lot without partial it will create only one line in inventTrans but InventSettlement will get populated with 2 lines for same . One for adjusted which is assoiciated  invoice voucher with inventtrans and another is physical which is associated with physical voucher of invent trans.

    Inventrans also have field costAmount adjusted,  first tally this value with respect inventsettlementtable and proceed further.

    One field is there invnetSettlement called settle model which can take into your consideration and build 1:1 relation between inventtrans and inventsettlement.

  • Community Member Profile Picture
    on at

    Thank you for your reply.

    I am trying to get the Inventory Value by SQL query to match with the Inventory value cube.

    I think Cube considers InventSettlement table to get the adjustments.

  • Hariharans87 Profile Picture
    36 on at

    Please let me know that what inventory cube measure you are referring, we can find the measure pointing table field and focus on that.

    Note: Cube don't have updated value. Because once it is processed, you can see the updated value.

  • Community Member Profile Picture
    on at

    Hi Hariharan, I am aware of the cube process.  I am referring to Amount field in "Inventory Value" Measure group. InventValueCube is the view.

  • Verified answer
    Brandon Wiese Profile Picture
    17,790 on at

    The InventTrans table has fields for both CostAmountPosted and CostAmountAdjustment, which when added together arrive at the PostedValue found on the associated InventSum record (across all associated InventTrans records).

    InventSettlement can and often will have multiple records for a single InventTrans record.  It is a child table with a 1:n relationship.  Each time any cost adjustment is made that affects a given InventTrans record, a new InventSettlement record is created as it simultaneously adjusts either the CostAmountPhysical or CostAmountAdjustment fields on the InventTrans record.  

    If you're interested in the current Inventory value amount, you can arrive at this from InventSum records or InventTrans records alone.  If you're interest in the Inventory value from a point in the past, you must consider InventSettlement records as part of the "rolling back time" phase of building your report data, just as the Inventory value report in AX itself must do.

  • Suggested answer
    Aparisi82 Profile Picture
    2,190 on at

    Dear Suneel Putta

    actually this is something I have learned today by analysing the std report Item posting by account.

    This applies only if you are  using Standard Cost model for your inventory.

    The reason why you see multiple records for the same inventrans recid is because the item of that transaction has had  its  std cost  changed multiple times  over the time.

    Anytime you activate a new std cost , the system will adjust the cost  of each posted transaction since day 1 writing the adjustments into the inventsettlement table.

    if the new price activated does not change  from the previous period there is no adjustment.

    You should sum all the adjustments by transrecid if you are doing a stock reconciliation.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dekion Profile Picture

dekion 4

#2
Virginia99 Profile Picture

Virginia99 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans