P_BillingDocumentsForProjects

DDL: P_BILLINGDOCUMENTSFORPROJECTS Type: view COMPOSITE Package: CPD_CDS

Billing Receivables - Billing generated in Projects

P_BillingDocumentsForProjects is a Composite CDS View that provides data about "Billing Receivables - Billing generated in Projects" in SAP S/4HANA. It reads from 2 data sources (I_BillingDocumentItem, I_WBSElementBasicData) and exposes 18 fields. Part of development package CPD_CDS.

Data Sources (2)

SourceAliasJoin Type
I_BillingDocumentItem A from
I_WBSElementBasicData B inner

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName PSDBILLFORPROJ view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.lifecycle.contract.type #NONE view
VDM.viewType #COMPOSITE view

Fields (18)

KeyFieldSource TableSource FieldDescription
BillingDocument I_BillingDocumentItem BillingDocument
BillingDocumentItem I_BillingDocumentItem BillingDocumentItem
SalesDocument I_BillingDocumentItem SalesDocument
SalesDocumentItem I_BillingDocumentItem SalesDocumentItem
SalesSDDocumentCategory I_BillingDocumentItem SalesSDDocumentCategory
BillingDocumentDate
SDDocumentCategory
BillingDocumentIsCancelled
DebitMemoRequest I_BillingDocumentItem ReferenceSDDocument
DebitMemoRequestItem I_BillingDocumentItem ReferenceSDDocumentItem
DebitMemoRequestItemCategory I_BillingDocumentItem ReferenceSDDocumentCategory
BillingPlan I_BillingDocumentItem BillingPlan
NetAmount I_BillingDocumentItem NetAmount
TransactionCurrencyendasProjectCurrency
CurrentDate
Project
ProjectProfileCode
WBSElement I_WBSElementBasicData WBSElement
@AbapCatalog: {
  sqlViewName: 'PSDBILLFORPROJ',
  preserveKey: true,
  compiler.compareFilter: true
}
@AccessControl: {
  authorizationCheck: #NOT_REQUIRED,
  personalData.blocking: #NOT_REQUIRED
}
@ClientHandling.algorithm: #SESSION_VARIABLE
//@EndUserText.label: 'Billing Receivables - Billing generated in Projects'

@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType: {
  serviceQuality: #B,
  sizeCategory: #L,
  dataClass: #MIXED
}
@VDM: {
  private: true,
  lifecycle.contract.type: #NONE,
  viewType: #COMPOSITE
}
define view P_BillingDocumentsForProjects as select from I_BillingDocumentItem as A
      inner join I_WBSElementBasicData as B
      on A.WBSElement = B.WBSElementInternalID
      left outer to one join I_OperationalAcctgDocItem as C on A.BillingDocument = C.BillingDocument {

A.BillingDocument,
A.BillingDocumentItem,
A.SalesDocument,
A.SalesDocumentItem,
A.SalesSDDocumentCategory,
A._BillingDocument.BillingDocumentDate,
A._BillingDocument.SDDocumentCategory,
A._BillingDocument.BillingDocumentIsCancelled,
A.ReferenceSDDocument as DebitMemoRequest,
A.ReferenceSDDocumentItem as DebitMemoRequestItem,
A.ReferenceSDDocumentCategory as DebitMemoRequestItemCategory,
A.BillingPlan,

A.NetAmount,

case when A.TransactionCurrency = '' then B._Project.ProjectCurrency
else A.TransactionCurrency end as ProjectCurrency,

$session.system_date as CurrentDate,
case when C.ClearingAccountingDocument is null then ''
else C.ClearingAccountingDocument end as ClearingAccountingDocument,

B._Project.Project,
B._Project.ProjectProfileCode,
B.WBSElement
}   where A._BillingDocument.SDDocumentCategory = 'M'
    and A._BillingDocument.BillingDocumentIsCancelled = ''
//    and B._Project.ProjectProfileCode = 'P001'