R_PROJECTBILLINGREQUESTITEMTP
Project Billing Request Item TP
R_PROJECTBILLINGREQUESTITEMTP is a CDS View in S/4HANA. Project Billing Request Item TP. 6 CDS views read from this table.
CDS Views using this table (6)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| A_ProjectBillingRequestItem | view_entity | projection | CONSUMPTION | Project Billing Request Item |
| C_ManageProjBillgRequestItemTP | view_entity | projection | CONSUMPTION | Manage Project Billing Request Items |
| C_ProjectBillingRequestItemTP | view_entity | projection | CONSUMPTION | Item Details of Project Billing Request |
| C_ProjectBillingRequestItmTP_2 | view_entity | projection | CONSUMPTION | Item Details of Project Billing Request |
| I_ProjectBillingReqItemTP_2 | view_entity | projection | TRANSACTIONAL | PBR Items Projection |
| I_ProjectBillingReqItemTP_3 | view_entity | projection | TRANSACTIONAL | Project Billing Request Item - TP |
@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type:#SAP_INTERNAL_API
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@EndUserText.label: 'Project Billing Request Item TP'
@ObjectModel.usageType: {
sizeCategory: #XL,
dataClass: #TRANSACTIONAL,
serviceQuality: #C
}
@ObjectModel: {
sapObjectNodeType:{
name: 'ProjectBillingRequestItem'
} }
//@Consumption.dbHints: [ 'CS_JOIN_REDUCTION_MULTICOLUMN_FIRST(\'ACDOCA.BELNR\')', 'NO_SUBPLAN_SHARING' ]
// 'NO_USE_HEX_PLAN' - hex is too bad with fplt selection - for now disable this engine
@Consumption.dbHints: [ 'NO_SUBPLAN_SHARING', 'NO_USE_HEX_PLAN' ]
define view entity R_ProjectBillingRequestItemTP
as select from I_ProjectBillingRequestItem as ProjectBillingRequestItem
left outer to one join R_PrjBlgElmEntrJrnlEntrLinkTP as _PrjBlgElmEntrJrnlEntrLinkTP on ProjectBillingRequestItem.ProjBillgElmntEntrItmUUID = _PrjBlgElmEntrJrnlEntrLinkTP.ProjBillgElmntEntrItmUUID
association [0..1] to I_WorkForcePersonMappings as _PersonWorkAgreement_1 on _PrjBlgElmEntrJrnlEntrLinkTP.PersonnelNumber = _PersonWorkAgreement_1.WorkforceAssignment
association [0..1] to R_ProjectBillingElementEntryTP as _ProjectBillingElementEntryTP on $projection.ProjBillgElmntEntrItmUUID = _ProjectBillingElementEntryTP.ProjBillgElmntEntrItmUUID
association to parent R_ProjectBillingRequestTP as _ProjectBillingRequestTP on $projection.ProjectBillingRequestUUID = _ProjectBillingRequestTP.ProjectBillingRequestUUID
association [0..1] to I_BillingControlCategoryText as _BillingControlCategoryText on $projection.BillingControlCategory = _BillingControlCategoryText.BillingControlCategory
and _BillingControlCategoryText.Language = $session.system_language
association [0..1] to E_JournalEntryItem as _JournalEntryItemExtension on $projection.Ledger = _JournalEntryItemExtension.SourceLedger
and $projection.CompanyCode = _JournalEntryItemExtension.CompanyCode
and $projection.FiscalYear = _JournalEntryItemExtension.FiscalYear
and $projection.AccountingDocument = _JournalEntryItemExtension.AccountingDocument
and $projection.LedgerGLLineItem = _JournalEntryItemExtension.LedgerGLLineItem
association [0..1] to I_TimeSheetOvertimeCatText as _TimeSheetOvertimeCatText on $projection.TimeSheetOvertimeCategory = _TimeSheetOvertimeCatText.TimeSheetOvertimeCategory
and _TimeSheetOvertimeCatText.Language = $session.system_language
association [0..1] to I_CustomerMaterial_2 as _CustomerMaterial on $projection.salesorganization = _CustomerMaterial.SalesOrganization
and $projection.distributionchannel = _CustomerMaterial.DistributionChannel
and $projection.soldtoparty = _CustomerMaterial.Customer
and $projection.Material = _CustomerMaterial.Product
association [0..1] to I_PrjBlgElmEntrJrnlEntrLink as _PrjBlgElmEntrJrnlEntrLink on ProjectBillingRequestItem.ProjBillgElmntEntrItmUUID = _PrjBlgElmEntrJrnlEntrLink.ProjBillgElmntEntrItmUUID // added to expose association to Local API Project billing request
--association [1..1] to I_ProjectBillingElmntDueDate as _DueBillingDate on $projection.ProjectBillingElementUUID = _DueBillingDate.ProjectBillingElementUUID
--association [1..1] to P_ProjBillgRequestItemDueDate as _DueBillingDate on $projection.ProjectBillingRequestItemUUID = _DueBillingDate.ProjectBillingRequestItemUUID
association of many to one P_ProjBillgElmntTEBillgDate as _ProjBillgElmntTEBillgDate on $projection.ProjectBillingElementUUID = _ProjBillgElmntTEBillgDate.ProjectBillingElementUUID
association [0..1] to I_ProjectBillingCategory as _ProjectBillingCategory on $projection.projectbillingcategory = _ProjectBillingCategory.ProjectBillingCategory
association [1..*] to I_ProjectBillingCategoryText as _ProjectBillingCategoryText on $projection.projectbillingcategory = _ProjectBillingCategoryText.ProjectBillingCategory
association [0..1] to E_ProjectBillingRequestItem as _Extension on $projection.ProjectBillingRequestItemUUID = _Extension.ProjectBillingRequestItemUUID
composition [0..1] of R_ProjBillgReqItemPrpsdNoteTP as _ProjBillgReqItemPrpsdNoteTP
{
key ProjectBillingRequestItem.ProjectBillingRequestItemUUID as ProjectBillingRequestItemUUID,
ProjectBillingRequestItem.ProjectBillingRequestUUID as ProjectBillingRequestUUID,
ProjectBillingRequestItem.ProjBillgElmntEntrItmUUID as ProjBillgElmntEntrItmUUID,
ProjectBillingRequestItem.ProjectBillingElementUUID as ProjectBillingElementUUID,
ProjectBillingRequestItem.SalesDocumentItem as SalesDocumentItem,
ProjectBillingRequestItem.BillingPlan as BillingPlan,
ProjectBillingRequestItem.BillingPlanItem as BillingPlanItem,
@Semantics.quantity.unitOfMeasure: 'QuantityUnit'
ProjectBillingRequestItem.ToBePostponedQuantity as ToBePostponedQuantity,
@Semantics.amount.currencyCode: 'TransactionCurrency'
ProjectBillingRequestItem.ToBePostponedAmtInTransacCrcy as ToBePostponedAmtInTransacCrcy,
@Semantics.amount.currencyCode: 'ProjectCurrency'
ProjectBillingRequestItem.ToBePostponedAmtInProjectCrcy as ToBePostponedAmtInProjectCrcy,
@Semantics.amount.currencyCode: 'GlobalCurrency'
ProjectBillingRequestItem.ToBePostponedAmtInGlobalCrcy as ToBePostponedAmtInGlobalCrcy,
@Semantics.quantity.unitOfMeasure: 'QuantityUnit'
ProjectBillingRequestItem.ToBeWrittenOffQuantity as ToBeWrittenOffQuantity,
@Semantics.amount.currencyCode: 'TransactionCurrency'
ProjectBillingRequestItem.ToBeWrittenOffAmtInTransCrcy as ToBeWrittenOffAmtInTransCrcy,
@Semantics.amount.currencyCode: 'ProjectCurrency'
ProjectBillingRequestItem.ToBeWrittenOffAmtInProjectCrcy as ToBeWrittenOffAmtInProjectCrcy,
@Semantics.amount.currencyCode: 'GlobalCurrency'
ProjectBillingRequestItem.ToBeWrittenOffAmtInGlobalCrcy as ToBeWrittenOffAmtInGlobalCrcy,
@Semantics.amount.currencyCode: 'DocumentCurrency'
ProjectBillingRequestItem.BillableRevenueAmtInDocCrcy as BillableRevenueAmtInDocCrcy,
@Semantics.user.createdBy: true
ProjectBillingRequestItem.ProjBillgReqItmCrtedByUser as ProjBillgReqItmCrtedByUser,
@Semantics.systemDateTime.createdAt: true
ProjectBillingRequestItem.ProjBillgReqItmCrtedAtDteTme as ProjBillgReqItmCrtedAtDteTme,
@Semantics.user.lastChangedBy: true
ProjectBillingRequestItem.ProjBillgReqItmLastChgdBy as ProjBillgReqItmLastChgdBy,
@Semantics.systemDateTime.lastChangedAt: true
ProjectBillingRequestItem.ProjBillgReqItmLastChgdDteTme as ProjBillgReqItmLastChgdDteTme,
ProjectBillingRequestItem.ServicesRenderedDate as ServicesRenderedDate,
@Semantics.quantity.unitOfMeasure: 'QuantityUnit'
ProjectBillingRequestItem.ToBeBilledQuantity as ToBeBilledQuantity,
@Semantics.amount.currencyCode: 'TransactionCurrency'
ProjectBillingRequestItem.ToBeBilledAmtInTransCrcy as ToBeBilledAmtInTransCrcy,
@Semantics.amount.currencyCode: 'ProjectCurrency'
ProjectBillingRequestItem.ToBeBilledAmtInProjCurrency as ToBeBilledAmtInProjCurrency,
@Semantics.amount.currencyCode: 'GlobalCurrency'
ProjectBillingRequestItem.ToBeBilledAmtInGlobCurrency as ToBeBilledAmtInGlobCurrency,
@Semantics.quantity.unitOfMeasure: 'QuantityUnit'
ProjectBillingRequestItem.OpenQuantity as OpenQuantity,
@Semantics.amount.currencyCode: 'TransactionCurrency'
ProjectBillingRequestItem.OpenAmountInTransCrcy as OpenAmountInTransCrcy,
@Semantics.amount.currencyCode: 'ProjectCurrency'
ProjectBillingRequestItem.OpenAmountInProjectCurrency as OpenAmountInProjectCurrency,
@Semantics.amount.currencyCode: 'GlobalCurrency'
ProjectBillingRequestItem.OpenAmountInGlobalCurrency as OpenAmountInGlobalCurrency,
@Semantics.amount.currencyCode: 'DocumentCurrency'
ProjectBillingRequestItem.OpenRevenueAmtInDocCrcy as OpenRevenueAmtInDocCrcy,
@Semantics.amount.currencyCode: 'DocumentCurrency'
ProjectBillingRequestItem.NetPriceAmountInDocCrcy as NetPriceAmountInDocCrcy,
ProjectBillingRequestItem.NetPriceQuantity as NetPriceQuantity,
ProjectBillingRequestItem.NetPriceQuantityUnit as NetPriceQuantityUnit,
ProjectBillingRequestItem.Material as Material,
ProjectBillingRequestItem.TransactionCurrency,
ProjectBillingRequestItem.ProjectCurrency,
ProjectBillingRequestItem.QuantityUnit,
ProjectBillingRequestItem.GlobalCurrency,
ProjectBillingRequestItem.DocumentCurrency,
ProjectBillingRequestItem.ManualBillgSelForPrjBlgReqItem as ManualBillgSelForPrjBlgReqItem,
ProjectBillingRequestItem.ProjectBillingRequestItemDesc as ProjectBillingRequestItemDesc,
ProjectBillingRequestItem.ProjBillgReqItmSourceType as ProjBillgReqItmSourceType,
ProjectBillingRequestItem.ProjBillgTransfCostQtyCode,
ProjectBillingRequestItem.ProjBillgItmValIsNotActualCost,
ProjectBillingRequestItem.ProjBillingRequestItemLongText as ProjBillingRequestItemLongText,
_ProjectBillingRequestTP.SalesDocument as SalesDocument,
_ProjectBillingRequestTP._SalesOrder.SalesOrganization,
_ProjectBillingRequestTP._SalesOrder.DistributionChannel,
_ProjectBillingRequestTP._SalesOrder.SoldToParty,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_ProjectBillingCategory',
element: 'ProjectBillingCategory' }
}]
@ObjectModel.foreignKey.association: '_ProjectBillingCategory'
@Consumption.hidden: true
_ProjectBillingRequestTP.ProjectBillingCategory,
_ProjectBillingRequestTP.ProjectBillingRequestStatus, //needed in where condition in C-view
concat(ltrim(_ProjectBillingRequestTP.SalesDocument,'0'), concat('/',ltrim(ProjectBillingRequestItem.SalesDocumentItem,'0')) ) as SalesOrderItemConcatenatedID,
case
when _PrjBlgElmEntrJrnlEntrLinkTP._BillableControl.BillingControlCategory is null then 'BILLABLE'
else _PrjBlgElmEntrJrnlEntrLinkTP._BillableControl.BillingControlCategory //'NON_BILL'
end as BillingControlCategory,
_PrjBlgElmEntrJrnlEntrLinkTP.PersonnelNumber as PersonnelNumber,
_PrjBlgElmEntrJrnlEntrLinkTP.Ledger,
_PrjBlgElmEntrJrnlEntrLinkTP.CompanyCode,
_PrjBlgElmEntrJrnlEntrLinkTP.FiscalYear,
_PrjBlgElmEntrJrnlEntrLinkTP.LedgerGLLineItem as LedgerGLLineItem,
_PrjBlgElmEntrJrnlEntrLinkTP.AccountingDocument as AccountingDocument,
cast ( concat( ltrim(_PrjBlgElmEntrJrnlEntrLinkTP.AccountingDocument,'0'),
concat(concat('/',_PrjBlgElmEntrJrnlEntrLinkTP.LedgerGLLineItem),
concat('/',_PrjBlgElmEntrJrnlEntrLinkTP.FiscalYear) ) ) as fis_je_semantic_key ) as JournalEntrySemanticKey,
_PrjBlgElmEntrJrnlEntrLinkTP._GLAccountLineItemRawData.
_OriginCostCtrActivityType[1:ValidityStartDate <= $session.system_date and ValidityEndDate >= $session.system_date ].
_Text[1:Language = $session.system_language].CostCtrActivityTypeDesc as CostCtrActivityTypeDesc, //C-view
_PrjBlgElmEntrJrnlEntrLinkTP._GLAccountLineItemRawData.WorkItem as WorkItem, //C-view
_PrjBlgElmEntrJrnlEntrLinkTP._GLAccountLineItemRawData.TimeSheetOvertimeCategory as TimeSheetOvertimeCategory,
_PersonWorkAgreement_1._WorkForcePersonBPDetails.BusinessPartnerUUID as BusinessPartnerUUID,
case when ProjectBillingRequestItem.ProjBillgReqItmSourceType = 'A'
then case when _ProjBillgElmntTEBillgDate.MaxBillingDate is not null then _ProjBillgElmntTEBillgDate.MaxBillingDate
when _ProjBillgElmntTEBillgDate.MinBillingDate is not null then _ProjBillgElmntTEBillgDate.MinBillingDate
when _ProjBillgElmntTEBillgDate.MaxBillingDate is null and _ProjBillgElmntTEBillgDate.MinBillingDate is null then cast( '99991231' as fkdat )
end
else _ProjectBillingElementEntryTP.ServicesRenderedDate
end as DueBillingDate,
$session.user_date as UserLocalDate,
//Required for making visibility within get_features. Cannot be moved to C-view
_ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLnk._SalesDocumentBillingPlanItem.BillingPlanServiceStartDate as BillingPlanServiceStartDate,
_ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLnk._SalesDocumentBillingPlanItem.BillingPlanServiceEndDate as BillingPlanServiceEndDate,
@Semantics.amount.currencyCode: 'TransactionCurrency'
case
when _ProjectBillingElementEntryTP.OriginalTotalQuantity is not initial
then cast(
cast(
( curr_to_decfloat_amount( _ProjectBillingElementEntryTP.OriginalAmountInTransacCrcy ) / _ProjectBillingElementEntryTP.OriginalTotalQuantity )
as abap.dec(23,2) )
as abap.curr(23,2) )
else cast( 0 as abap.curr(23,2) )
end as BaseUnitActualCost,
//Associations
_TimeSheetOvertimeCatText,
_BillingControlCategoryText,
_PrjBlgElmEntrJrnlEntrLink,
_CustomerMaterial,
_PersonWorkAgreement_1,
_ProjectBillingRequestTP,
_ProjectBillingElementEntryTP,
ProjectBillingRequestItem._Material,
ProjectBillingRequestItem._ProjectBillingRequest,
ProjectBillingRequestItem._TransactionCurrency,
ProjectBillingRequestItem._ProjectCurrency,
ProjectBillingRequestItem._GlobalCurrency,
ProjectBillingRequestItem._DocumentCurrency,
_ProjectBillingCategory,
ProjectBillingRequestItem._ProjBillgReqItmSrceType,
@Consumption.hidden: true
ProjectBillingRequestItem._TransactionCurrencyText,
@Consumption.hidden: true
ProjectBillingRequestItem._ProjectCurrencyText,
@Consumption.hidden: true
ProjectBillingRequestItem._GlobalCurrencyText,
@Consumption.hidden: true
ProjectBillingRequestItem._DocumentCurrencyText,
@Consumption.hidden: true
_ProjectBillingCategoryText,
@Consumption.hidden: true
ProjectBillingRequestItem._ProjBillgReqItmSrceTypeText,
_ProjBillgReqItemPrpsdNoteTP
}