Skip to content

KVSKBAOrderQuoteLine#

Fields#

Name Type Note
Document No. Code[20]
Line No. Integer
Type Enum (KVSKBABANFLineType)
No. Code[20]
Description 2 Text[50]
Quantity Decimal
Vendor No. Code[20]
Direct Unit Cost Decimal
Due Date Date
Requester ID Code[50]
Confirmed Boolean
Shortcut Dimension 1 Code Code[20]
Shortcut Dimension 2 Code Code[20]
Location Code Code[10]
Expiration Date Date
Order Date Date
Order Address Code Code[10]
Currency Code Code[10]
Currency Factor Decimal
Description Text[100]
Vendor Item No. Text[50]
Dimension Set ID Integer
Direct Unit Cost (Price Unit) Decimal
Price Unit Decimal
BANF No. with Filter Code[20]
Pseudo Item No. Code[20]
BANF URL Text[250]
Line Amount Decimal
Last Modify on DateTime
Last Modify from Code[50]
Variant Code Code[10]
Bin Code Code[20]
Qty. per Unit of Measure Decimal
Unit of Measure Code Code[10]
Quantity (Base) Decimal
Supply From Code[20]
User ID Code[50]
Item Category Code Code[20]
Nonstock Boolean
Purchasing Code Code[10]
Line Discount % Decimal
Purchase Order No. Code[20]

Procedures#

CreateDimFromDefaultDim(Integer) :#

Summary: Creates dimensions from default dimensions for a given prioroty field number.

procedure CreateDimFromDefaultDim(FieldNo: Integer): 

Parameters:

  • FieldNo: The field number with which dimensions are to be created with priority.

Remarks: This procedure performs the following steps: - Initializes default dimension sources using the provided field number for priority - Creates dimensions based on the initialized default dimension sources

GetDirectUnitCost(Integer) :#

Summary: Retrieves the direct unit cost based on the calling field number.

procedure GetDirectUnitCost(CalledByFieldNo: Integer): 

Parameters:

  • CalledByFieldNo: The number of the field that called this procedure.

Remarks: This procedure handles the calculation of direct unit cost in two scenarios: - For pseudo items: Uses BANFPurchPriceCalcMgt to find the price - For regular items: Calculates plan price and updates direct unit cost The process can be customized through the OnBeforeGetDirectCost event

InitType() :#

Summary: Initializes the Type field with the value from xRec.Type.

procedure InitType(): 

Remarks: This procedure copies the Type value from the temporary record buffer (xRec) to the current record.

GetPriceCalculationHandler(Record Purchase Header, Interface Price Calculation) :#

procedure GetPriceCalculationHandler(PurchaseHeader: Record "Purchase Header"; var PriceCalculation: Interface "Price Calculation"): 

GetPurchHeader() :#

Summary: Creates temporary purchase header and line records based on the order quote line data.

procedure GetPurchHeader(): 

Remarks: The procedure initializes temporary purchase header and line records with values from the order quote line. A dummy document number 'BANFDUMMY00000' is used for the purchase header. The price calculation method is retrieved from the vendor if available. The temporary records are used for price calculations and other processing.

ClearFieldCausedPriceCalculation() :#

Summary: Resets the field that indicates which field triggered a price calculation.

procedure ClearFieldCausedPriceCalculation(): 

Remarks: Sets FieldCausedPriceCalculation to 0 to clear any previous triggers.

PlanPriceCalcByField(Integer) :#

Summary: Plans price calculation based on a specific field number.

procedure PlanPriceCalcByField(CurrPriceFieldNo: Integer): 

Parameters:

  • CurrPriceFieldNo: The field number that triggered the price calculation.

Remarks: Sets the FieldCausedPriceCalculation only if it hasn't been set before (is 0). This helps track which field initially triggered a price calculation.

GetLineWithPrice(Interface Line With Price) :#

procedure GetLineWithPrice(var LineWithPrice: Interface "Line With Price"): 

IsPriceCalcCalledByField(Integer) : Boolean#

