N_ChangeRecordObjPgDoc

DDL: N_CHANGERECORDOBJPGDOC SQL: NCHGRCDOBJPGDOC Type: view

Change Record Reference Object Document

N_ChangeRecordObjPgDoc is a CDS View that provides data about "Change Record Reference Object Document" in SAP S/4HANA. It reads from 2 data sources (I_DocumentInfoRecord, I_ChgRecdRefDocBsc) and exposes 21 fields with key field ChangeRecordReferenceUUID. It has 5 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_DocumentInfoRecord Document left_outer
I_ChgRecdRefDocBsc reference_DOC from

Associations (5)

CardinalityTargetAliasCondition
[1..1] C_ChangeRecordObjPg _ChangeRecordObjPg $projection.ChangeRecordUUID = _ChangeRecordObjPg.ChangeRecordUUID
[1..1] C_ChangeRecordItemRelDocVH _ChangeRecordItemRelDocVH $projection.ChangeRecordItemRelevance = _ChangeRecordItemRelDocVH.ChangeRecordItemRelevance and $projection.ChangeRecordType = _ChangeRecordItemRelDocVH.ChangeRecordType and $projection.ChangeRecordReferenceType = _ChangeRecordItemRelDocVH.ChangeRecordReferenceType
[0..1] I_ChangeRecordDocStatus _ChangeRecordDocStatus $projection.DocumentType = _ChangeRecordDocStatus.DocumentType and $projection.DocumentInfoRecord = _ChangeRecordDocStatus.DocumentInfoRecord and $projection.DocumentVersion = _ChangeRecordDocStatus.DocumentVersion and $projection.DocumentPart = _ChangeRecordDocStatus.DocumentPart --Get Document Type
[1..1] I_DocumentInfoRecordDocType _DocumentType $projection.DocumentType = _DocumentType.DocumentInfoRecordDocType --Get Document Part
[1..1] I_ChangeRecordDocPart _DocumentPart $projection.DocumentType = _DocumentPart.DocumentType and $projection.DocumentPart = _DocumentPart.DocumentPart and $projection.DocumentInfoRecord = _DocumentPart.DocumentInfoRecord and $projection.DocumentVersion = _DocumentPart.DocumentVersion

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName NCHGRCDOBJPGDOC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Change Record Reference Object Document view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XXL view
ClientHandling.algorithm #SESSION_VARIABLE view
Search.searchable true view
VDM.auxiliaryEntity.for.entity C_ChangeRecordObjPgDoc view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY ChangeRecordReferenceUUID ChangeRecordReferenceUUID
DocumentInfoRecord I_DocumentInfoRecord DocumentInfoRecordDocNumber
DocumentType I_DocumentInfoRecord DocumentInfoRecordDocType
DocumentPart I_DocumentInfoRecord DocumentInfoRecordDocPart
DocumentVersion I_DocumentInfoRecord DocumentInfoRecordDocVersion
ChangeRecordType _ChangeRecordObjPg ChangeRecordType
ChangeRecordUUID ChangeRecordUUID
ChangeRecordReferenceType ChangeRecordReferenceType
ChangeRecordReferenceSubtype ChangeRecordReferenceSubtype
ChangeRecordReference ChangeRecordReference
ParentChangeRecordRefUUID ParentChangeRecordRefUUID
IsMainReference IsMainReference
CreatedByUser I_ChgRecdRefDocBsc CreatedByUser
CreationDateTime I_ChgRecdRefDocBsc CreationDateTime
ExternalDocumentStatus
DocumentStatusName
DocumentDescription _DocumentPart DocumentDescription
ChangeRecordItemRelevance
_ChangeRecordItemRelDocVH _ChangeRecordItemRelDocVH
_DocumentType _DocumentType
_DocumentPart _DocumentPart
@AbapCatalog.sqlViewName: 'NCHGRCDOBJPGDOC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Change Record Reference Object Document'
@AccessControl.personalData.blocking:#BLOCKED_DATA_EXCLUDED
@ObjectModel: {
   semanticKey: ['DocumentType','DocumentInfoRecord','DocumentVersion','DocumentPart']
}


