P_INHREPAIRITEMNOTE

CDS View

P_INHREPAIRITEMNOTE is a CDS View in S/4HANA. It contains 7 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
R_InhRepairItemNoteTP view_entity from TRANSACTIONAL Notes for In-House Repair Item

Fields (7)

KeyField CDS FieldsUsed in Views
KEY InHouseRepair InHouseRepair 1
KEY InHouseRepairItem InHouseRepairItem 1
KEY Language Language 1
KEY TextObjectType TextObjectType 1
CreatedByUser CreatedByUser 1
InHouseRepairItemUUID InHouseRepairItemUUID 1
TextObjectCategory TextObjectCategory 1
@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.

define view entity P_InhRepairItemNote as select from I_InhRepairItemNote
{
    key CustMgmtObjectType,
    key InHouseRepair,
    key InHouseRepairItem,
    key TextObjectType,
    key Language,
    InHouseRepairItemUUID,
    TextObjectCategory,
    CreatedByUser
    // string fields must be omitted

//    InhRepairNoteText

    
} where TextObjectCategory = 'CRM_ORDERI' 

union select from I_ServiceDocumentLongText as new
  // make sure only IHR-relevant texts are read

  inner join I_InHouseRepairItem as InHouseRepairItem on InHouseRepairItem.InHouseRepair = new.ServiceDocument
                                                     and InHouseRepairItem.InHouseRepairItem = new.ServiceDocumentItem
{
  key new.ServiceObjectType as CustMgmtObjectType,
  key new.ServiceDocument as InHouseRepair,
  key new.ServiceDocumentItem as InHouseRepairItem,
  key new.TextObjectType,
  key new.Language,
  InHouseRepairItem.InHouseRepairItemUUID as InHouseRepairItemUUID,
  new.TextObjectCategory,
  cast( new.SrvcDocLongTextCreatedByUser as tdfuser ) as CreatedByUser
  // string field must be omitted

  //ServiceDocumentLongText

} where new.TextObjectCategory = 'CRM_ORDERI'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INHOUSEREPAIRITEM",
"I_INHREPAIRITEMNOTE",
"I_SERVICEDOCUMENTLONGTEXT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/