P_SlsOrdProcFlow41

DDL: P_SLSORDPROCFLOW41 SQL: PSLSORDPROCF41 Type: view CONSUMPTION

P_SlsOrdProcFlow41 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_AccountingDocument) and exposes 10 fields with key fields Level3Document, AccountingDocument, SalesOrder.

Data Sources (1)

SourceAliasJoin Type
I_AccountingDocument AccountingDocument inner

Annotations (9)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
VDM.private true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PSLSORDPROCF41 view
AbapCatalog.preserveKey true view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY Level3Document Level3Document
KEY AccountingDocument I_AccountingDocument AccountingDocument
KEY SalesOrder SalesOrder
SalesOrderType SalesOrderType
CompanyCode I_AccountingDocument CompanyCode
FiscalYear I_AccountingDocument FiscalYear
Level3DocumentCategory Level3DocumentCategory
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
OrganizationDivision OrganizationDivision
@ClientHandling.algorithm: #SESSION_VARIABLE 
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL

@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PSLSORDPROCF41'
@AbapCatalog.preserveKey:true 

define view P_SlsOrdProcFlow41
  as select distinct from P_SlsOrdProcFlow30 as Level3
  inner join              I_AccountingDocument      as AccountingDocument
  on   Level3.Level3Document                    = AccountingDocument.OriginalReferenceDocument
  and  AccountingDocument.ReferenceDocumentType = 'VBRK'    
  
{
      //Key

  key Level3Document,
  key AccountingDocument.AccountingDocument,
      
      //SalesOrder

  key SalesOrder,
      SalesOrderType,
      
      //AccountingDocument additional keys

      AccountingDocument.CompanyCode,
      AccountingDocument.FiscalYear,
      

      //Category

      Level3DocumentCategory,

      //Organization

      SalesOrganization,
      DistributionChannel,
      OrganizationDivision

}
where Level3DocumentCategory = 'M'  --> Invoice      
or    Level3DocumentCategory = '5'  --> Intercompany Invoice 
or    Level3DocumentCategory = 'O'  --> Credit Memo
or    Level3DocumentCategory = '6'  --> Intercompany Credit Memo
or    Level3DocumentCategory = 'P'  --> Debit Memo                                                                             
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENT",
"P_SLSORDPROCFLOW30"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/