R_PROJECTBILLINGELEMENTTP
Details of Billing Element
R_PROJECTBILLINGELEMENTTP is a CDS View in S/4HANA. Details of Billing Element. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_ProjectBillingElementTP | view_entity | projection | CONSUMPTION | Details of Billing Element |
| C_ProjectBillingElementTP_2 | view_entity | projection | CONSUMPTION | Details of Project Billing Element |
//@AbapCatalog.sqlViewName: 'RPRJBLGELMTP'
//@ClientHandling.algorithm: #SESSION_VARIABLE
//@ClientHandling.type: #CLIENT_DEPENDENT
@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
//@AbapCatalog.compiler.compareFilter: true
//@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: ['_PrjBlgElmPrepaymentAmount', '_PrjBlgElmOverduePrepayment' ]
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ObjectModel.usageType: {
sizeCategory: #XL,
dataClass: #TRANSACTIONAL,
serviceQuality: #C
}
@ObjectModel.sapObjectNodeType.name: 'ProjectBillingElement'
@Consumption.dbHints: ['USE_HEX_PLAN','NO_SUBPLAN_SHARING']
@EndUserText.label: 'Details of Billing Element'
define root view entity R_ProjectBillingElementTP
as select from I_ProjectBillingElement as ProjectBillingElement
association [1..1] to I_EnterpriseProjectElement as _EnterpriseProjectElement on $projection.ProjectElementUUID = _EnterpriseProjectElement.ProjectElementUUID
association [1..1] to I_EnterpriseProject as _EnterpriseProject on $projection.ProjectUUID = _EnterpriseProject.ProjectUUID
association [1..1] to I_SalesDocumentItem as _SalesOrderItem on $projection.SalesDocument = _SalesOrderItem.SalesDocument
and $projection.SalesDocumentItem = _SalesOrderItem.SalesDocumentItem
association [1..1] to I_SalesDocument as _SalesOrder on $projection.SalesDocument = _SalesOrder.SalesDocument
association [0..1] to I_SDBillingPlan as _SDBillingPlan on $projection.BillingPlan = _SDBillingPlan.BillingPlan
association [0..1] to I_MyProjectBillingElements as _MyProjectBillingElements on $projection.ProjectBillingElementUUID = _MyProjectBillingElements.ProjectBillingElementUUID
--association [1..1] to P_ProjBillgElmntSalesDets2 as _ProjBillgElmntSalesDets on $projection.ProjectBillingElementUUID = _ProjBillgElmntSalesDets.ProjectBillingElementUUID
association [1..1] to P_ProjectBillingElmntDueDate3 as _DueBillingDate on $projection.ProjectBillingElementUUID = _DueBillingDate.ProjectBillingElementUUID
association [0..1] to I_TmpProjectBillingRequest as _TmpProjectBillingRequest on $projection.ProjectBillingElementUUID = _TmpProjectBillingRequest.ProjectBillingElementUUID
association [0..1] to I_PrjBlgElmOverduePrepayment as _PrjBlgElmOverduePrepayment on $projection.ProjectBillingElementUUID = _PrjBlgElmOverduePrepayment.ProjectBillingElementUUID
association [0..1] to I_PrjBlgElmPrepaymentAmount as _PrjBlgElmPrepaymentAmount on $projection.ProjectBillingElementUUID = _PrjBlgElmPrepaymentAmount.ProjectBillingElementUUID
association [0..1] to I_PrjBlgElmBllbleRevnAmt as _PrjBlgElmBllbleRevnAmt on $projection.ProjectBillingElementUUID = _PrjBlgElmBllbleRevnAmt.ProjectBillingElementUUID
-- POC Sort / Filter on ToBill amount
association [0..1] to I_MyPrjBillgElmntBllbleRevnAmt as _MyPrjBillgElmntBllbleRevnAmt on $projection.ProjectBillingElementUUID = _MyPrjBillgElmntBllbleRevnAmt.ProjectBillingElementUUID
-- Moved to C_ProjectBillingElementTP
// association [0..*] to I_ProjectBillingDocDetails as _ProjectBillingDocDetails on $projection.BillingWBSElementInternalID = _ProjectBillingDocDetails.WBSElementInternalID
-- can be moved to C_
association [0..*] to R_ProjectBillingRequestItemTP as _ProjectBillingRequestItemTP on $projection.ProjectBillingElementUUID = _ProjectBillingRequestItemTP.ProjectBillingElementUUID
association [1..1] to I_ProfitCenterText as _ProfitCenterName on $projection.WBSElementProfitCenter = _ProfitCenterName.ProfitCenter
and $projection.ControllingArea = _ProfitCenterName.ControllingArea
and _ProfitCenterName.ValidityEndDate >= $session.system_date
and _ProfitCenterName.ValidityStartDate <= $session.system_date
and _ProfitCenterName.Language = $session.system_language
association [1..1] to I_Customer as _Customer on $projection.Customer = _Customer.Customer
association [1..1] to I_Customer as _ShipToParty on $projection.ShipToParty = _ShipToParty.Customer
association [1..1] to I_Customer as _BillToParty on $projection.BillToParty = _BillToParty.Customer
association [1..1] to I_Customer as _PayerParty on $projection.PayerParty = _PayerParty.Customer
-- Moved from I_ to C_
//association [0..*] to I_PrjBlgElmEntrForPrepayment as _PrjBlgElmEntrForPrepayment on $projection.ProjectBillingElementUUID = _PrjBlgElmEntrForPrepayment.ProjectBillingElementUUID
association [0..1] to I_EngagementProjectSrvcOrgText as _ServiceOrganizationText on _ServiceOrganizationText.EngagementProjectServiceOrg = $projection.EngagementProjectServiceOrg
and _ServiceOrganizationText.Language = $session.system_language
//Extensibility
association [0..1] to E_ProjectBillingElement as _Extension on $projection.ProjectBillingElementUUID = _Extension.ProjectBillingElementUUID
composition [0..*] of R_ProjectBillingElementEntryTP as _ProjectBillingElementEntry
composition [0..1] of R_ProjBillgElmObjectLinkTP as _ProjBillgElmObjectLink
{
key ProjectBillingElement.ProjectBillingElementUUID,
ProjectBillingElement.BillingWBSElementInternalID,
ProjectBillingElement.DocumentCurrency,
ProjectBillingElement.BilledRevenueAmtInDocCrcy,
ProjectBillingElement.WrittenOffRevenueAmtInDocCrcy,
ProjectBillingElement.ProjBillingProfile as ProjBillingProfile,
ProjectBillingElement.ProjectBillingCategory as ProjectBillingCategory,
// Admin Fields data
@Semantics.user.createdBy: true
ProjectBillingElement.ProjBillgElmntCreatedByUser,
@Semantics.systemDateTime.createdAt: true
ProjectBillingElement.ProjBillgElmntCreatedAtDteTme,
@Semantics.user.lastChangedBy: true
ProjectBillingElement.ProjBillgElmntLastChgdByUser,
@Semantics.systemDateTime.lastChangedAt: true
ProjectBillingElement.ProjBillgElmntLastChgdAtDteTme,
// Introduced in 2408, with SDM for performance improvements
ProjectBillingElement.SalesDocument as SalesDocument,
ProjectBillingElement.SalesDocumentItem as SalesDocumentItem,
ProjectBillingElement.BillingPlan as ProjBillgSlsOrdBillingPlan,
// End
ProjectBillingElement.ProjectUUID as ProjectUUID,
ProjectBillingElement.ProjectElementUUID as ProjectElementUUID,
cast ( _EnterpriseProjectElement.ProjectInternalID as ps_s4_proj_pspnr preserving type ) as ProjectInternalID,
// The below field is used in I_ProfitCenterText and hence cannot be moved up
_EnterpriseProjectElement.ProfitCenter as WBSElementProfitCenter,
cast( _EnterpriseProjectElement.ProjectElement as ps_posid_edit preserving type ) as WBSElementExternalID,
_EnterpriseProject.ControllingArea as ControllingArea,
_EnterpriseProject.Project as Project,
_EnterpriseProject.ProfitCenter,
_EnterpriseProject.ProcessingStatus,
_EnterpriseProject.ProjectStartDate,
_EnterpriseProject.ProjectEndDate,
-- { adding this due to bad performance on C-view
_EnterpriseProject.ProjectDescription as ProjectDescription,
cast (_EnterpriseProject.EnterpriseProjectServiceOrg as crmt_service_org_resp ) as ServiceOrganizationUnit,
_EnterpriseProject.ResponsibleCostCenter as ResponsibleCostCenter,
-- }
_EnterpriseProject.EnterpriseProjectServiceOrg as EngagementProjectServiceOrg,
_TmpProjectBillingRequest.ProjectBillingRequest,
_TmpProjectBillingRequest.ProjectBillingRequestUUID,
ProjectBillingElement.BillingPlan,
ProjectBillingElement.SalesDocument as SalesOrder, // 2208 | Partner Function changes
ProjectBillingElement.SalesDocumentItem as SalesOrderItem, // 2208 | Partner Function changes
_SalesOrderItem.TransactionCurrency as TransactionCurrency,
-- Is needed is C-view for on-condition in association to the Customer contact card
_SalesOrderItem.SoldToParty as Customer,
_SalesOrderItem.ShipToParty as ShipToParty,
_SalesOrderItem.BillToParty as BillToParty,
_SalesOrderItem.PayerParty as PayerParty,
-- used in C-view in where clause
_SalesOrderItem.SDDocumentRejectionStatus as SDDocumentRejectionStatus,
_SalesOrderItem.BillingBlockStatus,
_SalesOrderItem.ItemBillingBlockReason as BillingBlockReason,
_SalesOrderItem.SalesDocumentRjcnReason as SalesDocumentRjcnReason,
// _ProjBillgElmntSalesDets._SalesOrder.TotalBlockStatus,
_SalesOrder.OverallBillingBlockStatus,
_SalesOrder.HeaderBillingBlockReason as HeaderBillingBlockReason,
@Semantics.amount.currencyCode: 'DocumentCurrency'
_SalesOrderItem.CappedNetAmount as CappedNetAmount,
//POC SortToBill
_DueBillingDate.DueBillingDate,
_MyProjectBillingElements.UserID,
@Semantics.amount.currencyCode: 'DocumentCurrency'
_PrjBlgElmBllbleRevnAmt.BillableRevenueAmtInDocCrcy,
//POC SortToBill
_PrjBlgElmOverduePrepayment.PrjBlgElmPlndPrepaymentIsOvrd,
@Semantics.amount.currencyCode: 'DocumentCurrency'
_PrjBlgElmPrepaymentAmount.PlndPrepaymentAmtInProjCrcy,
//Associations
-- 2408 to C_ProjectBillingElementTP - UI Adaptation changes
//_ProjectBillingDocDetails,
_ServiceOrganizationText,
_ProfitCenterName,
-- 2408 to C_ProjectBillingElementTP - UI Adaptation changes
//_PrjBlgElmEntrForPrepayment,
_SDBillingPlan as _SalesDocItemBillPlan,
_SalesOrderItem,
_SalesOrder,
_ProjectBillingElementEntry,
ProjectBillingElement._WBSElement,
_ProjectBillingRequestItemTP,
_Customer,
_ShipToParty,
_PayerParty,
_BillToParty,
_EnterpriseProjectElement,
-- POC Sort / Filter on ToBill amount
_MyPrjBillgElmntBllbleRevnAmt,
_PrjBlgElmPrepaymentAmount,
_PrjBlgElmOverduePrepayment,
_ProjBillgElmObjectLink
//ProjectBillingElement._ProjBillgElmObjectLink as _ProjBillgElmObjLink
//ProjectBillingElement.SalesDocument,
//ProjectBillingElement._SalesDocument
}