/* !!!
!!! DONOTUSE - This CDS view is erroneous - Replaced by P_PPM_PrjActCstLineItemsSemTag
*/
//@EndUserText.label : 'Project Cost Line Items with Planning Category Costs'
@AbapCatalog: {
sqlViewName: 'PPMPRJBYACTCST',
compiler.compareFilter: true ,
dataMaintenance: #RESTRICTED
}
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
//@Consumption.semanticObject : 'EnterpriseProject'
@VDM: {
// lifecycle.contract.type: #SAP_INTERNAL_API,
private: true ,
viewType: #COMPOSITE
}
@ObjectModel: {
// semanticKey: [ 'Project' ],
representativeKey: 'ProjectInternalID',
supportedCapabilities: [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ],
usageType: {
serviceQuality: #D,
dataClass: #MIXED,
sizeCategory: #XL
}
}
/* !!!
!!! DONOTUSE - This CDS view is erroneous - Replaced by P_PPM_PrjActCstLineItemsSemTag
!!! view is out of maintenance, incorrect by intention, no usage and private view . Can be deleteted? (12/2022)
*/
define view P_PPM_PrjActCostLineitems
as select from I_GLAccountLineItemRawData as ProjCstLineItm
inner join I_WBSElementBasicData as Task on ProjCstLineItm.ProjectInternalID = Task.ProjectInternalID
and ProjCstLineItm.WBSElementInternalID = Task.WBSElementInternalID
association [0..1] to I_ControllingArea as _ControllingArea on $projection.ControllingArea = _ControllingArea.ControllingArea
association [0..1] to I_Ledger as _Ledger on $projection.Ledger = _Ledger.Ledger
association [1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
{
@ObjectModel.foreignKey.association : '_Ledger'
key ProjCstLineItm.SourceLedger as Ledger, // change based on cleanup of I_GLAccountLineItem 30.11.2022
@ObjectModel.foreignKey.association : '_CompanyCode'
key ProjCstLineItm.CompanyCode,
key ProjCstLineItm.ProjectInternalID,
@ObjectModel.foreignKey.association : '_ControllingArea'
key ProjCstLineItm.ControllingArea,
key ProjCstLineItm.BusinessArea,
key ProjCstLineItm.ProfitCenter,
key _CalendarDate.YearMonth as YearMonth,
@Semantics.currencyCode:true
ProjCstLineItm.GlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
sum( ProjCstLineItm.AmountInGlobalCurrency ) as AmountInGlobalCurrency,
_CompanyCode,
_ControllingArea,
_Ledger
}
where ProjCstLineItm.ProjectInternalID = Task.ProjectInternalID
and ProjCstLineItm.CompanyCode = Task.CompanyCode
and IsCommitment != 'X'
and _Ledger.IsLeadingLedger = 'X'
/* Adjustment to have the same cost displayed by P_ProjectCostLineItems with filter IsSettled = 'X'
I.e. shows all costs "To Project" and exclude costs "From Project" like Settlement Cost.
This adjustment leads to the absence of Settlement Costs in the display. */
and not ( ControllingDebitCreditCode = 'A'
or ( ControllingDebitCreditCode = 'S'
and ( BusinessTransactionType = 'KOAO' or BusinessTransactionType = 'KOAE' )
and ( ( PartnerProject = ' ' and PartnerOrder = ' ' and PartnerSalesDocument = ' ' and PartnerProjectNetwork = ' '
and PartnerProjectNetworkActivity = ' ' and PartnerBusinessProcess = ' ' and PartnerCostObject = ' ' )
or PartnerProject = Project )
)
)
and GlobalCurrency <> ''
and PostingDate > '00000000'
// and ProjCstLineItm.ProjectInternalID = Project.ProjectInternalID
group by SourceLedger, ProjCstLineItm.CompanyCode, ProjCstLineItm.ProjectInternalID, ProjCstLineItm.ControllingArea, BusinessArea,
ProjCstLineItm.ProfitCenter, _CalendarDate.YearMonth, GlobalCurrency
Depth:
1
2
3
4
5
All
Reload
P_PPM_PrjActCostLineitems view