codeunitInventoryofficial - Microsoftderived - from the source, no model text

Codeunit 5802 "Inventory Posting To G/L"

Base Application · Microsoft.Inventory.Costing

Across versions

  1. BC23present
  2. BC249 events changed, 2 events added
  3. BC253 events added, 2 procedures added
  4. BC262 procedures added, 2 events added
  5. BC271 events added, 1 events removed
  6. BC281 procedures added
  7. BC291 procedures added
  8. BC30unchanged

Neighbourhood 11 connected objects and pages

Table 5802 "Value Entry" (relates to)Value EntryCodeunit 46950 "BC14 Inv. Post. G/L Guard" (event subscribers)BC14 Inv. Post. G/L GuardCodeunit 99000763 "Inv. Post. To G/L Subscribers" (event subscribers)Inv. Post. To G/L SubscribersCodeunit 12 "Gen. Jnl.-Post Line" (calls, 7 links)Gen. Jnl.-Post LineCodeunit 22 "Item Jnl.-Post Line" (calls, 6 links)Item Jnl.-Post LineCodeunit 5407 "Prod. Order Status Management" (calls, 4 links)Prod. Order Status ManagementReport 1002 "Post Inventory Cost to G/L" (calls, 4 links)Post Inventory Cost to G/LReport 1003 "Post Invt. Cost to G/L - Test" (calls, 3 links)Post Invt. Cost to G/L - TestCodeunit 11 "Gen. Jnl.-Check Line" (calls)Gen. Jnl.-Check LineCodeunit 408 "DimensionManagement" (calls)DimensionManagementCodeunit 5836 "Cost Calculation Management" (calls)

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

Base Application · Microsoft.Inventory.Costing · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
TableNo Value Entry
Permissions TableData “G/L Account” = r, TableData “Invt. Posting Buffer” = rimd, TableData “Value Entry” = rm, TableData “G/L - Item Ledger Relation” = rimd

