@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@EndUserText.label: 'Performance Obligation To Document Flow'
@Metadata.allowExtensions: true
@ObjectModel.semanticKey: [ 'PerformanceObligation' ]
@ObjectModel.usageType: { serviceQuality: #D, sizeCategory: #XXL, dataClass: #TRANSACTIONAL }
@Search.searchable: true
@VDM.viewType: #CONSUMPTION
define view entity C_RAPerfOblgnToDocumentFlow
as select from I_RAPerformanceObligation as PerfOblgn
left outer to one join P_RAHighLvlPerfOblgnAmt as RAHighLvlPerfOblgnAmt
on PerfOblgn.PerformanceObligation = RAHighLvlPerfOblgnAmt.PerformanceObligation
association [1..*] to C_RAPerfOblgnDocumentFlow as _DocFlow
on $projection.PerformanceObligation = _DocFlow.PerformanceObligation
association [1..*] to I_RAPerfOblgnStatusText as _PerfOblgnStatusText
on $projection.RevnAcctgPerfOblgnStatus = _PerfOblgnStatusText.RevnAcctgPerfOblgnStatus
association [1..*] to I_RAPerfOblgnFlfmtTypeText as _FulfillmentTypeName
on $projection.PerfOblgnFulfillmentType = _FulfillmentTypeName.PerfOblgnFulfillmentType
association [1..*] to I_RAPerfOblgnEventTypeText as _EventTypeText
on $projection.PerfOblgnEventType = _EventTypeText.PerfOblgnEventType
association [0..1] to I_RAPostingAggregationType as _RevnAccountingPosting
on $projection.RevenueAccountingContract = _RevnAccountingPosting.RevenueAccountingContract
association [0..*] to C_HierRuntimeRprstnDplLeafNode as _CostCenterHierarchyLeafNode
on $projection.CostCenter = _CostCenterHierarchyLeafNode.UnivHierarchyBusinessEntity
and $projection.ControllingArea = _CostCenterHierarchyLeafNode.HierarchyNodeClass
and _CostCenterHierarchyLeafNode.ValidityStartDate <= $session.system_date
and _CostCenterHierarchyLeafNode.ValidityEndDate >= $session.system_date
and _CostCenterHierarchyLeafNode.HierarchyType = '0101'
association [0..*] to C_HierRuntimeRprstnDplLeafNode as _ProfitCenterHierLeafNode
on $projection.ProfitCenter = _ProfitCenterHierLeafNode.UnivHierarchyBusinessEntity
and $projection.ControllingArea = _ProfitCenterHierLeafNode.HierarchyNodeClass
and _ProfitCenterHierLeafNode.ValidityStartDate <= $session.system_date
and _ProfitCenterHierLeafNode.ValidityEndDate >= $session.system_date
and _ProfitCenterHierLeafNode.HierarchyType = '0106'
{
key PerfOblgn.PerformanceObligation,
key coalesce(PerfOblgn._Mapping.RASndgCompDocumentItem, '') as RASndgCompDocumentItem,
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.PerformanceObligationClass,
@Search.defaultSearchElement: true
PerfOblgn.RevenueAccountingContract,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_CompanyCodeStdVH', element: 'CompanyCode' } } ]
@ObjectModel.text.element: [ 'CompanyCodeName' ]
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.CompanyCode,
@Semantics.text: true
PerfOblgn._CompanyCode.CompanyCodeName,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_AccountingPrinciple', element: 'AccountingPrinciple' } } ]
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.AccountingPrinciple,
@Consumption.semanticObject: 'BusinessPartner'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_BusinessPartnerVH', element: 'BusinessPartner' } } ]
@ObjectModel.text.element: [ 'BusinessPartnerName' ]
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.BusinessPartner,
@Consumption.filter.hidden: true
@Semantics.text: true
PerfOblgn._BusinessPartner.BusinessPartnerName,
@Consumption.semanticObject: 'Customer'
@Consumption.valueHelpDefinition: [ { entity: { name: 'D_CustomerCVH', element: 'Customer' } } ]
@ObjectModel.text.element: [ 'CustomerName' ]
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.Customer,
@Consumption.filter.hidden: true
@Semantics.text: true
PerfOblgn._Customer.CustomerName,
@Semantics.amount.currencyCode: 'SalesDocumentCurrency'
case PerfOblgn.RAPerfOblgnDistinctType
when 'C' then RAHighLvlPerfOblgnAmt.ContractualPrcInSlsDocCrcy
else PerfOblgn.ContractualPrcInSlsDocCrcy
end as ContractualPrcInSlsDocCrcy,
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.SalesDocumentCurrency,
@Consumption.filter.hidden: true
@Semantics.amount.currencyCode: 'SalesDocumentCurrency'
PerfOblgn.SSPriceInSalesDocCrcy,
@Consumption.filter.hidden: true
@Semantics.amount.currencyCode: 'SalesDocumentCurrency'
case PerfOblgn.RAPerfOblgnDistinctType
when 'C' then RAHighLvlPerfOblgnAmt.AllocatedPriceInSalesDocCrcy
else PerfOblgn.AllocatedPriceInSalesDocCrcy
end as AllocatedPriceInSalesDocCrcy,
@Consumption.filter.hidden: true
@Semantics.text: true
@UI.hidden: true
PerfOblgn.ControllingArea,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_RAPerfObligationEventTypeVH', element: 'PerfOblgnEventType' } } ]
@ObjectModel.text: { association: '_EventTypeText', control: #ASSOCIATED_TEXT_UI_HIDDEN }
PerfOblgn.PerfOblgnEventType,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_RAPerfOblgnFlfmtTypeVH', element: 'PerfOblgnFulfillmentType' } } ]
@ObjectModel.text: { association: '_FulfillmentTypeName', control: #ASSOCIATED_TEXT_UI_HIDDEN }
PerfOblgn.PerfOblgnFulfillmentType,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_RAIndicatorVH', element: 'IndicatorValue' } } ]
@Consumption.filter.selectionType: #SINGLE
PerfOblgn.PerfOblgnIsFinallyInvoiced,
@Consumption.filter.hidden: true
PerfOblgn.PerfOblgnEffectiveQuantityUnit,
@Consumption.filter.hidden: true
@Semantics.quantity.unitOfMeasure: 'PerfOblgnEffectiveQuantityUnit'
PerfOblgn.PerfOblgnEffectiveQuantity,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_RAPerfOblgnStatusVH', element: 'RevnAcctgPerfOblgnStatus' } } ]
@ObjectModel.text: { association: '_PerfOblgnStatusText' }
PerfOblgn.RevnAcctgPerfOblgnStatus,
@Consumption.filter.hidden: true
cast(coalesce(PerfOblgn._Mapping.RevnAcctgSenderComponent, '')
as farr_cds_rai_srcco preserving type) as RevnAcctgSenderComponent,
PerfOblgn._Mapping.RevnAcctgOperationalDocument,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_RAIndicatorVH', element: 'IndicatorValue' } } ]
@Consumption.filter.selectionType: #SINGLE
PerfOblgn.RAFulfillmentIsValueBased,
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_SalesOrganizationVH', element: 'SalesOrganization' } } ]
@ObjectModel.text.element: [ 'SalesOrganizationName' ]
PerfOblgn.RevnAcctgSalesOrganization,
PerfOblgn._SalesOrganization._Text[1: Language = $session.system_language].SalesOrganizationName,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProfitCenterStdVH', element: 'ProfitCenter' } } ]
@ObjectModel.text.element: [ 'ProfitCenterName' ]
PerfOblgn.ProfitCenter,
@ObjectModel.readOnly: true
cast('' as farr_vbtypl) as SDDocumentCategory,
@Semantics.text: true
PerfOblgn._CurrentProfitCenter._Text[1: Language = $session.system_language].ProfitCenterName,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProfitCenterHierarchyVH', element: 'ProfitCenterHierarchy' } } ]
@Consumption.filter.selectionType: #SINGLE
@ObjectModel.filter.transformedBy: 'ABAP:CL_FINS_HIER_VH_FLTR_TRANSFORM'
cast('' as fis_prctr_hryid_42) as ProfitCenterHierarchy,
@Consumption.filter.hidden: true
@ObjectModel.filter.transformedBy: 'ABAP:CL_FINS_HIER_VH_FLTR_TRANSFORM'
cast('' as fis_prctr_hrynid_50) as ProfitCenterHierarchyNode,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_FunctionalAreaVH', element: 'FunctionalArea' } } ]
@ObjectModel.text.element: [ 'FunctionalAreaName' ]
PerfOblgn.FunctionalArea,
@Semantics.text: true
PerfOblgn._FunctionalArea._Text[1: Language = $session.system_language].FunctionalAreaName,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_BusinessAreaStdVH', element: 'BusinessArea' } } ]
PerfOblgn.BusinessArea,
// use case to avoid the empty profitability segment to be displayed as '0' insteand of blank
case PerfOblgn.ProfitabilitySegment_2
when '0000000000' then ''
else PerfOblgn.ProfitabilitySegment_2
end as ProfitabilitySegment,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_SegmentStdVH', element: 'Segment' } } ]
PerfOblgn.Segment,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_CostCenterStdVH', element: 'CostCenter' } } ]
@ObjectModel.text.element: [ 'CostCenterName' ]
PerfOblgn.CostCenter,
@Semantics.text: true
PerfOblgn._CurrentCostCenter._Text[1: Language = $session.system_language].CostCenterName,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_CostCenterHierarchyVH', element: 'CostCenterHierarchy' } } ]
@Consumption.filter.selectionType: #SINGLE
@ObjectModel.filter.transformedBy: 'ABAP:CL_FINS_HIER_VH_FLTR_TRANSFORM'
cast('' as fis_cctr_hryid_42) as CostCenterHierarchy,
@Consumption.filter.hidden: true
@ObjectModel.filter.transformedBy: 'ABAP:CL_FINS_HIER_VH_FLTR_TRANSFORM'
cast('' as fis_cctr_hrynid_50) as CostCenterHierarchyNode,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElementBasicDataStdVH', element: 'WBSElementExternalID' } } ]
PerfOblgn.WBSElementExternalID,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_RAPerfOblgnCreatedByUserVH', element: 'PerfOblgnCreatedByUser' } } ]
@ObjectModel.text.element: [ 'CreatedByUserDescription' ]
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.PerfOblgnCreatedByUser,
@Consumption.filter.hidden: true
case PerfOblgn._CreatedByUser.UserDescription
when ''
then PerfOblgn.PerfOblgnCreatedByUser
else PerfOblgn._CreatedByUser.UserDescription
end as CreatedByUserDescription,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_RAPerfOblgnChangedByUserVH', element: 'PerfOblgnLastChangedByUsr' } } ]
@ObjectModel.text.element: [ 'LastChangedByUserDescription' ]
@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 }
PerfOblgn.PerfOblgnLastChangedByUsr,
@Consumption.filter.hidden: true
case PerfOblgn._ChangedByUser.UserDescription
when ''
then PerfOblgn.PerfOblgnLastChangedByUsr
else PerfOblgn._ChangedByUser.UserDescription
end as LastChangedByUserDescription,
@Consumption.filter.selectionType: #INTERVAL
PerfOblgn.PerfOblgnCreationDate,
@Consumption.filter: { hidden: true, selectionType: #INTERVAL }
PerfOblgn.PerfOblgnLastChangeDate,
@Consumption.filter.hidden: true
PerfOblgn._RevenueAccountingContract.IsBusinessPurposeCompleted,
@Consumption.filter.hidden: true
_RevnAccountingPosting.RAHasPostingDataReduction,
/* Association */
@Consumption.filter.hidden: true
PerfOblgn._RevenueAccountingContract,
@Consumption.filter.hidden: true
PerfOblgn._AccountingPrinciple,
@Consumption.filter.hidden: true
PerfOblgn._CompanyCode,
@Consumption.filter.hidden: true
_PerfOblgnStatusText,
@Consumption.filter.hidden: true
_FulfillmentTypeName,
@Consumption.filter.hidden: true
_EventTypeText,
@Consumption.filter.hidden: true
PerfOblgn._SalesOrganization,
@Consumption.filter.hidden: true
PerfOblgn._BusinessPartner,
@Consumption.filter.hidden: true
PerfOblgn._Segment,
@Consumption.filter.hidden: true
PerfOblgn._FunctionalArea,
@Consumption.filter.hidden: true
PerfOblgn._WBSElement,
@Consumption.filter.hidden: true
PerfOblgn._CreatedByUser,
@Consumption.filter.hidden: true
PerfOblgn._ChangedByUser,
@Consumption.filter.hidden: true
PerfOblgn._BusinessArea,
@Consumption.filter.hidden: true
_DocFlow,
_CostCenterHierarchyLeafNode,
_ProfitCenterHierLeafNode
}