You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ABAP, everything is stored in a relational database.
JSON files can be edited manually in any editor,
The developer can edit the JSON files changing any sorting of arrays, which is okay, but serialization of objects should follow a specific sorting(not depending on the default database sorting semantics)
Suggestion:
Require that all internal tables defined in AAF are sorted tables with a defined key (no multiple keys, no HASHED tables, no DEFAULT KEY)
I don't think its possible to have array sorting defined in json schema?
Update documentation
Add new rule to abaplint, so the developers can be reminded automatically
Change the schema generator, so the sorting is added in the description of the field, which allows the developer to determine what is expected
Rework CHKO
Rework CHKV
Rework ENHS
The text was updated successfully, but these errors were encountered:
I think in general, it make sense to specify tables as sorted to define the order during serialisation to avoid unnecessary diffs.
However, I think there are also use cases in which unsorted tables is fine, because you have no criteria to sort the entries automatically by the table key.
Examples
Example 1
For table indexes we had the situation that the order of fields in an index is relvant how the index is created on the database. If this shall be sorted (by the type) we would have to introduce an index field in the file format, which I think would not be necessary, because it introduces redundant data). Here the order would be just sufficient.
Example 2
Similar situation might be here: #380 (comment)
Example 3
Another Example: Let's assume we have a file format for SAPsctipt documents. An entry for the document might be the format and the text of a document line. Do we want to introduce an index here or just assume that the order of the entries specifies the order of the content.
In ABAP, everything is stored in a relational database.
JSON files can be edited manually in any editor,
The developer can edit the JSON files changing any sorting of arrays, which is okay, but serialization of objects should follow a specific sorting(not depending on the default database sorting semantics)
Suggestion:
Require that all internal tables defined in AAF are sorted tables with a defined key (no multiple keys, no HASHED tables, no DEFAULT KEY)
I don't think its possible to have array sorting defined in json schema?
The text was updated successfully, but these errors were encountered: