P_SalesSchedgAgrmtProcFlow0

DDL: P_SALESSCHEDGAGRMTPROCFLOW0 SQL: PSSAPROCFLOW0 Type: view CONSUMPTION

P_SalesSchedgAgrmtProcFlow0 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_SalesDocumentBasic) and exposes 9 fields with key fields Level1Document, Level1DocumentItem, SalesSchedulingAgreement.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocumentBasic SalesDocument from

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
VDM.private true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PSSAPROCFLOW0 view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY Level1Document
KEY Level1DocumentItem
KEY SalesSchedulingAgreement
SalesSchedgAgrmtType
SDDocumentCategory I_SalesDocumentBasic SDDocumentCategory
SalesOrganization I_SalesDocumentBasic SalesOrganization
DistributionChannel I_SalesDocumentBasic DistributionChannel
OrganizationDivision I_SalesDocumentBasic OrganizationDivision
ValidOnDate
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #S

@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PSSAPROCFLOW0'

//Sales Schedule Agreements (normal + consignment)

define view P_SalesSchedgAgrmtProcFlow0
  as select from I_SalesDocumentBasic as SalesDocument
{
       //Key

  key  cast( ' ' as vbeln_von)                                                                                                          as  Level1Document,
  key  cast( ' ' as posnr_von)                                                                                                          as  Level1DocumentItem,

       //SalesOrder

  key  cast(SalesDocument     as vdm_sales_schedg_agrmt      preserving type)                                                           as  SalesSchedulingAgreement,
       cast(SalesDocumentType as vdm_sales_schedg_agrmt_type preserving type )                                                          as  SalesSchedgAgrmtType,

       //Category

       SalesDocument.SDDocumentCategory                                                                                                 as  SDDocumentCategory,
       //Organization

       SalesDocument.SalesOrganization,
       SalesDocument.DistributionChannel,
       SalesDocument.OrganizationDivision,
       
      //Because one scheduling agreement will have too many delivery document

      //To avoid performance issue, only get recent 30 days document

      cast (dats_add_days(cast($session.system_date as dats), -30, 'FAIL') as dats)                                                    as  ValidOnDate
}
where
  (SalesDocument.SDDocumentCategory = 'E' or SalesDocument.SDDocumentCategory = 'F')
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SALESDOCUMENTBASIC"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/