P_SlsOrdProcFlow31

DDL: P_SLSORDPROCFLOW31 SQL: PSLSORDPROCF31 Type: view CONSUMPTION Package: ODATA_SD_SO_PROCESSFLOW

Sales Order Process Flow: Level +3 Accounting

P_SlsOrdProcFlow31 is a Consumption CDS View that provides data about "Sales Order Process Flow: Level +3 Accounting" in SAP S/4HANA. It reads from 1 data source (I_AccountingDocument) and exposes 10 fields with key fields Level2Document, AccountingDocument, SalesOrder. Part of development package ODATA_SD_SO_PROCESSFLOW.

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 PSLSORDPROCF31 view
AbapCatalog.preserveKey true view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY Level2Document Level2Document
KEY AccountingDocument I_AccountingDocument AccountingDocument
KEY SalesOrder SalesOrder
SalesOrderType SalesOrderType
CompanyCode I_AccountingDocument CompanyCode
FiscalYear I_AccountingDocument FiscalYear
Level2DocumentCategory Level2DocumentCategory
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: 'PSLSORDPROCF31'
@AbapCatalog.preserveKey:true 

define view P_SlsOrdProcFlow31
  as select distinct from P_SlsOrdProcFlow20 as Level2
  inner join
  I_AccountingDocument as AccountingDocument
  on   Level2.Level2Document                    = AccountingDocument.OriginalReferenceDocument
  and  AccountingDocument.ReferenceDocumentType = 'VBRK'    
  and  LedgerGroup                              = ''
{
      //Key

  key Level2Document,
  key AccountingDocument.AccountingDocument,
  
       //SalesOrder

  key SalesOrder,
      SalesOrderType,
   
      //AccountingDocument additional keys

      AccountingDocument.CompanyCode,
      AccountingDocument.FiscalYear,

      //Category

      Level2DocumentCategory,

      //Organization

      SalesOrganization,
      DistributionChannel,
      OrganizationDivision

}
where Level2DocumentCategory = 'M'  --> Invoice      
or    Level2DocumentCategory = '5'  --> Intercompany Invoice 
or    Level2DocumentCategory = 'O'  --> Credit Memo
or    Level2DocumentCategory = '6'  --> Intercompany Credit Memo
or    Level2DocumentCategory = 'P'  --> Debit Memo