P_CustRetProcFlow21

DDL: P_CUSTRETPROCFLOW21 SQL: PCUSTRETPROCF21 Type: view CONSUMPTION Package: ODATA_SD_CRET_PROCESSFLOW

Customer Return Process Flow: Level +2 Accounting

P_CustRetProcFlow21 is a Consumption CDS View that provides data about "Customer Return Process Flow: Level +2 Accounting" in SAP S/4HANA. It reads from 1 data source (I_AccountingDocument) and exposes 10 fields with key fields Level1Document, AccountingDocument, CustomerReturn. Part of development package ODATA_SD_CRET_PROCESSFLOW.

Data Sources (1)

SourceAliasJoin Type
I_AccountingDocument AccountingDoc inner

Annotations (8)

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 PCUSTRETPROCF21 view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY Level1Document Level1 Level1Document
KEY AccountingDocument I_AccountingDocument AccountingDocument
KEY CustomerReturn Level1 CustomerReturn
CompanyCode I_AccountingDocument CompanyCode
FiscalYear I_AccountingDocument FiscalYear
CustomerReturnType Level1 CustomerReturnType
Level1DocumentCategory Level1 Level1DocumentCategory
SalesOrganization Level1 SalesOrganization
DistributionChannel Level1 DistributionChannel
OrganizationDivision Level1 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: 'PCUSTRETPROCF21'

define view P_CustRetProcFlow21
as select distinct from P_CustRetProcFlow10 as Level1
  
inner join I_AccountingDocument             as AccountingDoc
  on Level1.Level1Document               = AccountingDoc.OriginalReferenceDocument
 and AccountingDoc.ReferenceDocumentType = 'VBRK'    
 and AccountingDoc.LedgerGroup           = ''
{
    //Key

    key Level1.Level1Document,
    key AccountingDoc.AccountingDocument,
    
    //Customer Return

    key Level1.CustomerReturn,
  
    //Accounting additional keys

    AccountingDoc.CompanyCode,
    AccountingDoc.FiscalYear,   
   
    //Category

    Level1.CustomerReturnType,
    Level1.Level1DocumentCategory,
    
    //Organization

    Level1.SalesOrganization,
    Level1.DistributionChannel,
    Level1.OrganizationDivision
}
where Level1.Level1DocumentCategory = 'M'  --> Customer Invoice  
   or Level1.Level1DocumentCategory = 'O'  --> Credit Memo 
   or Level1.Level1DocumentCategory = 'P'  --> Debit Memo