Hi,
Implementing CDS DDL on AWS SPS6 and note that when activating the hdbdd the created table entity has columns in an order other than it's specification within the hdbdd - specifically multiple fields defined by a type in the hdbdd that are directly after the key fields are ordered last in the actual catalog table.
For example in the hdbdd I have :
type CreatedHistoryT {
CreatedBy : UserT;
CreatedAt : SDateT;
};
context Purchase {
@Catalog.tableType : #COLUMN
Entity Header {
key PurchaseOrderId : PurchaseOrderIdT;
CreatedHistory : CreatedHistoryT;
SupplierId : SupplierIdT;
nullable SupplierRef : SupplierRefT;
Currency : CurrencyT;
nullable StatusId : StatusIdT;
};
And despite the CreatedHistory being specified directly after the key, the two fields CreatedBy and CreatedAt show as last two columns in the catalog table.
This obviously does not help when for eample creating CSVs for master data load and the CSV matches the data definition column for column but fails upon load via the hdbti due to column mismatch with catalog object. I can of course change column order in CSV to match catalog, however......
Interestingly I sway towards assuming this is a known "feature" of SPS6, as from the CDS unit video, presented by Thomas Jung on the OpenSAP Hana course, the table types ValidityT, used in the addresses entity for example, is given at the end of the entity specification. Fortune would have it specification and catalog object will match. I dont see an example where table type specified somewhere other than end of entity specification.
Thanks.