Events published

  • OnAfterBufferCapacityPosting(var ValueEntry: Record "Value Entry"; var CostToPost: Decimal; var CostToPostACY: Decimal) (integration)
  • OnAfterBufferConsumpPosting(var TempInvtPostingBuffer: array[20] of Record "Invt. Posting Buffer" temporary; ValueEntry: Record "Value Entry"; var PostBufDimNo: Integer; var CostToPost: Decimal; var CostToPostACY: Decimal) (integration)
  • OnAfterBufferOutputPosting(var ValueEntry: Record "Value Entry"; var CostToPost: Decimal; var CostToPostACY: Decimal; var ExpCostToPost: Decimal; var ExpCostToPostACY: Decimal) (integration)
  • OnAfterBufferPosting(var ValueEntry: Record "Value Entry"; var CostToPost: Decimal; var CostToPostACY: Decimal; var ExpCostToPost: Decimal; var ExpCostToPostACY: Decimal) (integration)
  • OnAfterBufferSalesPosting(var TempInvtPostingBuffer: array[20] of Record "Invt. Posting Buffer" temporary; ValueEntry: Record "Value Entry"; var PostBufDimNo: Integer) (integration)
  • OnAfterCalcCostToPostFromBuffer(var ValueEntry: Record "Value Entry"; var CostToPost: Decimal; var CostToPostACY: Decimal; var ExpCostToPost: Decimal; var ExpCostToPostACY: Decimal; var PostToGL: Boolean) (integration)
  • OnAfterGLItemLedgRelationInsert() (integration)
  • OnAfterInitInvtPostBuf(var ValueEntry: Record "Value Entry") Δ BC24 (integration)
  • OnAfterInitTempInvtPostBuf(var TempInvtPostBuf: array[20] of Record "Invt. Posting Buffer" temporary; ValueEntry: Record "Value Entry"; PostBufDimNo: Integer) Δ BC24 (integration)
  • OnAfterRun(var ValueEntry: Record "Value Entry") (integration)
  • OnAfterSetAccNo(var InvtPostingBuffer: Record "Invt. Posting Buffer"; ValueEntry: Record "Value Entry"; CalledFromItemPosting: Boolean) (integration)
  • OnAfterSetDesc(var GenJnlLine: Record "Gen. Journal Line"; var InvtPostBuf: Record "Invt. Posting Buffer") (integration)
  • OnAfterSetAmt(var GenJnlLine: Record "Gen. Journal Line"; Amt: Decimal; AmtACY: Decimal; var HasAmountToPost: Boolean) (integration)
  • OnBeforeBufferAdjmtPosting(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer"; CostToPost: Decimal; CostToPostACY: Decimal; ExpCostToPost: Decimal; ExpCostToPostACY: Decimal; var IsHandled: Boolean) Δ BC24 (integration)
  • OnBeforeBufferInvtPosting(var ValueEntry: Record "Value Entry"; var Result: Boolean; var IsHandled: Boolean; RunOnlyCheck: Boolean; CalledFromTestReport: Boolean; var GlobalInvtPostingBuffer: Record "Invt. Posting Buffer") + BC27 − BC27 (integration)
  • OnBeforeBufferOutputPosting(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer"; CostToPost: Decimal; CostToPostACY: Decimal; ExpCostToPost: Decimal; ExpCostToPostACY: Decimal; var IsHandled: Boolean) Δ BC24 (integration)
  • OnBeforeBufferPosting(var ValueEntry: Record "Value Entry"; var CostToPost: Decimal; var CostToPostACY: Decimal; var ExpCostToPost: Decimal; var ExpCostToPostACY: Decimal) (integration)
  • OnBeforeBufferPurchPosting(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer"; CostToPost: Decimal; CostToPostACY: Decimal; ExpCostToPost: Decimal; ExpCostToPostACY: Decimal; var IsHandled: Boolean) Δ BC24 (integration)
  • OnBeforeBufferSalesPosting(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer"; CostToPost: Decimal; CostToPostACY: Decimal; ExpCostToPost: Decimal; ExpCostToPostACY: Decimal; var IsHandled: Boolean) Δ BC24 (integration)
  • OnBeforeCheckGLAcc(var AccountNo: Code[20]; CalledFromItemPosting: Boolean; var IsHandled: Boolean) (integration)
  • OnBeforeCheckInvtPostBuf(var GenJournalLine: Record "Gen. Journal Line"; var InvtPostingBuffer: Record "Invt. Posting Buffer"; ValueEntry: Record "Value Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var GenJnlCheckLine: Codeunit "Gen. Jnl.-Check Line") (integration)
  • OnBeforeGetInvPostingGroupCode(var ValueEntry: Record "Value Entry"; var InvPostingGroupCode: Code[20]; var IsHandled: Boolean) + BC25 − BC25 (integration)
  • OnBeforeInitInvtPostBuf(var ValueEntry: Record "Value Entry"; var AccType: Enum "Invt. Posting Buffer Account Type"; var BalAccType: Enum "Invt. Posting Buffer Account Type") Δ BC24 + BC26 − BC26 (integration)
  • OnBeforeInitInvtPostBufPerAccount(var ValueEntry: Record "Value Entry"; AccType: Enum "Invt. Posting Buffer Account Type"; BalAccType: Enum "Invt. Posting Buffer Account Type"; CostToPost: Decimal; CostToPostACY: Decimal; InterimAccount: Boolean; BalancingRecord: Boolean; var IsHandled: Boolean) Δ BC24 (integration)
  • OnBeforePostInvtPostBuf(var GenJournalLine: Record "Gen. Journal Line"; var InvtPostingBuffer: Record "Invt. Posting Buffer"; ValueEntry: Record "Value Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") (integration)
  • OnAfterPostInvtPostBuf(var GenJournalLine: Record "Gen. Journal Line"; var InvtPostingBuffer: Record "Invt. Posting Buffer"; ValueEntry: Record "Value Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") + BC24 (integration)
  • OnBeforeGetInvtPostSetup(var InventoryPostingSetup: Record "Inventory Posting Setup"; var LocationCode: Code[10]; InventoryPostingGroup: Code[20]; var GenPostingSetup: Record "General Posting Setup"; var IsHandled: Boolean; var InvtPostingBuffer: Record "Invt. Posting Buffer") (integration)
  • OnBeforeGLItemLedgRelationInsert(var GLItemLedgerRelation: Record "G/L - Item Ledger Relation"; InvtPostingBuffer: Record "Invt. Posting Buffer"; GLRegister: Record "G/L Register"; TempGLItemLedgerRelation: Record "G/L - Item Ledger Relation" temporary) (integration)
  • OnBeforePostInvtPostBufProcessGlobalInvtPostBuf(var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary; var GenJnlLine: Record "Gen. Journal Line"; var ValueEntry: Record "Value Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CalledFromItemPosting: Boolean; PostPerPostGroup: Boolean; var IsHandled: Boolean) (integration)
  • OnBeforeSetAccNo(var InvtPostBuf: Record "Invt. Posting Buffer"; ValueEntry: Record "Value Entry"; AccType: Option; BalAccType: Option; CalledFromItemPosting: Boolean; var IsHandled: Boolean) (integration)
  • OnBeforeOnRun(var ValueEntry: Record "Value Entry"; PostPerPostGroup: Boolean; var IsHandled: Boolean) (integration)
  • OnInsertTempInvtPostToGLTestBufOnBeforeInsert(var TempInvtPostToGLTestBuf: Record "Invt. Post to G/L Test Buffer" temporary; ValueEntry: Record "Value Entry") (integration)
  • OnInsertTempInvtPostToGLTestBufOnBeforeTempInvtPostToGLTestBufInsert(var TempInvtPostToGLTestBuf: Record "Invt. Post to G/L Test Buffer" temporary; GenJournalLine: Record "Gen. Journal Line"; ValueEntry: Record "Value Entry") (integration)
  • OnPostInvtPostBufferOnBeforeFind(var GlobalInvtPostBuf: Record "Invt. Posting Buffer"; var TempGLItemLedgRelation: Record "G/L - Item Ledger Relation"; var ValueEntry: Record "Value Entry") Δ BC24 (integration)
  • OnPostInvtPostBufOnAfterInitGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var ValueEntry: Record "Value Entry") (integration)
  • OnPostInvtPostBufferOnAfterPostInvtPostBuf(var GlobalInvtPostBuf: Record "Invt. Posting Buffer"; var ValueEntry: Record "Value Entry"; CalledFromItemPosting: Boolean; CalledFromTestReport: Boolean; RunOnlyCheck: Boolean; PostPerPostGrp: Boolean) (integration)
  • OnPostInvtPostBufOnAfterUpdateGlobalDimFromDimSetID(var GenJournalLine: Record "Gen. Journal Line"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary) (integration)
  • OnPostInvtPostBufOnBeforeSetAmt(var GenJournalLine: Record "Gen. Journal Line"; var ValueEntry: Record "Value Entry"; var GlobalInvtPostingBuffer: Record "Invt. Posting Buffer") (integration)
  • OnPostInvtPostBufProcessGlobalInvtPostBufOnAfterSetAmt(var GenJournalLine: Record "Gen. Journal Line") (integration)
  • OnPostInvtPostBufProcessGlobalInvtPostBufOnAfterSetDesc(var GenJournalLine: Record "Gen. Journal Line"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary) (integration)
  • OnSetAccNoOnAfterGetPostingSetup(var InvtPostBuf: Record "Invt. Posting Buffer"; var InvtPostingSetup: Record "Inventory Posting Setup"; var GenPostingSetup: Record "General Posting Setup"; ValueEntry: Record "Value Entry"; UseInvtPostSetup: Boolean) (integration)
  • OnSetAccNoOnBeforeCheckAccNo(var InvtPostBuf: Record "Invt. Posting Buffer"; InvtPostingSetup: Record "Inventory Posting Setup"; GenPostingSetup: Record "General Posting Setup"; CalledFromItemPosting: Boolean; var ValueEntry: Record "Value Entry") (integration)
  • OnUpdateGlobalInvtPostBufOnBeforeModify(var GlobalInvtPostBuf: Record "Invt. Posting Buffer"; TempInvtPostBuf: Record "Invt. Posting Buffer" temporary) (integration)
  • OnUpdateGlobalInvtPostBufOnAfterCalcShouldInsertTempGLItemLedgRelation(var TempGLItemLedgerRelation: Record "G/L - Item Ledger Relation" temporary; TempInvtPostingBuffer: Record "Invt. Posting Buffer" temporary; ValueEntryNo: Integer; RunOnlyCheck: Boolean; CalledFromTestReport: Boolean; var ShouldInsertTempGLItemLedgRelation: Boolean) (integration)
  • OnAfterBufferGLItemLedgRelation(var TempGLItemLedgRelation: Record "G/L - Item Ledger Relation" temporary; GlobalInvtPostBufEntryNo: Integer) (integration)
  • OnUpdateValueEntryOnBeforeModify(var ValueEntry: Record "Value Entry"; InvtPostingBuffer: Record "Invt. Posting Buffer") (integration)
  • OnBeforeBufferConsumpPosting(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary; CostToPost: Decimal; CostToPostACY: Decimal; var IsHandled: Boolean) (integration)
  • OnAfteUpdateReportAmounts(var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary; var InvtAmt: Decimal; var InvtAdjmtAmt: Decimal; var VarMfgDirCostAmt: Decimal) (integration)
  • OnBeforeBufferAsmOutputPosting(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary; var CostToPost: Decimal; var CostToPostACY: Decimal; var IsHandled: Boolean) (integration)
  • OnBeforeBufferAsmConsumpPosting(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary; var CostToPost: Decimal; var CostToPostACY: Decimal; var IsHandled: Boolean) (integration)
  • OnBeforePostInvtPostBufPerEntry(var ValueEntry: Record "Value Entry"; var TempGlobalInvtPostingBuffer: Record "Invt. Posting Buffer" temporary; RunOnlyCheckSaved: Boolean; var IsHandled: Boolean) (integration)
  • OnAfterSetGenJnlBatch(GlobalJnlTemplName: Code[10]; GlobalJnlBatchName: Code[10]) (integration)
  • OnAfterSetRunOnlyCheck(CalledFromItemPosting: Boolean; RunOnlyCheck: Boolean; CalledFromTestReport: Boolean) (integration)
  • OnAfterInitialize(GlobalPostPerPostGroup: Boolean) (integration)
  • OnAfterBufferAdjmtPosting(var TempInvtPostingBuffer: array[20] of Record "Invt. Posting Buffer" temporary; ValueEntry: Record "Value Entry"; var PostBufDimNo: Integer) (integration)
  • OnAfterBufferPurchPosting(var TempInvtPostingBuffer: array[20] of Record "Invt. Posting Buffer" temporary; ValueEntry: Record "Value Entry"; var PostBufDimNo: Integer) (integration)
  • OnBeforeBufferCapacityPosting(var ValueEntry: Record "Value Entry"; var TempGlobalInvtPostingBuffer: Record "Invt. Posting Buffer" temporary; CostToPost: Decimal; CostToPostACY: Decimal; var IsHandled: Boolean) + BC24 (integration)
  • OnBeforeCreateGLItemLedgerRelationEntry(var GLRegister: Record "G/L Register"; var IsHandled: Boolean) + BC25 (integration)
  • OnBeforeAdjustWIPForProduction(var ValueEntry: Record "Value Entry"; var GlobalInvtPostBuf: Record "Invt. Posting Buffer" temporary; CostToPost: Decimal; CostToPostACY: Decimal; var IsHandled: Boolean) + BC26 (integration)
  • OnBeforeUpdateGlobalInvtPostBuf(ValueEntryNo: Integer; var TempInvtPostBuf: array[20] of Record "Invt. Posting Buffer" temporary; RunOnlyCheck: Boolean; CalledFromTestReport: Boolean; Result: Boolean; IsHandled: Boolean) + BC25 (integration)

Procedures

  • Initialize(PostPerPostGroup: Boolean)
  • SetGenJnlBatch(JnlTemplName: Code[10]; JnlBatchName: Code[10])
  • SetRunOnlyCheck(SetCalledFromItemPosting: Boolean; SetCheckOnly: Boolean; SetCalledFromTestReport: Boolean)
  • GetGLRegister(var GLRegister: Record "G/L Register"; var NextVATEntryNo: Integer; var NextTransactionNo: Integer) + BC29
  • ResetGLPostingState() + BC28: Resets the transaction-scoped state of the underlying Codeunit “Gen. Jnl.-Post Line” instance held by this codeunit so the next G/L posting call re-takes the G/L Entry table lock and re-reads the last entry number from disk. Must be called by any caller that issues an explicit Commit() while keeping…
  • BufferInvtPosting(var ValueEntry: Record "Value Entry"): Boolean
  • AdjustPostedWIPForProduction(ValueEntry: Record "Value Entry"): Boolean + BC26
  • InitInvtPostBuf(ValueEntry: Record "Value Entry"; AccType: Enum "Invt. Posting Buffer Account Type"; BalAccType: Enum "Invt. Posting Buffer Account Type"; CostToPost: Decimal; CostToPostACY: Decimal; InterimAccount: Boolean)
  • PostInvtPostBufPerEntry(var ValueEntry: Record "Value Entry")
  • PostInvtPostBufPerPostGrp(DocNo: Code[20]; Desc: Text[50])
  • SetDesc(var GenJnlLine: Record "Gen. Journal Line"; InvtPostBuf: Record "Invt. Posting Buffer")
  • GetTempInvtPostToGLTestBuf(var InvtPostToGLTestBuf: Record "Invt. Post to G/L Test Buffer")
  • GetAmtToPost(var NewCOGSAmt: Decimal; var NewInvtAdjmtAmt: Decimal; var NewDirCostAmt: Decimal; var NewOvhdCostAmt: Decimal; var NewVarPurchCostAmt: Decimal; var NewVarMfgDirCostAmt: Decimal; var NewVarMfgOvhdCostAmt: Decimal; var NewWIPInvtAmt: Decimal; var NewInvtAmt: Decimal; GetTotal: Boolean)
  • GetInvtPostBuf(var InvtPostBuf: Record "Invt. Posting Buffer")
  • CheckGenJnlLine(var GenJnlLine: Record "Gen. Journal Line")
  • PostGenJnlLine(var GenJnlLine: Record "Gen. Journal Line")

Plus 32 local procedures.

Triggers

OnRun

Relations

Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.

Called by

Countries that replace it

RU

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Inventory Posting To G/L"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources