Hi Thomas,
Many thanks for your time on a Sunday!
I have been able to recreate the "misalignment" of columns in my AWS SPS6 revision 60 system, taking your example, with a small adjustment. The first time I activated the HDBDD, directly using your entity Header example without change, all was OK and aligned between HDBDD and catalog table (note I created entity under additional context "Purchase" to reflect my earlier hierarchy).
I then added a second table type declaration in the Header entity, called ChangedHistory, after your History table type, as below, referring to the same table type HistoryT for simplicity:
namespace hpl.missioncontrol.data;
@Schema : 'MISSIONCONTROL'
context Test {
type BusinessKey : String(10);
type SDate : LocalDate;
type CurrencyT : String(5);
type AmountT : Decimal(15,2);
type QuantityT : Decimal(13,3);
type UnitT: String(3);
type StatusT: String(1);
Type HistoryT {
CREATEDBY : BusinessKey;
CREATEDAT : SDate;
CHANGEDBY : BusinessKey;
CHANGEDAT : SDate;
};
context Purchase {
@Catalog.tableType : #COLUMN
Entity Header {
key PurchaseOrderId: BusinessKey;
nullable NoteId: BusinessKey;
PartnerId: BusinessKey;
Currency: CurrencyT;
GrossAmount: AmountT;
History: HistoryT;
ChangedHistory: HistoryT;
NetAmount: AmountT;
TaxAmount: AmountT;
LifecycleStatus: StatusT;
ApprovalStatus: StatusT;
ConfirmStatus: StatusT;
OrderingStatus: StatusT;
InvoicingStatus: StatusT;
};
};
};
And the screenshot below shows ChangedHistory columns at the end of the table and therefore out of sequence with the entity description:
Thanks.