| Docs Help
  AppSource  
Docs  /  NCCA Cost Accounting  /  Information for Developers

Indiv. Fields


2024/05/08 • 3 min. to read
The following events are available in NCCA Cost Accounting for fields that have been added via individual programming.

From G/L Entry/FA Entry to Cost Journal

Via the OnAfterCopyFromGLEntry or OnAfterCopyFromFALedgerEntry event in codeunit "NCCA Cost Jnl.-Trans. Mgt.", fields can be transferred from the G/L Entries or the FA Entries to the Cost Journal during Entry Transfer. Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::NCCA Cost Jnl.-Trans. Mgt., 'OnAfterCopyFromGLEntry', '', false, false)]
local procedure NCCACostJnlTransMgt_OnAfterCopyFromGLEntry(GLEntry: Record "G/L Entry"; var NCCACostJnlLine: Record "NCCA Cost Jnl. Line")
begin
    NCCACostJnlLine."Indiv. Field" := GLEntry."Indiv. Field";
end;

Accumulate G/L Entries/FA Entries

Note that you can transfer G/L Entries/FA Entries individually or cumulatively to NCCA Cost Accounting with a manual transfer. The behavior for cumulation can be defined via the OnCumulateTempCostJnlLine event in codeunit "NCCA Cost Jnl.-Trans. Mgt.". Example for the cumulation of a decimal field
[EventSubscriber(ObjectType::Codeunit, Codeunit::NCCA Cost Jnl.-Trans. Mgt., 'OnCumulateTempCostJnlLine', '', false, false)]
local procedure NCCACostJnlTransMgt_OnCumulateTempCostJnlLine(NCCACostJnlLine: Record "NCCA Cost Jnl. Line"; var TempNCCACostJnlLine: Record "NCCA Cost Jnl. Line" temporary)
begin
    TempNCCACostJnlLine."Indiv. Field" := TempNCCACostJnlLine."Indiv. Field" + NCCACostJnlLine."Indiv. Field";
end;

Note

In order for the field to be transferred from the Cost Journal to the Cost Entries, another event must be included. For information on this, please refer to the next section From Cost Journal to Cost Entries.

From Cost Journal to Cost Entries

The event OnAfterCopyFromCostJnlLine in table "NCCA Cost Entry" can be used to transfer fields from the Cost Journal to the Cost Entries when posting. Example
[EventSubscriber(ObjectType::Table, Table::"NCCA Cost Entry", 'OnAfterCopyFromCostJnlLine', '', false, false)]
local procedure NCCACostEntry_OnAfterCopyFromCostJnlLine(var NCCACostEntry: Record "NCCA Cost Entry"; var NCCACostJnlLine: Record "NCCA Cost Jnl. Line")
begin
    NCCACostEntry."Indiv. Field" := NCCACostJnlLine."Indiv. Field";
end;

Fields in the Service Allocation Journal

The various NCCA journals are always posted internally via the NCCA Cost Journal. The event OnAfterCopyFromServAJnlLine in table "NCCA Cost Jnl. Line" can be used to transfer fields from the Service Allocation Journal to the Cost Journal when posting. Example
[EventSubscriber(ObjectType::Table, Table::"NCCA Cost Jnl. Line", 'OnAfterCopyFromServAJnlLine', '', false, false)]
local procedure NCCACostJnlLine_OnAfterCopyFromServAJnlLine(var NCCACostJnlLine: Record "NCCA Cost Jnl. Line"; var NCCAServAJnlLine: Record "NCCA Serv. A. Jnl. Line")
begin
    NCCACostJnlLine."Indiv. Field" := NCCAServAJnlLine."Indiv. Field";
end;

Fields in Allocation Journal

The various NCCA journals are always posted internally via the NCCA Cost Journal. The event OnAfterCopyFromAllocJnlLine in table "NCCA Cost Jnl. Line" can be used to transfer fields from the Allocation Journal to the Cost Journal when posting. Example
[EventSubscriber(ObjectType::Table, Table::"NCCA Cost Jnl. Line", 'OnAfterCopyFromAllocJnlLine', '', false, false)]
local procedure NCCACostJnlLine_OnAfterCopyFromAllocJnlLine(var NCCACostJnlLine: Record "NCCA Cost Jnl. Line"; var NCCAAllocJnlLine: Record "NCCA Alloc. Jnl. Line")
begin
    NCCACostJnlLine."Indiv. Field" := NCCAAllocJnlLine."Indiv. Field";
end;

From Cost Budget Journal to Cost Budget Entries

The event OnAfterCopyFromCostBudgetJnlLine in table "NCCA Cost Budget Entry" can be used to transfer fields from the Cost Budget Journal to the Cost Budget Entries when posting. Example
[EventSubscriber(ObjectType::Table, Table::"NCCA Cost Budget Entry", 'OnAfterCopyFromCostBudgetJnlLine', '', false, false)]
local procedure NCCACostBudgetEntry_OnAfterCopyFromCostBudgetJnlLine(var NCCACostBudgetEntry: Record "NCCA Cost Budget Entry"; var NCCACostBudgetJnlLine: Record "NCCA Cost Budget Jnl. Line")
begin
    NCCACostBudgetEntry."Indiv. Field" := NCCACostBudgetJnlLine."Indiv. Field";
end;


Submit feedback for
DE|EN Imprint
<>