P_InhRepairItemNote
P_InhRepairItemNote is a Transactional CDS View in SAP S/4HANA. It reads from 3 data sources (I_InhRepairItemNote, I_InHouseRepairItem, I_ServiceDocumentLongText) and exposes 15 fields with key fields CustMgmtObjectType, InHouseRepair, InHouseRepairItem, TextObjectType, Language.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_InhRepairItemNote | I_InhRepairItemNote | from |
| I_InHouseRepairItem | InHouseRepairItem | inner |
| I_ServiceDocumentLongText | new | union |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #TRANSACTIONAL | view | |
| VDM.lifecycle.contract.type | #NONE | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (15)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CustMgmtObjectType | CustMgmtObjectType | ||
| KEY | InHouseRepair | InHouseRepair | ||
| KEY | InHouseRepairItem | InHouseRepairItem | ||
| KEY | TextObjectType | TextObjectType | ||
| KEY | Language | Language | ||
| InHouseRepairItemUUID | InHouseRepairItemUUID | |||
| TextObjectCategory | TextObjectCategory | |||
| ServiceObjectTypeasCustMgmtObjectType | ||||
| KEY | InHouseRepair | I_ServiceDocumentLongText | ServiceDocument | |
| KEY | InHouseRepairItem | I_ServiceDocumentLongText | ServiceDocumentItem | |
| KEY | TextObjectType | I_ServiceDocumentLongText | TextObjectType | |
| KEY | Language | I_ServiceDocumentLongText | Language | |
| InHouseRepairItemUUID | I_InHouseRepairItem | InHouseRepairItemUUID | ||
| TextObjectCategory | I_ServiceDocumentLongText | TextObjectCategory | ||
| CreatedByUser |
@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'
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA