The generation classes and methods control, per object type, which elements must be generated.
To solve dependencies between object types and nodes below a hierarchy, global generation is used.
With a few attributes in Customizing ( Specification Types/Item Types → Assignment of Object types) you can define - as soon as changes have been made to the source object type - which target nodes or object types must be regenerated.
The standard Customizing settings are usually sufficient. If (for performance reasons, for example) you need to define more precisely how the source and target object types should interact, you can use the SET_GENER_FLAG method in the VART class in combination with the Z send option.
Generation sequence
The global generation can be time intensive depending on the use case: the same generation class could be called several times depending on the defined dependencies until all generation results are stable (i.e. the new generation on the object type does not lead to any change).
Under certain circumstances, it may make sense to design the nodes and object types in such a way that the number of generation calls is minimized.
Global generation works sequentially, from the top node to the last node in the hierarchy (only original nodes are processed, links, BOMs, and references are not affected by global generation).
The node sequence within a hierarchy is the same:
ROOT_GUID (GUID of the hierarchy specification (VART) =
GEN_PENDING (The node which is marked for generation)
GENSORT (default empty)
HINFO (Level of hierarchy for Sub-nodes)
Within a node, the object types are subject to this sequence:
GENSORTNR (Generation sequence)
SORTNR (Sequence for displaying the object type)