KVSKBAHierarchyLib#
Procedures#
GetHierarchyFlat(Record KVSKBAHierarchyRelationship, Code[20], Text[50], Option) :#
Summary: Gets a flattened hierarchy list for external use (e.g., pricing calculations).
procedure GetHierarchyFlat(var TempHierarchyRelationship: Record "KVSKBAHierarchyRelationship" temporary; SearchHierarchyTypeCode: Code[20]; SearchPrimaryValue: Text[50]; Direction: Option):
Parameters:
TempHierarchyRelationship: Temporary table to store the flattened hierarchySearchHierarchyTypeCode: Hierarchy type code to searchSearchPrimaryValue: Primary key value to start the search fromDirection: Direction of traversal (Forward or Backward)
Remarks: Creates a flat list without the tree structure, useful for processing all related records
CompressHierarchyRel(Record KVSKBAHierarchyRelationship) :#
Summary: Removes duplicate records from a hierarchy list based on Target Key Field 1 Value.
procedure CompressHierarchyRel(var TempHierarchyRelationship: Record "KVSKBAHierarchyRelationship" temporary):
Parameters:
TempHierarchyRelationship: Temporary hierarchy table to compress
Remarks: Eliminates duplicate entries where the same target value appears multiple times