P_SOFAProcFlow31

DDL: P_SOFAPROCFLOW31 SQL: PSOFAPROCF31 Type: view COMPOSITE

P_SOFAProcFlow31 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_AccountingDocument) and exposes 21 fields with key fields SalesDocument, SDDocumentCategory, Level2Document, Level2DocumentCategory, AccountingDocument.

Data Sources (1)

SourceAliasJoin Type
I_AccountingDocument AccountingDocument 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
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PSOFAPROCF31 view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument SalesDocument
KEY SDDocumentCategory SDDocumentCategory
KEY Level2Document Level2Document
KEY Level2DocumentCategory Level2DocumentCategory
KEY AccountingDocument I_AccountingDocument AccountingDocument
SalesDocumentType SalesDocumentType
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
OrganizationDivision OrganizationDivision
OverallSDProcessStatus OverallSDProcessStatus
OverallTotalDeliveryStatus OverallTotalDeliveryStatus
OverallOrdReltdBillgStatus OverallOrdReltdBillgStatus
RequestedDeliveryDate RequestedDeliveryDate
OverallSDProcessStatus
SalesDocumentDate SalesDocumentDate
SalesGroup SalesGroup
SalesOffice SalesOffice
SoldToParty SoldToParty
PurchaseOrderByCustomer PurchaseOrderByCustomer
CompanyCode I_AccountingDocument CompanyCode
FiscalYear I_AccountingDocument FiscalYear
@ClientHandling.algorithm: #SESSION_VARIABLE 
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL

@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'PSOFAPROCF31'

define view P_SOFAProcFlow31 
  as select distinct from P_SOFAProcFlow20  as Level2
  inner join
  I_AccountingDocument as AccountingDocument
  on   Level2.Level2Document                    = AccountingDocument.OriginalReferenceDocument
  and  AccountingDocument.ReferenceDocumentType = 'VBRK'    
  and  LedgerGroup                              = ''
{
   key SalesDocument,
   key SDDocumentCategory,

   key Level2Document,
   key Level2DocumentCategory,
   key AccountingDocument.AccountingDocument,
   
   SalesDocumentType,
   
    //Organization

   SalesOrganization,
   DistributionChannel,
   OrganizationDivision,     
   
   OverallSDProcessStatus,
   OverallTotalDeliveryStatus,
   OverallOrdReltdBillgStatus,   
   
   //Misc

    RequestedDeliveryDate,
    --OverallSDProcessStatus,
    SalesDocumentDate,
    SalesGroup,
    SalesOffice,
    SoldToParty,
    PurchaseOrderByCustomer,  
     
   //AccountingDocument additional keys

   AccountingDocument.CompanyCode,
   AccountingDocument.FiscalYear


}
where ( Level2DocumentCategory = 'M'   --> Invoice  
  or    Level2DocumentCategory = 'P' ) --> Debit Memo       
  and   Level2.BillingDocumentIsCancelled   != 'X' -- Don't consider Acc docs for cancelled inv                                                     
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENT",
"P_SOFAPROCFLOW20"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/