Summary: Checks if the price calculation was triggered by a specific field.

procedure IsPriceCalcCalledByField(CurrPriceFieldNo: Integer): Boolean

Parameters:

  • CurrPriceFieldNo: The field number to check against.

Returns: True if the price calculation was triggered by the specified field, false otherwise.

BANFLineTypeToTableID(Enum KVSKBABANFLineType) : Integer#

Summary: Converts a BANF Line Type to its corresponding Table ID.

procedure BANFLineTypeToTableID(LineType: Enum "KVSKBABANFLineType"): Integer

Parameters:

  • LineType: The BANF Line Type to convert.

Returns: The corresponding Table ID for the given Line Type. Returns 0 if line type is empty.

Remarks: This function maps the following line types to table IDs: - Empty -> 0 - G/L Account -> G/L Account table ID - Item -> Item table ID - Resource -> Resource table ID - Fixed Asset -> Fixed Asset table ID Raises OnAfterBANFLineTypeToTableID event after conversion.

Events#

OnAfterBANFLineTypeToTableID(Enum Sales Line Type, Integer) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

[Obsolete('The event is no longer used, please use OnAfterConvertBANFLineTypeToTableID instead', '25.5')]
[IntegrationEvent(false, false)]
local procedure OnAfterBANFLineTypeToTableID(Type: Enum "Sales Line Type"; var TableId: Integer): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnAfterBANFLineTypeToTableID', '', false, false)]
local procedure DoSomethingOnAfterBANFLineTypeToTableID(Type: Enum "Sales Line Type"; var TableId: Integer)
begin
end;

OnAfterConvertBANFLineTypeToTableID(Enum KVSKBABANFLineType, Integer) :#

Summary: Integration event that is raised after a mapping operation between BANF Line Type and Table ID.

[IntegrationEvent(false, false)]
local procedure OnAfterConvertBANFLineTypeToTableID(BANFLineType: Enum "KVSKBABANFLineType"; var TableId: Integer): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnAfterConvertBANFLineTypeToTableID', '', false, false)]
local procedure DoSomethingOnAfterConvertBANFLineTypeToTableID(BANFLineType: Enum "KVSKBABANFLineType"; var TableId: Integer)
begin
end;

Parameters:

  • Type: The BANF Line Type enum value to be mapped.
  • TableId: The corresponding Table ID. This parameter is passed by reference and can be modified in the event subscribers.

OnAfterCopyFromItem(Record KVSKBAOrderQuoteLine, Record Item) :#

Summary: Integration event that is raised after copying item information to the order quote line.

[IntegrationEvent(false, false)]
local procedure OnAfterCopyFromItem(var OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; Item: Record "Item"): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnAfterCopyFromItem', '', false, false)]
local procedure DoSomethingOnAfterCopyFromItem(var OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; Item: Record "Item")
begin
end;

Parameters:

  • OrderQuoteLine: The order quote line record that is being modified.
  • Item: The item record from which information is being copied.

OnBeforeCopyFromItem(Record KVSKBAOrderQuoteLine, Record Item) :#

Summary: Integration event that is raised before copying item information to the order quote line.

[IntegrationEvent(false, false)]
local procedure OnBeforeCopyFromItem(var OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; Item: Record "Item"): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnBeforeCopyFromItem', '', false, false)]
local procedure DoSomethingOnBeforeCopyFromItem(var OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; Item: Record "Item")
begin
end;

Parameters:

  • OrderQuoteLine: The order quote line record that is being modified.
  • Item: The item record from which information is being copied.

OnBeforeGetDirectCost(Record KVSKBAOrderQuoteLine, Record KVSKBAOrderQuoteLine, Integer, Integer, Boolean, Boolean) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

