@AbapCatalog.sqlViewName: 'PCVDOCINFOREC'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@VDM.viewType: #COMPOSITE@VDM.private: true@ClientHandling.algorithm: #SESSION_VARIABLE@AccessControl.authorizationCheck: #NOT_REQUIRED@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #L, dataClass: #TRANSACTIONAL}defineview P_DocumentInfoRecord
asselectfrom I_DocumentInfoRecordDetail as _document
leftouter to one join I_DocumentInfoRecordModifDet as _Last_Change on _document.DocumentInfoRecordDocType = _Last_Change.DocumentInfoRecordDocType
and _document.DocumentInfoRecordDocPart = _Last_Change.DocumentInfoRecordDocPart
and _document.DocumentInfoRecordDocNumber = _Last_Change.DocumentInfoRecordDocNumber
and _document.DocumentInfoRecordDocVersion = _Last_Change.DocumentInfoRecordDocVersion
leftouter to one join I_DocumentInfoRecordBOMLink as _DocumentStructureBOM on _document.DocumentInfoRecordDocType = _DocumentStructureBOM.DocumentInfoRecordDocType
and _document.DocumentInfoRecordDocPart = _DocumentStructureBOM.DocumentInfoRecordDocPart
and _document.DocumentInfoRecordDocNumber = _DocumentStructureBOM.DocumentInfoRecordDocNumber
and _document.DocumentInfoRecordDocVersion = _DocumentStructureBOM.DocumentInfoRecordDocVersion
{
/* Document Info Record key Details */key _document.DocumentInfoRecordDocType as DocumentInfoRecordDocType,
key _document.DocumentInfoRecordDocVersion as DocumentInfoRecordDocVersion,
key _document.DocumentInfoRecordDocNumber as DocumentInfoRecordDocNumber,
key _document.DocumentInfoRecordDocPart as DocumentInfoRecordDocPart,
_document.DocumentInfoRecord as DocumentInfoRecord,
/* Document Info Record other Details */
_document.InternalDocumentStatus as InternalDocumentStatus,
_document.LaboratoryOrDesignOffice as LaboratoryOrDesignOffice,
_document.Plant as Plant,
_document.AuthorizationGroup as AuthorizationGroup,
_document.ChangeNumber as ChangeNumber,
/* Document Structure, CAD and Deletion Indicator */
_document.DocInfoRecdIsMarkedForDeletion as DocInfoRecdIsMarkedForDeletion,
_document.IsDocInfoRecdCreatedFromCAD as IsDocInfoRecdCreatedFromCAD,
casewhen _DocumentStructureBOM.DocumentInfoRecordDocNumber isnotnullthen 'X'
else ' '
endas IsDocInfoRecdStructure,
//
// case// when DocumentStructureBOM.doknr isnotnullthen 'X'
// //else 'X'
// endas IsDocInfoRecdStructure,
//' ' as IsDocInfoRecdStructure,
/* Document Info Record Template Details */
_document.DocInfoRecdSourceDocNumber as DocInfoRecdSourceDocNumber,
_document.DocInfoRecdSourceDocPart as DocInfoRecdSourceDocPart,
_document.DocInfoRecdSourceDocVersion as DocInfoRecdSourceDocVersion,
_document.ResponsiblePersonName as ResponsiblePersonName,
/* Document Info Record Administrative Data *///@Semantics.businessDate.at: true//@Semantics.businessDate.createdAt: true//@Semantics.systemDateTime.createdAt: true
_Last_Change.CreationDateTime as CreationDateTime,
@Semantics.user.createdBy: true
_Last_Change.CreatedByUser as CreatedByUser,
//@Semantics.businessDate.at: true//@Semantics.businessDate.lastChangedAt: true//@Semantics.systemDateTime.lastChangedAt: true
_Last_Change.ChangedDateTime as ChangedDateTime,
@Semantics.user.lastChangedBy: true
_Last_Change.LastChangedByUser as LastChangedByUser
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DOCUMENTINFORECORDBOMLINK",
"I_DOCUMENTINFORECORDDETAIL",
"I_DOCUMENTINFORECORDMODIFDET"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/