@ObjectModel.usageType: {serviceQuality: #C,
                          dataClass: #MIXED,
                          sizeCategory: #XXL}
@ClientHandling.algorithm: #SESSION_VARIABLE
@Search.searchable: true

@VDM.auxiliaryEntity.usage.type: [#ENTERPRISE_SEARCH]
@VDM.auxiliaryEntity.for.entity: 'C_ChangeRecordObjPgDoc'

define view N_ChangeRecordObjPgDoc
  as select from  I_ChgRecdRefDocBsc as reference_DOC
    left outer join I_DocumentInfoRecord      as Document on  reference_DOC.ChgRecRefInternalKey1 = Document.DocumentInfoRecordDocType
                                                   and reference_DOC.ChgRecRefInternalKey2 = Document.DocumentInfoRecordDocNumber
                                                   and reference_DOC.ChgRecRefInternalKey3 = Document.DocumentInfoRecordDocVersion
                                                   and reference_DOC.ChgRecRefInternalKey4 = Document.DocumentInfoRecordDocPart
//  association [1..1] to I_ChangeRecordDraftTP as _ChangeRecord on $projection.ChangeRecordUUID = _ChangeRecord.ChangeRecordUUID

//  association [0..1] to E_ChgRecdRefDocBsc    as _DocExtension on $projection.ChangeRecordReferenceUUID = _DocExtension.ChangeRecordReferenceUUID


  association [1..1] to C_ChangeRecordObjPg         as _ChangeRecordObjPg        on  $projection.ChangeRecordUUID = _ChangeRecordObjPg.ChangeRecordUUID
  association [1..1] to C_ChangeRecordItemRelDocVH  as _ChangeRecordItemRelDocVH on  $projection.ChangeRecordItemRelevance = _ChangeRecordItemRelDocVH.ChangeRecordItemRelevance
                                                                                 and $projection.ChangeRecordType          = _ChangeRecordItemRelDocVH.ChangeRecordType
                                                                                 and $projection.ChangeRecordReferenceType = _ChangeRecordItemRelDocVH.ChangeRecordReferenceType
  association [0..1] to I_ChangeRecordDocStatus     as _ChangeRecordDocStatus    on  $projection.DocumentType       = _ChangeRecordDocStatus.DocumentType
                                                                                 and $projection.DocumentInfoRecord = _ChangeRecordDocStatus.DocumentInfoRecord
                                                                                 and $projection.DocumentVersion    = _ChangeRecordDocStatus.DocumentVersion
                                                                                 and $projection.DocumentPart       = _ChangeRecordDocStatus.DocumentPart
  --Get Document Type Association
  association [1..1] to I_DocumentInfoRecordDocType as _DocumentType             on  $projection.DocumentType = _DocumentType.DocumentInfoRecordDocType
  --Get Document Part Association
  association [1..1] to I_ChangeRecordDocPart       as _DocumentPart             on  $projection.DocumentType       = _DocumentPart.DocumentType
                                                                                 and $projection.DocumentPart       = _DocumentPart.DocumentPart
                                                                                 and $projection.DocumentInfoRecord = _DocumentPart.DocumentInfoRecord
                                                                                 and $projection.DocumentVersion    = _DocumentPart.DocumentVersion

{ 
   
      @UI.hidden: true
   
  key ChangeRecordReferenceUUID,

      @UI.lineItem:[{
                  position:10,
                  importance:#HIGH }
                ]
      @UI.identification: {position: 10, importance: #HIGH}
      //      @Consumption.valueHelp: '_DocumentPart'

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ChangeRecordDocPartVH',
                     element: 'DocumentInfoRecord' },
          additionalBinding: [{ localElement: 'DocumentType',
                                element: 'DocumentType' },
                              { localElement: 'DocumentVersion',
                                element: 'DocumentVersion' },
                              { localElement: 'DocumentPart',
                                element: 'DocumentPart' }]
        }]
      @ObjectModel.text.element: 'DocumentDescription'

      Document.DocumentInfoRecordDocNumber as DocumentInfoRecord,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_DocInfoRecdDocTypeStdVH',
                     element: 'DocumentInfoRecordDocType' }
        }]
      // ]--GENERATED

      @UI.lineItem:[{
                  position:20,
                  importance:#HIGH }
                ]
      @UI.identification: {position: 20, importance: #HIGH}

      @ObjectModel.foreignKey.association: '_DocumentType'
      Document.DocumentInfoRecordDocType    as       DocumentType,

      @UI.lineItem:[{
                  position:30,
                  importance:#HIGH }
                ]
      @UI.identification: {position: 30, importance: #HIGH}
      //      @Consumption.valueHelp: '_DocumentPart'

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ChangeRecordDocPartVH',
                     element: 'DocumentPart' },
          additionalBinding: [{ localElement: 'DocumentType',
                                element: 'DocumentType' },
                              { localElement: 'DocumentInfoRecord',
                                element: 'DocumentInfoRecord' },
                              { localElement: 'DocumentVersion',
                                element: 'DocumentVersion' }]
        }]
      Document.DocumentInfoRecordDocPart as  DocumentPart,
      @UI.lineItem:[{
                  position:40,
                  importance:#HIGH }
                ]
      @UI.identification: {position: 40, importance: #HIGH}
      //      @Consumption.valueHelp: '_DocumentPart'

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ChangeRecordDocPartVH',
                     element: 'DocumentVersion' },
          additionalBinding: [{ localElement: 'DocumentType',
                                element: 'DocumentType' },
                              { localElement: 'DocumentInfoRecord',
                                element: 'DocumentInfoRecord' },
                              { localElement: 'DocumentPart',
                                element: 'DocumentPart' }]
        }]
      Document.DocumentInfoRecordDocVersion as DocumentVersion,

      @UI.hidden: true
      @ObjectModel.foreignKey.association: '_ChangeRecordItemRelDocVH'
      _ChangeRecordObjPg.ChangeRecordType                                                                                  as  ChangeRecordType,
    
      @UI.hidden: true
      ChangeRecordUUID,
      @UI.hidden: true
      ChangeRecordReferenceType,
      @UI.hidden: true
      ChangeRecordReferenceSubtype,
      @UI.hidden: true
      ChangeRecordReference,
      @UI.hidden: true
      ParentChangeRecordRefUUID,
      @UI.hidden: true
      IsMainReference,
      @Semantics.user.createdBy: true
      @ObjectModel.readOnly: true
      reference_DOC.CreatedByUser,
      @UI.hidden: true
      reference_DOC.CreationDateTime,
            
            @ObjectModel.readOnly: true
            @ObjectModel.text.element:  [ 'DocumentStatusName' ]
            @UI.lineItem:[{
                        position:50,
                        importance:#HIGH }
                      ]
            @UI.identification: {position: 50, importance: #HIGH}

            _ChangeRecordDocStatus._DocStatus._Text[1:Language = $session.system_language].ExternalDocumentStatus                as  ExternalDocumentStatus,
            @ObjectModel.readOnly: true
            @UI.hidden: true
            _ChangeRecordDocStatus._DocStatus._Text[1:Language = $session.system_language].DocumentStatusName                    as  DocumentStatusName,

      @ObjectModel.readOnly: true
      @UI.hidden: true
      _DocumentPart.DocumentDescription                                                                                    as  DocumentDescription,

      @UI.lineItem:[{
                  position:60,
                  importance:#HIGH }
                ]
      @UI.identification: {position: 60, importance: #HIGH}
      @Consumption: { valueHelp: '_ChangeRecordItemRelDocVH' }
      @ObjectModel: {foreignKey.association: '_ChangeRecordItemRelDocVH' }
      --      @ObjectModel.mandatory: true
      ChangeRecordItemRelevance,
      //      _ChangeRecordDocStatus,

      _ChangeRecordItemRelDocVH,
      _DocumentType,
      _DocumentPart


};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_CHANGERECORDOBJPG",
"I_CHANGERECORDDOCPART",
"I_CHANGERECORDDOCSTATUS",
"I_CHGRECDREFDOCBSC",
"I_DOCUMENTINFORECORD",
"I_DOCUMENTINFORECORDDOCSTATUS",
"I_DOCUMENTINFORECORDDOCSTATUST"
],
"ASSOCIATED":
[
"C_CHANGERECORDITEMRELDOCVH",
"C_CHANGERECORDOBJPG",
"I_CHANGERECORDDOCPART",
"I_CHANGERECORDDOCSTATUS",
"I_DOCUMENTINFORECORDDOCTYPE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/