Skip to content

KVSGAEB Calc. Journal#

Fields#

Name Type Note
No. Code[20]
Document Type Enum (KVSGAEB Document Type)
Version No. Code[20]
OZ Code[20]
Source Line No. Integer
Linetype2 Integer
Journal Batch Name Code[50]
Line No. Integer
Linetype Enum (KVSGAEB Position Linetype)
Position Type 1 Enum (KVSGAEB Main Positiontype)
Position Type 2 Enum (KVSGAEB Demand Positiontype)
Positiontype Enum (KVSGAEB Lead Positiontype)
Rel. Position No. Integer
Structured Unit Cost Boolean
Surcharge Boolean
Repetition Boolean
Free Quantity Boolean
Quantity Decimal
Unit of Measure Code[10]
Addition Code[3]
Text Suppl. Purch. Boolean
Text Suppl. Cust. Boolean
Textsystem Type Enum (KVSGAEB Textsystem Type)
STL-No. Code[17]
Position Status Enum (KVSGAEB Positionstatus)
Has Wage Change Boolean
Item No. Code[20]
Description Text[100]
Line Amount Decimal
Lot No. Code[2]
Lot Description Text[40]
Type of Bidding Group Enum (KVSGAEBBidding Group Type)
Assignment No. Integer
Watchword of Group Text[14]
Description of Bidding Group Text[40]
Estimated Unit Price Decimal
Estimated Total Decimal
Estimated Free Quantity Decimal
Estimated Surcharge (pct) Decimal
Estimated Total Sum Decimal
Surcharge/Discount Decimal
Surcharge (pct) Decimal
Total Sum Decimal
Cost Centre No. Text[9]
Description Locality Text[30]
Locality No Text[12]
Date Date
Short Description Text[55]
related Position No. Code[20]
Execution Description No. Integer
Time fraction Desc Text[14]
1. Unit Price fraction Desc Text[30]
2. Unit Price fraction Desc Text[30]
3. Unit Price fraction Desc Text[30]
4. Unit Price fraction Desc Text[30]
Sum without Surch. and Taxes Decimal
Lump Sum Decimal
Surcharge/Discount in Currency Decimal
Turnover Tax (pct) Decimal
Offer Sum Decimal
Cashback (pct) Decimal
Terms of Payment (days) Decimal
Rel. Lot. Group Integer
Desc. Execution Desc. Text[55]
Group No. Integer
Fictive Wage Change Decimal
Wage Change Decimal
expenditures Decimal
Description of Wage Text[55]
Co-Payment Decimal
Wage of Change Refund Decimal
Lot Group No. Integer
Open Boolean
Surcharge Amount Decimal
Type Enum (KVSGAEB Position Type Internal)
BOM Comp. No. Code[20]
Surcharge/Discount Amount Decimal
Surcharge 2 (pct) Decimal
1. Unit Price fraction Decimal
2. Unit Price fraction Decimal
3. Unit Price fraction Decimal
4. Unit Price fraction Decimal
Qty to surcharge Decimal
Level Integer
Unit Cost Decimal
Offered Boolean
Prod. Order No. Code[20]
Org. UOM Description Text[4]
Variant Code Code[10]
Fixed Costs Decimal
Unit Cost (incl. Surch.) Decimal
Prod. Order Status Enum Production Order Status
Total Quantity Resources Decimal
Ress. Unit Cost (cumulated) Decimal
Average Wage Decimal
Last Time used at Date FlowField
Unit Cost (incl. Surch. 2) Decimal
Fixed Costs incl. Surch. Decimal
Fixed Costs incl. Surch. 2 Decimal
Calculated Boolean
Ress. Unit Cost without Surch. Decimal
Ress. Unit Cost incl. Surch. Decimal
Incomplete Boolean
Transferred Boolean
Orig. Bidding Code[20]
Description 2 Text[50]
Description Project Code[50]
GAEB Calc BOM Line No. Integer
GAEB Calc BOM No. Code[20]
Line Amount (incl. Surcharge) Decimal
Ordered Boolean
Buy-from Vendor No. Code[20]
Unit Price Fraction Code[20]
UOM Factor HR Decimal
Lump Sum Item Boolean
Text Content Text[100] FlowField

