P_ServiceDocNote
Service Transaction Notes
P_ServiceDocNote is a Composite CDS View that provides data about "Service Transaction Notes" in SAP S/4HANA. It reads from 4 data sources (I_ServiceDocumentEnhcd, I_ServiceDocumentLongText, I_ServiceDocumentEnhcd, I_TextObject) and exposes 11 fields with key fields ServiceDocumentUUID, TextObjectType, Language, TextObjectType, Language.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_ServiceDocumentEnhcd | _ServiceDocumentEnhcd | inner |
| I_ServiceDocumentLongText | new | union |
| I_ServiceDocumentEnhcd | ServiceDocumentEnhcd | inner |
| I_TextObject | TextObject | from |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSRVDOCNOTE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Service Transaction Notes | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (11)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ServiceDocumentUUID | I_ServiceDocumentEnhcd | ServiceDocumentUUID | |
| KEY | TextObjectType | TextObjectType | ||
| KEY | Language | I_TextObject | Language | |
| TextObjectCategory | TextObjectCategory | |||
| CreatedByUser | CreatedByUser | |||
| ServiceDocumentUUIDasServiceDocumentUUID | ||||
| KEY | TextObjectType | I_ServiceDocumentLongText | TextObjectType | |
| KEY | Language | I_ServiceDocumentLongText | Language | |
| TextObjectCategory | I_ServiceDocumentLongText | TextObjectCategory | ||
| CreatedByUser | ||||
| LastChangedByUser |
@AbapCatalog.sqlViewName: 'PSRVDOCNOTE'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Service Transaction Notes'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.dataClass: #CUSTOMIZING
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
define view P_ServiceDocNote as select from I_TextObject as TextObject
inner join I_ServiceDocumentEnhcd as _ServiceDocumentEnhcd on _ServiceDocumentEnhcd.ServiceDocumentCharUUID = TextObject.TextObjectKey
{
key _ServiceDocumentEnhcd.ServiceDocumentUUID,
key TextObjectType,
key TextObject.Language,
TextObjectCategory,
CreatedByUser,
LastChangedByUser
//CreationDate,
//CreationTime,
//LastChangeDate,
//LastChangeTime
}
where TextObjectCategory = 'CRM_ORDERH'
union select from I_ServiceDocumentLongText as new
inner join I_ServiceDocumentEnhcd as ServiceDocumentEnhcd on ServiceDocumentEnhcd.ServiceDocument = new.ServiceDocument
{
key ServiceDocumentEnhcd.ServiceDocumentUUID as ServiceDocumentUUID,
key new.TextObjectType,
key new.Language,
new.TextObjectCategory,
cast( new.SrvcDocLongTextCreatedByUser as tdfuser ) as CreatedByUser,
cast( new.SrvcDocLongTextChangedByUser as tdfuser ) as LastChangedByUser
// tstmp_to_dats( new.SrvcDocLongTxtCreationDateTime,
// abap_user_timezone($session.user, $session.client,'NULL' ),
// $session.client,
// 'NULL' ) as CreationDate,
// tstmp_to_tims( new.SrvcDocLongTxtCreationDateTime,
// abap_user_timezone($session.user, $session.client,'NULL' ),
// $session.client,
// 'NULL' ) as CreationTime,
// tstmp_to_dats( new.SrvcDocLongTextChangedDateTime,
// abap_user_timezone($session.user, $session.client,'NULL' ),
// $session.client,
// 'NULL' ) as LastChangeDate,
// tstmp_to_tims( new.SrvcDocLongTextChangedDateTime,
// abap_user_timezone($session.user, $session.client,'NULL' ),
// $session.client,
// 'NULL' ) as LastChangeTime
} where new.TextObjectCategory = 'CRM_ORDERH'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SERVICEDOCUMENTENHCD",
"I_SERVICEDOCUMENTLONGTEXT",
"I_TEXTOBJECT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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