@VDM: {
private: true,
viewType: #TRANSACTIONAL,
lifecycle.contract.type: #NONE
}@AccessControl: {
authorizationCheck: #PRIVILEGED_ONLY
}@ObjectModel: {
usageType: {serviceQuality: #B, sizeCategory: #L, dataClass: #TRANSACTIONAL}
}
@Metadata: {
ignorePropagatedAnnotations: true
}// this view selects header data from old persistence (STXH) and new (CRMD_S4TEXT) so that SADL Exit later on// can be called in both cases.
// It must be assured that only one entry is selected since both persistencies can be filled for one object.
// Therefore, fields like CreatedTime, CreateDate, ChangedTime, ChangedDate and ChangedUser must be omitted.
// UNION cannot handle LOB fields; therefore, a string field must added later on again.
defineviewentity P_InhRepairNote asselectfrom I_InhRepairNote
{
key CustMgmtObjectType,
key InHouseRepair,
key TextObjectType,
key Language,
InHouseRepairUUID,
TextObjectCategory,
CreatedByUser
// string fields must be omitted
// InhRepairNoteText
} where TextObjectCategory = 'CRM_ORDERH'
unionselectfrom I_ServiceDocumentLongText as new
// make sure only IHR-relevant texts are read
innerjoin I_InHouseRepair as InHouseRepair on InHouseRepair.InHouseRepair = new.ServiceDocument
{
key new.ServiceObjectType as CustMgmtObjectType,
key new.ServiceDocument as InHouseRepair,
key new.TextObjectType,
key new.Language,
InHouseRepair.InHouseRepairUUID as InHouseRepairUUID,
new.TextObjectCategory,
cast( new.SrvcDocLongTextCreatedByUser as tdfuser ) as CreatedByUser
// string field must be omitted
//ServiceDocumentLongText
} where new.TextObjectCategory = 'CRM_ORDERH'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INHOUSEREPAIR",
"I_INHREPAIRNOTE",
"I_SERVICEDOCUMENTLONGTEXT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/