P_EntProjProfnlSrvcRblsInTC

DDL: P_ENTPROJPROFNLSRVCRBLSINTC Type: view_entity COMPOSITE Package: ODATA_PPM_PRO_CTRL_PROFNL_SRVC

Billg Doc Receivables in TransactionCrcy

P_EntProjProfnlSrvcRblsInTC is a Composite CDS View that provides data about "Billg Doc Receivables in TransactionCrcy" in SAP S/4HANA. It reads from 4 data sources (I_BillingDocument, I_BillingDocumentItem, I_ReceivablesPayablesItem, I_EnterpriseProjectElement) and exposes 8 fields with key fields ProjectUUID, BillingDocument, BillingDocumentItem. Part of development package ODATA_PPM_PRO_CTRL_PROFNL_SRVC.

Data Sources (4)

SourceAliasJoin Type
I_BillingDocument BillingDocument inner
I_BillingDocumentItem BillingDocumentItem inner
I_ReceivablesPayablesItem Payables inner
I_EnterpriseProjectElement ProjectElement inner

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Billg Doc Receivables in TransactionCrcy view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY ProjectUUID Project ProjectUUID
KEY BillingDocument I_BillingDocumentItem BillingDocument
KEY BillingDocumentItem I_BillingDocumentItem BillingDocumentItem
Project Project Project
ProjectCurrency Project Currency
PricingDate I_BillingDocumentItem PricingDate
TransactionCurrency I_BillingDocumentItem TransactionCurrency
NetAmountendasReceivables
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Billg Doc Receivables in TransactionCrcy'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #C,
  sizeCategory: #XL,
  dataClass: #TRANSACTIONAL
}
@VDM.private: true
@VDM.viewType:  #COMPOSITE

define view entity P_EntProjProfnlSrvcRblsInTC
  as select distinct from I_EnterpriseProject        as Project

    inner join            I_EnterpriseProjectElement as ProjectElement      on ProjectElement.ProjectUUID = Project.ProjectUUID

    inner join            I_BillingDocumentItem      as BillingDocumentItem on  BillingDocumentItem.SalesDocument     = ProjectElement.LeadingSalesOrder
                                                                            and BillingDocumentItem.SalesDocumentItem = ProjectElement.LeadingSalesOrderItem

    inner join            I_BillingDocument          as BillingDocument     on BillingDocument.BillingDocument = BillingDocumentItem.BillingDocument

    inner join            I_ReceivablesPayablesItem  as Payables            on Payables.BillingDocument = BillingDocument.BillingDocument
{
  key Project.ProjectUUID                     as ProjectUUID,
  key BillingDocumentItem.BillingDocument     as BillingDocument,
  key BillingDocumentItem.BillingDocumentItem as BillingDocumentItem,
      
      Project.Project                         as Project,
      
      Project.Currency                        as ProjectCurrency,
      
      BillingDocumentItem.PricingDate         as PricingDate,
      
      BillingDocumentItem.TransactionCurrency as TransactionCurrency,
                  
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      case when BillingDocumentItem.ReturnItemProcessingType = 'X'
             or BillingDocumentItem.ReturnItemProcessingType = 'B'
           then BillingDocumentItem.NetAmount * -1
           else BillingDocumentItem.NetAmount
      end                                     as Receivables

}
where
       Project.ProjectProfileCode                 =  'P001'
  and  Project.ProjectCategory                    =  '7'
  and(
       Project.ProcessingStatus                   =  '10' // In Execution

    or Project.ProcessingStatus                   =  '40' // Completed

    or Project.ProcessingStatus                   =  '42' // Closed

  )  
  and  ProjectElement.LeadingSalesOrderItem       is not initial
  and  BillingDocument.BillingDocumentIsCancelled =  ''
  and  BillingDocument.CancelledBillingDocument   =  ''
  and  BillingDocumentItem.Material               <> 'A001'
  and  BillingDocumentItem.Material               <> 'A002'
  and  Payables.ClearingAccountingDocument        =  ''