P_SlsOrdFlfmtProcessFlow2

DDL: P_SLSORDFLFMTPROCESSFLOW2 SQL: PSOFProcFlow2 Type: view COMPOSITE

P_SlsOrdFlfmtProcessFlow2 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_SlsOrdFlfmtProcessFlow1, I_SDDocumentProcessFlow) and exposes 13 fields with key fields Level2Document, Level2DocumentItem, Level1Document, Level1DocumentItem, SalesOrder.

Data Sources (2)

SourceAliasJoin Type
P_SlsOrdFlfmtProcessFlow1 Level1 from
I_SDDocumentProcessFlow Level2 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 PSOFProcFlow2 view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY Level2Document I_SDDocumentProcessFlow SubsequentDocument
KEY Level2DocumentItem I_SDDocumentProcessFlow SubsequentDocumentItem
KEY Level1Document Level1Document
KEY Level1DocumentItem Level1DocumentItem
KEY SalesOrder SalesOrder
SalesOrderType SalesOrderType
Level2DocumentCategory I_SDDocumentProcessFlow SubsequentDocumentCategory
Level1DocumentCategory Level1DocumentCategory
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: 'PSOFProcFlow2'

define view P_SlsOrdFlfmtProcessFlow2
as select from
P_SlsOrdFlfmtProcessFlow1 as Level1
inner join
I_SDDocumentProcessFlow as Level2
on 
     Level1.Level1Document = Level2.PrecedingDocument
and  Level1.Level1DocumentCategory = Level2.PrecedingDocumentCategory
and  Level1.Level1DocumentItem = Level2.PrecedingDocumentItem
and (
       Level2.SubsequentDocumentCategory = 'J' or    --> Delivery
       Level2.SubsequentDocumentCategory = 'M' or    --> Invoice
       Level2.SubsequentDocumentCategory = 'O' or    --> Credit Memo
       Level2.SubsequentDocumentCategory = 'P'       --> Debit Memo
      )  
  
{
   //Key

   key Level2.SubsequentDocument as Level2Document,
   key Level2.SubsequentDocumentItem as Level2DocumentItem,
   key Level1Document,
   key Level1DocumentItem,
       
   //SalesOrder

   key SalesOrder,
   SalesOrderType,   
   
   //Category

   Level2.SubsequentDocumentCategory as Level2DocumentCategory,
   Level1DocumentCategory,
   
   //Organization

   SalesOrganization,
   DistributionChannel,
   OrganizationDivision,
   
   //Partner 

   SoldToParty,
   SoldToPartyName         
 };