[Obsolete('The event is no longer used, please use OnBeforeGetDirectCostwithHandled instead', '25.5')]
[IntegrationEvent(false, false)]
local procedure OnBeforeGetDirectCost(var ReqLine: Record "KVSKBAOrderQuoteLine"; xReqLine: Record "KVSKBAOrderQuoteLine"; CalledByFieldNo: Integer; FieldNo: Integer; Subcontracting: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnBeforeGetDirectCost', '', false, false)]
local procedure DoSomethingOnBeforeGetDirectCost(var ReqLine: Record "KVSKBAOrderQuoteLine"; xReqLine: Record "KVSKBAOrderQuoteLine"; CalledByFieldNo: Integer; FieldNo: Integer; Subcontracting: Boolean; var IsHandled: Boolean)
begin
end;

OnBeforeGetDirectCostwithHandled(Record KVSKBAOrderQuoteLine, Record KVSKBAOrderQuoteLine, Integer, Integer, Boolean) :#

Summary: Integration event that is raised before the direct cost is retrieved for an Order Quote Line.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetDirectCostwithHandled(var OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; xOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; CalledByFieldNo: Integer; FieldNo: Integer; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnBeforeGetDirectCostwithHandled', '', false, false)]
local procedure DoSomethingOnBeforeGetDirectCostwithHandled(var OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; xOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; CalledByFieldNo: Integer; FieldNo: Integer; var IsHandled: Boolean)
begin
end;

Parameters:

  • OrderQuoteLine: The Order Quote Line record that is being processed.
  • xOrderQuoteLine: The previous version of the Order Quote Line record.
  • CalledByFieldNo: The number of the field that triggered the event.
  • FieldNo: The number of the field being processed.
  • IsHandled: Boolean value that indicates whether the event has been handled.

OnAfterInitDefaultDimensionSources(Record KVSKBAOrderQuoteLine, List, Integer) :#

[IntegrationEvent(false, false)]
local procedure OnAfterInitDefaultDimensionSources(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; var DefaultDimSource: List; FieldNo: Integer): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnAfterInitDefaultDimensionSources', '', false, false)]
local procedure DoSomethingOnAfterInitDefaultDimensionSources(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; var DefaultDimSource: List; FieldNo: Integer)
begin
end;

OnBeforeInitDefaultDimensionSources(Record KVSKBAOrderQuoteLine, List, Integer) :#

[IntegrationEvent(false, false)]
local procedure OnBeforeInitDefaultDimensionSources(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; var DefaultDimSource: List; FieldNo: Integer): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnBeforeInitDefaultDimensionSources', '', false, false)]
local procedure DoSomethingOnBeforeInitDefaultDimensionSources(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; var DefaultDimSource: List; FieldNo: Integer)
begin
end;

OnBeforeCreateDim(Boolean, Record KVSKBAOrderQuoteLine) :#

Summary: Integration event that runs before creating dimensions for the order quote line.

[IntegrationEvent(true, false)]
local procedure OnBeforeCreateDim(var IsHandled: Boolean; var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnBeforeCreateDim', '', false, false)]
local procedure DoSomethingOnBeforeCreateDim(var IsHandled: Boolean; var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine")
begin
end;

Parameters:

  • IsHandled: Boolean parameter that determines if the event has been handled.
  • KVSKBAOrderQuoteLine: Record parameter containing the order quote line.

Remarks: This is an integration event that can be subscribed to modify or extend the dimension creation process. When IsHandled is set to TRUE, the standard dimension creation process will be skipped.

OnAfterProcedureCreateDim(Record KVSKBAOrderQuoteLine, Integer, Record KVSKBAOrderQuoteLine) :#

Summary: Integration event that is raised after dimensions are created for an Order Quote Line.

[IntegrationEvent(false, false)]
local procedure OnAfterProcedureCreateDim(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; CallingFieldNo: Integer; xKVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnAfterProcedureCreateDim', '', false, false)]
local procedure DoSomethingOnAfterProcedureCreateDim(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; CallingFieldNo: Integer; xKVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine")
begin
end;

Parameters:

  • KVSKBAOrderQuoteLine: The Order Quote Line record for which dimensions are being created.
  • CallingFieldNo: The number of the field that triggered the dimension creation.
  • xKVSKBAOrderQuoteLine: The Order Quote Line record before changes were made.

OnCreateDimOnBeforeUpdateGlobalDimFromDimSetID(Record KVSKBAOrderQuoteLine) :#

Summary: Integration event that fires before updating global dimensions from dimension set ID for an order quote line.

[IntegrationEvent(false, false)]
local procedure OnCreateDimOnBeforeUpdateGlobalDimFromDimSetID(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnCreateDimOnBeforeUpdateGlobalDimFromDimSetID', '', false, false)]
local procedure DoSomethingOnCreateDimOnBeforeUpdateGlobalDimFromDimSetID(var KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine")
begin
end;

Parameters:

  • KVSKBAOrderQuoteLine: Record parameter of type KVSKBAOrderQuoteLine that will be modified during the event.

OnBeforeGetOrderQuote(Record KVSKBAOrderQuoteLine, Record KVSKBAOrderQuote, Record Currency, Boolean) :#

Summary: Integration event that is raised before getting the order quote.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetOrderQuote(KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; KVSKBAOrderQuote: Record "KVSKBAOrderQuote"; var Currency: Record "Currency"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnBeforeGetOrderQuote', '', false, false)]
local procedure DoSomethingOnBeforeGetOrderQuote(KVSKBAOrderQuoteLine: Record "KVSKBAOrderQuoteLine"; KVSKBAOrderQuote: Record "KVSKBAOrderQuote"; var Currency: Record "Currency"; var IsHandled: Boolean)
begin
end;

Parameters:

  • KVSKBAOrderQuoteLine: The order quote line record.
  • KVSKBAOrderQuote: The order quote record.
  • Currency: The currency record.
  • IsHandled: Boolean value indicating if the event has been handled.

OnGetPurchHeaderOnAfterSetTempPurchaseTables(Record KVSKBAOrderQuoteLine, Record Purchase Header, Record Purchase Line) :#

Summary: Integration Event triggered after setting temporary purchase tables when getting purchase header.

[IntegrationEvent(false, false)]
local procedure OnGetPurchHeaderOnAfterSetTempPurchaseTables(Rec: Record "KVSKBAOrderQuoteLine"; var TempPurchaseHeader: Record "Purchase Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnGetPurchHeaderOnAfterSetTempPurchaseTables', '', false, false)]
local procedure DoSomethingOnGetPurchHeaderOnAfterSetTempPurchaseTables(Rec: Record "KVSKBAOrderQuoteLine"; var TempPurchaseHeader: Record "Purchase Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary)
begin
end;

Parameters:

  • Rec: Record KVSKBAOrderQuoteLine that triggered the event.
  • TempPurchaseHeader: Temporary Record "Purchase Header" that can be modified in the subscriber.
  • TempPurchaseLine: Temporary Record "Purchase Line" that can be modified in the subscriber.

Remarks: This is an integration event that allows subscribers to modify the temporary purchase tables.

OnBeforeIsLocationCodeAlterable(Record KVSKBAOrderQuoteLine, Integer, Boolean, Boolean) :#

Summary: Integration event that is raised before determining if the Location Code field on the Order Quote Line is alterable.

[IntegrationEvent(false, false)]
local procedure OnBeforeIsLocationCodeAlterable(OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; CurrentFieldNo: Integer; var Result: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBAOrderQuoteLine", 'OnBeforeIsLocationCodeAlterable', '', false, false)]
local procedure DoSomethingOnBeforeIsLocationCodeAlterable(OrderQuoteLine: Record "KVSKBAOrderQuoteLine"; CurrentFieldNo: Integer; var Result: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • OrderQuoteLine: Record KVSKBAOrderQuoteLine - The order quote line record being checked.
  • CurrentFieldNo: Integer - The number of the field that is currently being modified.
  • Result: Boolean - The result indicating whether the Location Code is alterable.
  • IsHandled: Boolean - Specifies if the event has been handled by a subscriber.