P_DOCINFORECD

CDS View

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

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_DocInfoRecd view from BASIC Document Info Record Details

Fields (17)

KeyField CDS FieldsUsed in Views
KEY DocumentInfoRecord DocumentInfoRecord 1
KEY DocumentPart DocumentPart 1
KEY DocumentType DocumentType 1
KEY DocumentVersion DocumentVersion 1
AuthorizationGroup AuthorizationGroup 1
ChangedDateTime ChangedDateTime 1
ChangeNumber ChangeNumber 1
CreatedByUser CreatedByUser 1
CreationDateTime CreationDateTime 1
DocInfoRecdHierarchy DocInfoRecdHierarchy 1
DocInfoRecdIsMarkedForDeletion DocInfoRecdIsMarkedForDeletion 1
DocumentIsCreatedByCAD DocumentIsCreatedByCAD 1
InternalDocumentStatus InternalDocumentStatus 1
IsDocInfoRecdStructure IsDocInfoRecdStructure 1
LaboratoryOrDesignOffice LaboratoryOrDesignOffice 1
LastChangedByUser LastChangedByUser 1
ResponsiblePersonName ResponsiblePersonName 1
@AbapCatalog.sqlViewName: 'PCVDOCINFORECD'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #BASIC
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.lifecycle: {
  contract: {
    type: #NONE
  },
  status: #DEPRECATED,
  successor: 'P_DocumentInfoRecord'
}

define view P_DocInfoRecd
  as select distinct from draw as doc_info
    left outer join draw_last_change as Last_Change on  doc_info.doknr = Last_Change.doknr
                                                    and doc_info.doktl = Last_Change.doktl
                                                    and doc_info.dokvr = Last_Change.dokvr
                                                    and doc_info.dokar = Last_Change.dokar

  /*   Association to get Document Structure indicator */
  --Get Document BOM Link
    left outer join  dost  as DocumentStructureBOM  on  doc_info.doknr = DocumentStructureBOM.doknr
                                                    and doc_info.doktl = DocumentStructureBOM.doktl
                                                    and doc_info.dokvr = DocumentStructureBOM.dokvr
                                                    and doc_info.dokar = DocumentStructureBOM.dokar

{

  key doc_info.dokar  as DocumentType,
  key doc_info.doknr  as DocumentInfoRecord,
  key doc_info.dokvr  as DocumentVersion,
  key doc_info.doktl  as DocumentPart,
      doc_info.dwnam  as ResponsiblePersonName,
      doc_info.dokst  as InternalDocumentStatus,
      doc_info.labor  as LaboratoryOrDesignOffice,
      doc_info.aennr  as ChangeNumber,
      doc_info.werka  as Plant,
      doc_info.prenr  as SuperiorDocumentInfoRecord,
      doc_info.prevr  as SuperiorDocumentVersion,
      doc_info.pretl  as SuperiorDocumentPart,
      doc_info.prear  as SuperiorDocumentType,
      doc_info.begru  as AuthorizationGroup,
      doc_info.vrldat as DueDate,
      doc_info.vprior as ProcessingPriority,
      doc_info.adatum as DocInfoRecdOutputDate,
      doc_info.doknr_vl as SourceDocInfoRecd,
      doc_info.doktl_vl as DocInfoRecdSourceDocPart,
      doc_info.dokvr_vl as DocInfoRecdSourceDocVersion,
      doc_info.cm_fixed as DocInfoRecdConfignMgmtFixed,

      /*      Document Structure,CAD,hierarchy Indicator    */
      case
        when DocumentStructureBOM.doknr is not null then cast('X' as abap.char(1))
        when DocumentStructureBOM.doknr is null then cast(' ' as abap.char(1))
      end as IsDocInfoRecdStructure,

      case  doc_info.prenr
          when ''  then ''
          else  'X'
      end as DocInfoRecdHierarchy,

      doc_info.loedk as DocInfoRecdIsMarkedForDeletion,
      doc_info.cadkz as DocumentIsCreatedByCAD,

      /*  DIR Administrative Data                                        */
      @Semantics.businessDate.at: true
      @Semantics.businessDate.createdAt: true
      Last_Change.created_at as CreationDateTime,

      @Semantics.user.createdBy: true
      Last_Change.created_by as CreatedByUser,

      @Semantics.businessDate.at: true
      @Semantics.businessDate.lastChangedAt: true
      Last_Change.changed_at as ChangedDateTime,

      @Semantics.user.lastChangedBy: true
      Last_Change.changed_by as LastChangedByUser

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"DOST",
"DRAW",
"DRAW_LAST_CHANGE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/