@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'
}
defineview P_DocInfoRecd
asselectdistinctfrom draw as doc_info
leftouterjoin 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
leftouterjoin 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 */casewhen DocumentStructureBOM.doknr isnotnullthencast('X' asabap.char(1))
when DocumentStructureBOM.doknr isnullthencast(' ' asabap.char(1))
endas IsDocInfoRecdStructure,
case doc_info.prenr
when '' then ''
else 'X'
endas 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":""
}
}*/