P_CreditMemoReqProcFlowM2

DDL: P_CREDITMEMOREQPROCFLOWM2 SQL: PCMRPROCFM2 Type: view CONSUMPTION

P_CreditMemoReqProcFlowM2 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_SDDocumentProcessFlow) and exposes 10 fields with key fields LevelM2Document, LevelM1Document, LevelM1DocumentItem, LevelM1DocumentCategory, CreditMemoRequest.

Data Sources (1)

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

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY LevelM2Document PrecedingDocument
KEY LevelM1Document LevelM1Document
KEY LevelM1DocumentItem LevelM1DocumentItem
KEY LevelM1DocumentCategory LevelM1DocumentCategory
KEY CreditMemoRequest CreditMemoRequest
CreditMemoRequestType CreditMemoRequestType
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: 'PCMRPROCFM2'
@AbapCatalog.preserveKey:true 

define view P_CreditMemoReqProcFlowM2
  as select distinct from P_CreditMemoReqProcFlowM1   as LevelM1  --> Level 0
    inner join   I_SDDocumentProcessFlow              as LevelM2 --> Level Minus1
    on  LevelM1.LevelM1Document        = LevelM2.SubsequentDocument
    and LevelM1.LevelM1DocumentItem    = LevelM2.SubsequentDocumentItem
    and LevelM2.SubsequentDocumentCategory = 'H'  --> Returns
{
      //Key

  key PrecedingDocument                        as LevelM2Document,    
  key case 
    when PrecedingDocumentCategory = 'M' 
        then 'MREF'   --> allow assignmet to 'Reference' lane
    when PrecedingDocumentCategory = 'C' 
        then 'CREF'   --> allow assignmet to 'Reference' lane        
    else 
      PrecedingDocumentCategory
    end as LevelM2DocumentCategory,   
    
  key LevelM1Document,
  key LevelM1DocumentItem,   
  key LevelM1DocumentCategory,  
    
  //Credit Memo 

  key CreditMemoRequest,
      CreditMemoRequestType,

      //Category

      SalesOrderCategory,

      //Organization

      SalesOrganization,
      DistributionChannel,
      OrganizationDivision
}
              
  
  
  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SDDOCUMENTPROCESSFLOW",
"P_CREDITMEMOREQPROCFLOWM1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/