P_SlsOrdProcFlow25

DDL: P_SLSORDPROCFLOW25 SQL: PSLSORDPROCF25 Type: view CONSUMPTION Package: ODATA_SD_SO_PROCESSFLOW

Sales Order Process Flow: Level +2 Intercompany Invoice

P_SlsOrdProcFlow25 is a Consumption CDS View that provides data about "Sales Order Process Flow: Level +2 Intercompany Invoice" in SAP S/4HANA. It reads from 2 data sources (P_SlsOrdProcFlow15, I_SDDocumentProcessFlow) and exposes 11 fields with key fields Level2Document, Level2DocumentItem, Level1Document, Level1DocumentItem, SalesOrder. Part of development package ODATA_SD_SO_PROCESSFLOW.

Data Sources (2)

SourceAliasJoin Type
P_SlsOrdProcFlow15 Level1 from
I_SDDocumentProcessFlow Level2 inner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PSLSORDPROCF25 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Sales Order Process Flow: Level +2 Intercompany Invoice view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (11)

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 P_SlsOrdProcFlow15 SalesOrganization
DistributionChannel P_SlsOrdProcFlow15 DistributionChannel
OrganizationDivision P_SlsOrdProcFlow15 OrganizationDivision
@AbapCatalog.sqlViewName: 'PSLSORDPROCF25'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Sales Order Process Flow: Level +2 Intercompany Invoice'
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@VDM.private: true
@VDM.viewType: #CONSUMPTION

define view P_SlsOrdProcFlow25

  as select from           P_SlsOrdProcFlow15      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    = 'M' --> Invoice
                                                                         or Level2.SubsequentDocumentCategory = '5' --> Intercompany Invoice
                                                                         or Level2.SubsequentDocumentCategory = '6' --> Intercompany Credit Memo
                                                                       )

    left outer to one join I_SalesDocumentBasic    as SalesDocument   on Level2.SubsequentDocument = SalesDocument.SalesDocument

    left outer to one join I_BillingDocument       as BillingDocument on Level2.SubsequentDocument = BillingDocument.BillingDocument

{
      //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

      Level1.SalesOrganization          as SalesOrganization,
      Level1.DistributionChannel        as DistributionChannel,
      Level1.OrganizationDivision       as OrganizationDivision

}
where
  Level1DocumentCategory = 'J'