P_AllwdOrdTypPerSlsOrg

DDL: P_ALLWDORDTYPPERSLSORG SQL: PALWDORDTPSLSORG Type: view CONSUMPTION

P_AllwdOrdTypPerSlsOrg is a Consumption CDS View in SAP S/4HANA. It reads from 4 data sources (I_AllwdOrdTypPerSlsOrg, I_AllwdOrdTypPerSlsOrg, I_BillingDocument, I_SalesDocument) and exposes 12 fields with key field Document.

Data Sources (4)

SourceAliasJoin Type
I_AllwdOrdTypPerSlsOrg AllwdOrdTypPerSlsOrg left_outer
I_AllwdOrdTypPerSlsOrg AllwdOrdTypPerSlsOrg left_outer
I_BillingDocument BillingDocument union
I_SalesDocument SalesDocument from

Annotations (7)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PALWDORDTPSLSORG view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY Document I_SalesDocument SalesDocument
SalesDocument I_SalesDocument SalesDocument
SalesDocumentType I_AllwdOrdTypPerSlsOrg SalesDocumentType
SalesOrganization I_AllwdOrdTypPerSlsOrg SalesOrganization
Division I_AllwdOrdTypPerSlsOrg Division
DistributionChannel I_AllwdOrdTypPerSlsOrg DistributionChannel
BillingDocumentasDocument
SalesDocument I_BillingDocument BillingDocument
SalesDocumentType I_AllwdOrdTypPerSlsOrg SalesDocumentType
SalesOrganization I_AllwdOrdTypPerSlsOrg SalesOrganization
Division I_AllwdOrdTypPerSlsOrg Division
DistributionChannel I_AllwdOrdTypPerSlsOrg DistributionChannel
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PALWDORDTPSLSORG'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED

define view P_AllwdOrdTypPerSlsOrg 
as select from I_SalesDocument         as SalesDocument
left outer join I_AllwdOrdTypPerSlsOrg as AllwdOrdTypPerSlsOrg  on SalesDocument.DistributionChannel      = AllwdOrdTypPerSlsOrg.DistributionChannel
                                                               and SalesDocument.SalesOrganization        = AllwdOrdTypPerSlsOrg.SalesOrganization
                                                               and SalesDocument.OrganizationDivision     = AllwdOrdTypPerSlsOrg.Division
                                                               and AllwdOrdTypPerSlsOrg.SalesDocumentType = 'CBAR'
                                                                                    
left outer to one join P_AllwdTypPerSlsOrgCnt as AllwdTypPerSlsOrgCnt on AllwdTypPerSlsOrgCnt.AllwdOrdTypPerSlsOrgCount != 0
{
     key SalesDocument.SalesDocument as Document,
         SalesDocument.SalesDocument,
         AllwdOrdTypPerSlsOrg.SalesDocumentType,
         AllwdOrdTypPerSlsOrg.SalesOrganization,
         AllwdOrdTypPerSlsOrg.Division,
         AllwdOrdTypPerSlsOrg.DistributionChannel,
         case when AllwdTypPerSlsOrgCnt.AllwdOrdTypPerSlsOrgCount = 0 or AllwdTypPerSlsOrgCnt.AllwdOrdTypPerSlsOrgCount is null
         then ''
         else 'X'
         end  as CheckRequired
    
}  
 
union 

select from I_BillingDocument as BillingDocument 
left outer join I_AllwdOrdTypPerSlsOrg as AllwdOrdTypPerSlsOrg  on BillingDocument.DistributionChannel    = AllwdOrdTypPerSlsOrg.DistributionChannel
                                                               and BillingDocument.SalesOrganization      = AllwdOrdTypPerSlsOrg.SalesOrganization
                                                               and BillingDocument.Division               = AllwdOrdTypPerSlsOrg.Division
                                                               and AllwdOrdTypPerSlsOrg.SalesDocumentType = 'CBAR'
                                                                                    
left outer to one join P_AllwdTypPerSlsOrgCnt as AllwdTypPerSlsOrgCnt on AllwdTypPerSlsOrgCnt.AllwdOrdTypPerSlsOrgCount != 0
{
     key BillingDocument.BillingDocument as Document,
         BillingDocument.BillingDocument as SalesDocument,
         AllwdOrdTypPerSlsOrg.SalesDocumentType,
         AllwdOrdTypPerSlsOrg.SalesOrganization,
         AllwdOrdTypPerSlsOrg.Division,
         AllwdOrdTypPerSlsOrg.DistributionChannel,
         case when AllwdTypPerSlsOrgCnt.AllwdOrdTypPerSlsOrgCount = 0 or AllwdTypPerSlsOrgCnt.AllwdOrdTypPerSlsOrgCount is null
         then ''
         else 'X'
         end  as CheckRequired
    
}                     
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ALLWDORDTYPPERSLSORG",
"I_BILLINGDOCUMENT",
"I_SALESDOCUMENT",
"P_ALLWDTYPPERSLSORGCNT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/