P_MFGORDERDOCINFORECDOBJLINK

CDS View

P_MFGORDERDOCINFORECDOBJLINK is a CDS View in S/4HANA. It contains 35 fields. 6 CDS views read from this table.

CDS Views using this table (6)

ViewTypeJoinVDMDescription
I_MfgOrderDocInfoRecdObjLink view from COMPOSITE Mfg Order Document Info Record Object Link
I_MfgOrderDocumentDataList view from COMPOSITE Mfg Order Document (Data List)
I_MfgOrderDocumentLink view_entity from COMPOSITE Manufacturing Order Document Link
I_MfgOrderOpDocInfoRecdObjLink view from COMPOSITE Mfg Order Operation Document Info Record Object Link
I_OpActyDocInfoRecdObjLink view from COMPOSITE Operation Activity Document Info Record Object Link
I_SFIDocInfoRecdObjLink view from COMPOSITE Shop Floor Item Document Info Record Object Link

Fields (35)

KeyField CDS FieldsUsed in Views
KEY DocumentInfoRecord DocumentInfoRecord 6
KEY DocumentPart DocumentPart 1
KEY DocumentType DocumentType 6
KEY DocumentVersion DocumentVersion 1
KEY LinkedSAPObjectKey LinkedSAPObjectKey 3
KEY ManufacturingOrder ManufacturingOrder 1
_ChangedUser _ChangedUser 3
_ChangeNumber _ChangeNumber 1
_CreatedUser _CreatedUser 3
_DocumentNumber _DocumentNumber 5
_DocumentPart _DocumentPart 5
_DocumentStatus _DocumentStatus 1
_DocumentText _DocumentText 1
_DocumentType _DocumentType 5
_DocumentVersion _DocumentVersion 5
_MfgOrder _MfgOrder 3
_MfgOrderCategory _MfgOrderCategory 5
_MfgOrderType _MfgOrderType 5
_Text _Text 2
AuthorizationGroup AuthorizationGroup 4
ChangeNumber ChangeNumber 5
DocInfoRecdIsMarkedForDeletion DocInfoRecdIsMarkedForDeletion 4
DocInfoRecdLinkStatus DocInfoRecdLinkStatus 4
DocInfoRecdObjectLinkStatus DocInfoRecdObjectLinkStatus 4
DocLinkDirectionIsActive DocLinkDirectionIsActive 4
InternalDocumentStatus InternalDocumentStatus 6
IsDefaultDocument IsDefaultDocument 4
ManufacturingOrderCategory ManufacturingOrderCategory 6
ManufacturingOrderItem ManufacturingOrderItem 1
ManufacturingOrderOperation ManufacturingOrderOperation 1
ManufacturingOrderSequence ManufacturingOrderSequence 1
ManufacturingOrderType ManufacturingOrderType 4
MfgOrderLinkedObjType MfgOrderLinkedObjType 1
ObjectTypeDatabaseTable ObjectTypeDatabaseTable 4
OrderOperationInternalID OrderOperationInternalID 1
@AbapCatalog.sqlViewName: 'PPPMFGORDDOCOBJL'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #MIXED}
@VDM.lifecycle.contract.type: #NONE
@VDM.viewType: #COMPOSITE
@VDM.private: true

