P_SlsOrdFlfmtProcessFlow4

DDL: P_SLSORDFLFMTPROCESSFLOW4 SQL: PSOFProcFlow4 Type: view COMPOSITE

P_SlsOrdFlfmtProcessFlow4 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_SlsOrdFlfmtProcessFlow3, I_SDDocumentProcessFlow) and exposes 13 fields with key fields Level4Document, Level4DocumentItem, Level3Document, Level3DocumentItem, SalesOrder.

Data Sources (2)

SourceAliasJoin Type
P_SlsOrdFlfmtProcessFlow3 Level3 from
I_SDDocumentProcessFlow Level4 inner

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PSOFProcFlow4 view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY Level4Document I_SDDocumentProcessFlow SubsequentDocument
KEY Level4DocumentItem I_SDDocumentProcessFlow SubsequentDocumentItem
KEY Level3Document Level3Document
KEY Level3DocumentItem Level3DocumentItem
KEY SalesOrder SalesOrder
SalesOrderType SalesOrderType
Level4DocumentCategory I_SDDocumentProcessFlow SubsequentDocumentCategory
Level3DocumentCategory Level3DocumentCategory
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
OrganizationDivision OrganizationDivision
SoldToParty SoldToParty
SoldToPartyName SoldToPartyName
@ClientHandling.algorithm: #SESSION_VARIABLE 
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #S
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PSOFProcFlow4'

define view P_SlsOrdFlfmtProcessFlow4
as select from
P_SlsOrdFlfmtProcessFlow3 as Level3
inner join
I_SDDocumentProcessFlow as Level4
on 
     Level3.Level2Document = Level4.PrecedingDocument
and  Level3.Level2DocumentCategory = Level4.PrecedingDocument
and  Level3.Level2DocumentItem = Level4.PrecedingDocumentItem
and (
       Level4.SubsequentDocumentCategory = 'M' or    --> Invoice
       Level4.SubsequentDocumentCategory= 'O' or    --> Credit Memo
       Level4.SubsequentDocumentCategory = 'P'       --> Debit Memo
      )  
  
{
   //Key

   key Level4.SubsequentDocument as Level4Document,
   key Level4.SubsequentDocumentItem as Level4DocumentItem,
   key Level3Document,
   key Level3DocumentItem,
   
   //SalesOrder

   key SalesOrder,
   SalesOrderType,
   
   //Category

   Level4.SubsequentDocumentCategory as Level4DocumentCategory,
   Level3DocumentCategory,
         
   //Organization

   SalesOrganization,
   DistributionChannel,
   OrganizationDivision,
   
   //Partner 

   SoldToParty,
   SoldToPartyName          
 };