P_SlsQtanProcFlowM1

DDL: P_SLSQTANPROCFLOWM1 SQL: PSLSQTANPROCFM1 Type: view CONSUMPTION Package: ODATA_SD_QUT_PROCESSFLOW

Sales Quotation Process Flow: Level -1 Sales & Distribution

P_SlsQtanProcFlowM1 is a Consumption CDS View that provides data about "Sales Quotation Process Flow: Level -1 Sales & Distribution" in SAP S/4HANA. It reads from 2 data sources (P_SlsQtanProcFlow0, I_SDDocumentProcessFlow) and exposes 7 fields with key fields LevelM1Document, SalesQuotation. Part of development package ODATA_SD_QUT_PROCESSFLOW.

Data Sources (2)

SourceAliasJoin Type
P_SlsQtanProcFlow0 Level0 from
I_SDDocumentProcessFlow LevelM1 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 PSLSQTANPROCFM1 view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY LevelM1Document PrecedingDocument
KEY SalesQuotation P_SlsQtanProcFlow0 SalesQuotation
SalesQuotationType P_SlsQtanProcFlow0 SalesQuotationType
SalesQuotationCategory P_SlsQtanProcFlow0 SalesQuotationCategory
SalesOrganization P_SlsQtanProcFlow0 SalesOrganization
DistributionChannel P_SlsQtanProcFlow0 DistributionChannel
OrganizationDivision P_SlsQtanProcFlow0 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: 'PSLSQTANPROCFM1'
define view P_SlsQtanProcFlowM1
  as select from P_SlsQtanProcFlow0                       as Level0
    
    inner join I_SDDocumentProcessFlow                    as LevelM1
      on Level0.SalesQuotation = LevelM1.SubsequentDocument
        and( LevelM1.PrecedingDocumentCategory = 'A'  --> Inquiry
          or LevelM1.PrecedingDocumentCategory = 'B'  --> Quotation
          or LevelM1.PrecedingDocumentCategory = 'C'  --> Order
          or LevelM1.PrecedingDocumentCategory = 'I'  --> Order w/o Charge
        )

{
      //Key

  key PrecedingDocument                   as LevelM1Document,
  key case 
    when PrecedingDocumentCategory = 'C' 
      then 'CREF'   --> allow assignmet to 'Reference' lane
    when PrecedingDocumentCategory = 'B' 
      then 'BREF'   --> allow assignmet to 'Reference' lane
    when PrecedingDocumentCategory = 'I' 
      then 'IREF'   --> allow assignmet to 'Reference' lane            
    else 
      PrecedingDocumentCategory
    end                                   as LevelM1DocumentCategory,   
  
      //SalesQuotation

  key Level0.SalesQuotation,
      Level0.SalesQuotationType,
      Level0.SalesQuotationCategory,

      //Organization

      Level0.SalesOrganization,
      Level0.DistributionChannel,
      Level0.OrganizationDivision
}