define view P_MfgOrderDocInfoRecdObjLink
  as select from P_MfgOrdLinkedSAPObjKeyRnge    as ord
    inner join   I_DocumentInfoRecordObjectLink as link on link.LinkedSAPObjectKey between ord.LinkedSAPObjectKeyLow and ord.LinkedSAPObjectKeyHigh
    inner join   I_DocumentInfoRecord           as docu on  link.DocumentInfoRecordDocType    = docu.DocumentInfoRecordDocType
                                                        and link.DocumentInfoRecordDocNumber  = docu.DocumentInfoRecordDocNumber
                                                        and link.DocumentInfoRecordDocPart    = docu.DocumentInfoRecordDocPart
                                                        and link.DocumentInfoRecordDocVersion = docu.DocumentInfoRecordDocVersion

  association [1..1] to I_ManufacturingOrder           as _MfgOrder        on  $projection.ManufacturingOrder = _MfgOrder.ManufacturingOrder
  association [1..1] to I_DocumentInfoRecordDocType    as _DocumentType    on  $projection.DocumentType = _DocumentType.DocumentInfoRecordDocType
  association [1..1] to I_DocumentInfoRecordDocNumber  as _DocumentNumber  on  $projection.DocumentType       = _DocumentNumber.DocumentInfoRecordDocType
                                                                           and $projection.DocumentInfoRecord = _DocumentNumber.DocumentInfoRecordDocNumber
  association [1..1] to I_DocumentInfoRecordDocVersion as _DocumentVersion on  $projection.DocumentType       = _DocumentVersion.DocumentInfoRecordDocType
                                                                           and $projection.DocumentInfoRecord = _DocumentVersion.DocumentInfoRecordDocNumber
                                                                           and $projection.DocumentVersion    = _DocumentVersion.DocumentInfoRecordDocVersion
  association [1..1] to I_DocumentInfoRecordDocPrt     as _DocumentPart    on  $projection.DocumentType       = _DocumentPart.DocumentInfoRecordDocType
                                                                           and $projection.DocumentInfoRecord = _DocumentPart.DocumentInfoRecordDocNumber
                                                                           and $projection.DocumentVersion    = _DocumentPart.DocumentInfoRecordDocVersion
                                                                           and $projection.DocumentPart       = _DocumentPart.DocumentInfoRecordDocPart
  association [0..1] to I_DocumentInfoRecordDocStatus  as _DocumentStatus  on  $projection.DocumentType           = _DocumentStatus.DocumentInfoRecordDocType
                                                                           and $projection.InternalDocumentStatus = _DocumentStatus.InternalDocumentStatus
  association [0..*] to I_DocumentInfoRecordDesc       as _DocumentText    on  $projection.DocumentType       = _DocumentText.DocumentInfoRecordDocType
                                                                           and $projection.DocumentInfoRecord = _DocumentText.DocumentInfoRecordDocNumber
                                                                           and $projection.DocumentVersion    = _DocumentText.DocumentInfoRecordDocVersion
                                                                           and $projection.DocumentPart       = _DocumentText.DocumentInfoRecordDocPart
  association [0..1] to I_ChangeMaster                 as _ChangeNumber    on  $projection.ChangeNumber = _ChangeNumber.ChangeNumber
  association [0..1] to I_User                         as _CreatedUser     on  $projection.CreatedByUser = _CreatedUser.UserID
  association [0..1] to I_User                         as _ChangedUser     on  $projection.LastChangedByUser = _ChangedUser.UserID
{
  key link.LinkedSAPObjectKey           as LinkedSAPObjectKey,
  key link.LinkedSAPObject              as LinkedSAPObject,
  key link.DocumentInfoRecordDocType    as DocumentType,
  key link.DocumentInfoRecordDocNumber  as DocumentInfoRecord,
  key link.DocumentInfoRecordDocPart    as DocumentPart,
  key link.DocumentInfoRecordDocVersion as DocumentVersion,

      // Administrative Data

      link.CreationDateTime,
      link.CreatedByUser,
      link.ChangedDateTime,
      link.LastChangedByUser,

      // Document Data

      docu.InternalDocumentStatus,
      docu.ChangeNumber,
      docu.AuthorizationGroup,
      docu.ResponsiblePersonName,
      docu.LaboratoryOrDesignOffice,
      docu.Plant,

      // Miscellaneous Data

      link.DocInfoRecdLinkStatus,
      link.DocInfoRecdObjectLinkStatus,
      link.ObjectTypeDatabaseTable,
      @Semantics.booleanIndicator
      case link.DocLinkDirectionIsActive
        when '' then ''
        else 'X'
      end as DocLinkDirectionIsActive,
      link.IsDefaultDocument,
      @Semantics.booleanIndicator
      link.DocInfoRecdIsMarkedForDeletion,

      // build substrings for I_ view

      ord.ManufacturingOrder                         as ManufacturingOrder,
      substring(link.LinkedSAPObjectKey, 13, 1)      as MfgOrderLinkedObjType,
      substring(link.LinkedSAPObjectKey, 14, 4)      as ManufacturingOrderItem,
      substring(link.LinkedSAPObjectKey, 18, 6)      as ManufacturingOrderSequence,
      substring(link.LinkedSAPObjectKey, 24, 4)      as ManufacturingOrderOperation,
      substring(link.LinkedSAPObjectKey, 28, 8)      as OrderOperationInternalID,
--    substring(link.LinkedSAPObjectKey, 36, 4)      as DocObjectLinkCounter
      substring(link.LinkedSAPObjectKey, 40, 1)      as OpActyNtwkSegmentType,
      substring(link.LinkedSAPObjectKey, 41,10)      as OpActyNtwkElementExternalID,
      substring(link.LinkedSAPObjectKey, 51,18)      as SerialNumber,

      //Order Data

      ord.ManufacturingOrderCategory,
      ord.ManufacturingOrderType,

      // Associations

      _MfgOrder,
      _DocumentType,
      _DocumentNumber,
      _DocumentVersion,
      _DocumentPart,
      _DocumentStatus,
      _DocumentText,
      _CreatedUser,
      _ChangedUser,
      _ChangeNumber,
      ord._MfgOrderCategory,
      ord._MfgOrderType,
      link._DocumentInfoRecordDesc as _Text
}
where
  link.LinkedSAPObject = 'PORDER';  // only prod. orders

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DOCUMENTINFORECORD",
"I_DOCUMENTINFORECORDOBJECTLINK",
"P_MFGORDLINKEDSAPOBJKEYRNGE"
],
"ASSOCIATED":
[
"I_CHANGEMASTER",
"I_DOCUMENTINFORECORDDESC",
"I_DOCUMENTINFORECORDDOCNUMBER",
"I_DOCUMENTINFORECORDDOCPRT",
"I_DOCUMENTINFORECORDDOCSTATUS",
"I_DOCUMENTINFORECORDDOCTYPE",
"I_DOCUMENTINFORECORDDOCVERSION",
"I_MANUFACTURINGORDER",
"I_MFGORDERCATEGORY",
"I_MFGORDERTYPE",
"I_USER"
],
"BASE":
[
"I_DOCUMENTINFORECORDOBJECTLINK",
"P_MFGORDLINKEDSAPOBJKEYRNGE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/