Calling convention: SCM_Calc_Bestand("Buchungsperiode": String, ProductID: Integer, DataID: Integer, "Geschaeftsart": String): Float
Description: Calculates inventory quantity for a product and its business subset, then writes both values to the specified current-object record.
Parameters:
Buchungsperiode: period used to filter inventory data.
ProductID: product identifier.
DataID: current-object record to update.
Geschaeftsart: business type used for the subset calculation.
Returns: Product inventory quantity when positive; otherwise NULL. The function also updates product and subset fields.
Availability: Default; SCM-specific and dependent on the current object's virtual SQL and the Data_4/Product schemas.
Example:
Inventory := SCM_Calc_Bestand("2026-08", ProductID, DataID, "Retail");