I_SalesDocumentRelatedObject

DDL: I_SALESDOCUMENTRELATEDOBJECT Type: view_entity BASIC Package: VDM_SD_SLS

Sales Document Related Object

I_SalesDocumentRelatedObject is a Basic CDS View that provides data about "Sales Document Related Object" in SAP S/4HANA. It reads from 2 data sources (I_SDDocumentRelatedObject, I_SalesDocumentBasic) and exposes 14 fields with key fields SalesDocument, SDDocumentCategory, SDDocRelatedObjectSequenceNmbr. Part of development package VDM_SD_SLS.

Data Sources (2)

SourceAliasJoin Type
I_SDDocumentRelatedObject RelatedObject from
I_SalesDocumentBasic SalesDocument inner

Annotations (8)

NameValueLevelField
EndUserText.label Sales Document Related Object view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument
KEY SDDocumentCategory I_SDDocumentRelatedObject SDDocumentCategory
KEY SDDocRelatedObjectSequenceNmbr I_SDDocumentRelatedObject SDDocRelatedObjectSequenceNmbr
SDDocumentRelatedObjectType I_SDDocumentRelatedObject SDDocumentRelatedObjectType
SDDocRelatedObjectSystem I_SDDocumentRelatedObject SDDocRelatedObjectSystem
SDDocRelatedObjectReference1 I_SDDocumentRelatedObject SDDocRelatedObjectReference1
SDDocRelatedObjectReference2 I_SDDocumentRelatedObject SDDocRelatedObjectReference2
SalesDocumentType I_SalesDocumentBasic SalesDocumentType
OrganizationDivision I_SalesDocumentBasic OrganizationDivision
SalesOrganization I_SalesDocumentBasic SalesOrganization
DistributionChannel I_SalesDocumentBasic DistributionChannel
_SalesDocument _SalesDocument
_SDDocumentCategory _SDDocumentCategory
_SDDocumentRelatedObjectType I_SDDocumentRelatedObject _SDDocumentRelatedObjectType
//@ClientHandling.algorithm: #SESSION_VARIABLE 

@EndUserText.label: 'Sales Document Related Object'
@VDM: {
  viewType: #BASIC,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: { 
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
//@AbapCatalog: {

//  sqlViewName: 'ISDSLSDOCRO',

//  preserveKey: true,

//  compiler.compareFilter: true

//}

@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #B,
     sizeCategory:   #XL
   },
   supportedCapabilities: [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]
}
@Metadata.ignorePropagatedAnnotations:true
define view entity I_SalesDocumentRelatedObject as select from  I_SDDocumentRelatedObject as RelatedObject
  inner join     I_SalesDocumentBasic as SalesDocument on SalesDocument.SalesDocument = RelatedObject.SalesDocument
      
    association[1..1] to I_SalesDocument            as _SalesDocument            on $projection.SalesDocument       = _SalesDocument.SalesDocument  
    association[0..1] to I_SDDocumentCategory       as _SDDocumentCategory       on $projection.SDDocumentCategory  = _SDDocumentCategory.SDDocumentCategory

{
    @ObjectModel.foreignKey.association: '_SalesDocument'                                                                                                   
    key cast(RelatedObject.SalesDocument as vbeln_va preserving type) as SalesDocument,
    
    @ObjectModel.foreignKey.association: '_SDDocumentCategory'
    key RelatedObject.SDDocumentCategory,

    //@ObjectModel.readOnly: true

    key  RelatedObject.SDDocRelatedObjectSequenceNmbr,    

    @ObjectModel.foreignKey.association: '_SDDocumentRelatedObjectType' 
    RelatedObject.SDDocumentRelatedObjectType,
    RelatedObject.SDDocRelatedObjectSystem,
    RelatedObject.SDDocRelatedObjectReference1,
    RelatedObject.SDDocRelatedObjectReference2,   
         
    @Consumption.hidden: true
    SalesDocument.SalesDocumentType,
    @Consumption.hidden: true
    SalesDocument.OrganizationDivision,
    @Consumption.hidden: true
    SalesDocument.SalesOrganization,
    @Consumption.hidden: true
    SalesDocument.DistributionChannel,
    
    //Association

    _SalesDocument,
    _SDDocumentCategory,
    RelatedObject._SDDocumentRelatedObjectType
}