Description:
When inserting a new field between existing positions in CDS @UI.lineItem or @UI.identification annotations, the positions are not automatically adjusted to multiples of 10.
Example – Original (after manual insert):
@UI.lineItem: [{ position: 10 }]
Product;
@UI.lineItem: [{ position: 15 }] -- manually inserted
ProductGroup;
@UI.lineItem: [{ position: 30 }]
ValuationArea;
@UI.lineItem: [{ position: 20 }]
Plant;
Expected result after cleanup:
@UI.lineItem: [{ position: 10 }]
Product;
@UI.lineItem: [{ position: 20 }] -- rounded up to next multiple of 10
ProductGroup;
@UI.lineItem: [{ position: 40 }] -- adjusted accordingly
ValuationArea;
@UI.lineItem: [{ position: 30 }] -- adjusted accordingly
Plant;
Rule behavior:
Detects @UI.lineItem and @UI.identification position sequences that are not multiples of 10
Rounds up the inserted position to the next multiple of 10
Adjusts all following positions accordingly
Applies to all @ui annotations that use a position property
Why is this useful?
Manually inserting fields between existing positions leads to irregular numbering (10, 15, 20...). This clutters the code and forces developers to manually renumber all subsequent positions. Auto-reordering to multiples of 10 follows the common SAP convention and keeps annotations clean and maintainable`
Description:
When inserting a new field between existing positions in CDS @UI.lineItem or @UI.identification annotations, the positions are not automatically adjusted to multiples of 10.
Example – Original (after manual insert):
Expected result after cleanup:
Rule behavior:
Detects @UI.lineItem and @UI.identification position sequences that are not multiples of 10
Rounds up the inserted position to the next multiple of 10
Adjusts all following positions accordingly
Applies to all @ui annotations that use a position property
Why is this useful?
Manually inserting fields between existing positions leads to irregular numbering (10, 15, 20...). This clutters the code and forces developers to manually renumber all subsequent positions. Auto-reordering to multiples of 10 follows the common SAP convention and keeps annotations clean and maintainable`