P_DebitMemoReqProcFlowM1

DDL: P_DEBITMEMOREQPROCFLOWM1 SQL: PDMRPROCFM1 Type: view CONSUMPTION

P_DebitMemoReqProcFlowM1 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_SDDocumentProcessFlow) and exposes 7 fields with key fields LevelM1Document, DebitMemoRequest.

Data Sources (1)

SourceAliasJoin Type
I_SDDocumentProcessFlow LevelM1 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 PDMRPROCFM1 view
AbapCatalog.preserveKey true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY LevelM1Document PrecedingDocument
KEY DebitMemoRequest DebitMemoRequest
DebitMemoRequestType DebitMemoRequestType
SalesOrderCategory SalesOrderCategory
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: 'PDMRPROCFM1'
@AbapCatalog.preserveKey:true 

define view P_DebitMemoReqProcFlowM1
  as select distinct from P_DebitMemoReqProcFlow0   as Level0  --> Level 0
    inner join   I_SDDocumentProcessFlow    as LevelM1 --> Level Minus1
    on Level0.DebitMemoRequest              = LevelM1.SubsequentDocument
    and(  LevelM1.PrecedingDocumentCategory = 'C'  --> Order
    or    LevelM1.PrecedingDocumentCategory = 'M'  --> Invoice
    or    LevelM1.PrecedingDocumentCategory = 'G' --> Contract
    )
{
      //Key

  key PrecedingDocument                        as LevelM1Document,    
  key case 
    when PrecedingDocumentCategory = 'M' 
        then 'MREF'   --> allow assignmet to 'Reference' lane
    else 
      PrecedingDocumentCategory
    end as LevelM1DocumentCategory,   
    
      //SalesOrder

  key DebitMemoRequest,
      DebitMemoRequestType,

      //Category

      SalesOrderCategory,

      //Organization

      SalesOrganization,
      DistributionChannel,
      OrganizationDivision

}
              
where Level0.SalesOrderCategory  = 'L'    --> Debit Memo Request  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SDDOCUMENTPROCESSFLOW",
"P_DEBITMEMOREQPROCFLOW0"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/