P_SupDmndAllDocSDRqmtType

DDL: P_SUPDMNDALLDOCSDRQMTTYPE Type: view BASIC

P_SupDmndAllDocSDRqmtType is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (tvep, vbak, vbap, vbep) and exposes 3 fields with key fields RequirementDocumentNumber, RequirementDocumentItem.

Data Sources (4)

SourceAliasJoin Type
tvep tvep inner
vbak vbak from
vbap vbap inner
vbep vbep inner

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #BASIC view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PSUPDMNDADSDRT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XXL view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY RequirementDocumentNumber vbap vbeln
KEY RequirementDocumentItem vbap posnr
RequirementType
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
viewType: #BASIC
}
@VDM.private: true
@AccessControl: {
  authorizationCheck: #NOT_REQUIRED,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@AbapCatalog: {
  sqlViewName: 'PSUPDMNDADSDRT',
  compiler.compareFilter: true,
  preserveKey:true
 }
@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #B,
     sizeCategory:   #XXL
   }
}
//@EndUserText.label: 'View for Sales Document Requirement Type'

define view P_SupDmndAllDocSDRqmtType
  as select from           vbak                     as vbak
    inner join             vbap                     as vbap   on   vbak.vbeln = vbap.vbeln
    inner join             vbep                     as vbep   on   vbap.vbeln = vbep.vbeln
                                                              and  vbap.posnr = vbep.posnr
    inner join             tvep                     as tvep   on   vbep.ettyp = tvep.ettyp
{
  key vbap.vbeln as RequirementDocumentNumber,
  key vbap.posnr as RequirementDocumentItem,
   'VM' as   RequirementType
}
 where
          vbak.rfgsk != 'C'       //Total Reference Status != Completely processed

  and     vbak.lfstk != 'C'       //Total Delivery Status != Completely processed

  and(
          vbak.vbtyp        = 'C' //Document Category = Order

    or    vbak.vbtyp        = 'I' //Document Category = Order without Charge

    or(
          vbak.vbtyp        = 'G' //Document Category = Contract

      and vbak.fsh_cq_check = 'X' //Requirement Relevance for Contract = 'X'

    )
  )
  and     vbap.rfsta != 'C'       //Reference Status != Completely processed

  and     vbap.posar != 'B'       //Item Type != Text item

  and     vbap.lfsta != 'C'       //Delivery Status != Completely processed

  and     vbap.abgru  = ' ' //RejectionReason = ' '

  and     vbap.shkzg != 'X'       //Returns != 'X'

  and( vbap.sobkz     = 'E'  ) //Consider Orders on Hand

  and tvep.bstyp = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"TVEP",
"VBAK",
"VBAP",
"VBEP"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/