Procedures#

PositionNumbering() :#

Summary: Performs automatic position numbering based on the document header's OZ mask settings. Validates bidding groups and renumbers all positions according to the configured mask.

procedure PositionNumbering(): 

CheckBiddingGroups() :#

Summary: Validates that the number of bidding group begin entries matches the number of bidding group end entries. Throws an error if the bidding groups are not properly balanced.

procedure CheckBiddingGroups(): 

TransferChanges(Boolean) :#

Summary: Transfers changes from the calculation journal to the document lines. Updates existing document lines and creates new ones as needed, then removes obsolete lines.

procedure TransferChanges(ManualCalcPar: Boolean): 

Parameters:

  • ManualCalcPar: Indicates whether this is a manual calculation operation

GetNextLineNo(Record KVSGAEB Document Lines) : Integer#

Summary: Calculates the next available line number between existing document lines. Returns a line number that falls between the previous and next line numbers.

procedure GetNextLineNo(var DocLinesVar: Record "KVSGAEB Document Lines"): Integer

Parameters:

  • DocLinesVar: Document lines record reference for context

Returns: The calculated next line number

ProceedGAEBTextLines(Boolean, Record KVSGAEB Document Header) :#

Summary: Processes GAEB text lines by either deleting them or marking them as no longer work-in-progress. Handles text lines associated with the specified document header.

procedure ProceedGAEBTextLines(DeletePar: Boolean; GAEBDocHeaderPar: Record "KVSGAEB Document Header"): 

Parameters:

  • DeletePar: If true, deletes the text lines; if false, marks them as not WIP
  • GAEBDocHeaderPar: The document header containing the text lines to process

SetDeleteWOEffect(Boolean) :#

Summary: Sets the flag to control whether deletions should be performed without effects. Used to bypass certain validations during deletion operations.

procedure SetDeleteWOEffect(DeleteWithoutEffPar: Boolean): 

Parameters:

  • DeleteWithoutEffPar: True to delete without effects, false otherwise

CheckIfHeaderIsLocked() :#

Summary: Checks if the document header is locked based on the setup lock level configuration. Performs appropriate lock validation depending on whether line-level or calculation-level locking is enabled.

procedure CheckIfHeaderIsLocked(): 

SetCheckLock(Boolean) :#

Summary: Controls whether lock validation should be performed for this record. Used to temporarily bypass lock checks during certain operations.

procedure SetCheckLock(CheckLockPar: Boolean): 

Parameters:

  • CheckLockPar: True to enable lock checking, false to disable

CalcSumsAndSurcharges(Record KVSGAEB Prod Calc Jnl Line Buf, Code[20], Boolean) :#

Summary: Calculates cost sums and surcharges from production calculation buffer lines. Updates unit costs, fixed costs, and surcharge percentages based on the buffer data.

procedure CalcSumsAndSurcharges(var ProdCalcBuffLineVar: Record "KVSGAEB Prod Calc Jnl Line Buf" temporary; ProdNoPar: Code[20]; UpdateOnlyPar: Boolean): 

Parameters:

  • ProdCalcBuffLineVar: Temporary buffer containing production calculation lines
  • ProdNoPar: Production order number for reference
  • UpdateOnlyPar: If true, only updates existing data without creating new entries

CheckIfLinesLocked() :#

Summary: Checks if the current line is locked by another user and prevents modification if so. If not locked, assigns the current user as the lock owner.

procedure CheckIfLinesLocked(): 

TransferChangesFromJnlLineInDocLine(Record KVSGAEB Document Lines, Record KVSGAEB Calc. Journal) :#

Summary: Transfers calculated values from a journal line to a document line. Copies all cost-related fields including amounts, unit costs, surcharges, and resource costs.

procedure TransferChangesFromJnlLineInDocLine(var DocLineVar: Record "KVSGAEB Document Lines"; GAEBJnlLine: Record "KVSGAEB Calc. Journal"): 

Parameters:

  • DocLineVar: Document line record to update with calculated values
  • GAEBJnlLine: Journal line containing the source calculation values