@AbapCatalog.sqlViewName: 'CRAPERFTODOCF'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Performance Obligation To Document Flow'
@Metadata.allowExtensions: true
@ObjectModel.semanticKey: 'PerformanceObligation'
@ObjectModel.usageType: {sizeCategory: #XXL, serviceQuality: #D, dataClass: #TRANSACTIONAL}
@Search.searchable: true
@VDM.viewType: #CONSUMPTION
define view 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(_Mapping.RASndgCompDocumentItem, '') as RASndgCompDocumentItem,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
PerformanceObligationClass,
@Search.defaultSearchElement: true
PerfOblgn.RevenueAccountingContract,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CompanyCodeStdVH',
element: 'CompanyCode' } }
]
@ObjectModel.text.element: ['CompanyCodeName']
CompanyCode,
@Semantics.text: true
_CompanyCode.CompanyCodeName,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_AccountingPrinciple',
element: 'AccountingPrinciple' }
}]
AccountingPrinciple,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
@Consumption.semanticObject: 'BusinessPartner'
@ObjectModel.text.element: ['BusinessPartnerName']
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BusinessPartnerVH',
element: 'BusinessPartner' }
}]
BusinessPartner,
@Semantics.text: true
@Consumption.filter.hidden: true
_BusinessPartner.BusinessPartnerName,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
@Consumption.semanticObject: 'Customer'
@ObjectModel.text.element: ['CustomerName']
@Consumption.valueHelpDefinition: [
{ entity: { name: 'D_CustomerCVH',
element: 'Customer' }
}]
Customer,
@Semantics.text: true
@Consumption.filter.hidden: true
_Customer.CustomerName,
@Semantics.amount.currencyCode: 'SalesDocumentCurrency'
case PerfOblgn.RAPerfOblgnDistinctType
when 'C' then RAHighLvlPerfOblgnAmt.ContractualPrcInSlsDocCrcy
else PerfOblgn.ContractualPrcInSlsDocCrcy
end as ContractualPrcInSlsDocCrcy,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
PerfOblgn.SalesDocumentCurrency,
@Consumption.filter.hidden: true
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
ControllingArea,
@ObjectModel.text.association: '_EventTypeText'
@ObjectModel.text.control: #('ASSOCIATED_TEXT_UI_HIDDEN')
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAPerfObligationEventTypeVH',
element: 'PerfOblgnEventType' }
}]
PerfOblgnEventType,
@ObjectModel.text.association: '_FulfillmentTypeName'
@ObjectModel.text.control: #('ASSOCIATED_TEXT_UI_HIDDEN')
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAPerfOblgnFlfmtTypeVH',
element: 'PerfOblgnFulfillmentType' }
}]
PerfOblgnFulfillmentType,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAIndicatorVH',
element: 'IndicatorValue' }
}]
@Consumption.filter.selectionType: #SINGLE
PerfOblgnIsFinallyInvoiced,
@Consumption.filter.hidden: true
PerfOblgnEffectiveQuantityUnit,
@Consumption.filter.hidden: true
PerfOblgnEffectiveQuantity,
@ObjectModel.text.association: '_PerfOblgnStatusText'
@ObjectModel.text.control: #('ASSOCIATED_TEXT_UI_HIDDEN')
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAContractStatusVH',
element: 'RevnAcctgContractStatus' }
}]
RevnAcctgPerfOblgnStatus,
@Consumption.filter.hidden: true
cast(coalesce(_Mapping.RevnAcctgSenderComponent, '') as farr_cds_rai_srcco preserving type) as RevnAcctgSenderComponent,
_Mapping.RevnAcctgOperationalDocument,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAIndicatorVH',
element: 'IndicatorValue' }
}]
@Consumption.filter.selectionType: #SINGLE
RAFulfillmentIsValueBased,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'C_SalesOrganizationVH',
element: 'SalesOrganization' }
}]
@ObjectModel.text.element: ['SalesOrganizationName']
RevnAcctgSalesOrganization,
PerfOblgn._SalesOrganization._Text[1:Language =$session.system_language].SalesOrganizationName,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_ProfitCenterStdVH',
element: 'ProfitCenter' }
}]
@ObjectModel.text.element: ['ProfitCenterName']
ProfitCenter,
@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']
FunctionalArea,
@Semantics.text: true
PerfOblgn._FunctionalArea._Text[1:Language =$session.system_language].FunctionalAreaName,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BusinessAreaStdVH',
element: 'BusinessArea' }
}]
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' }
}]
Segment,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CostCenterStdVH',
element: 'CostCenter' }
}]
@ObjectModel.text.element: ['CostCenterName']
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' }
}]
WBSElementExternalID,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
@ObjectModel.text.element: ['CreatedByUserDescription']
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAPerfOblgnCreatedByUserVH',
element: 'PerfOblgnCreatedByUser' }
}]
PerfOblgnCreatedByUser,
@Consumption.filter.hidden: true
case _CreatedByUser.UserDescription
when ''
then PerfOblgnCreatedByUser
else _CreatedByUser.UserDescription end as CreatedByUserDescription,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
@ObjectModel.text.element: ['LastChangedByUserDescription']
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAPerfOblgnChangedByUserVH',
element: 'PerfOblgnLastChangedByUsr' }
}]
PerfOblgnLastChangedByUsr,
@Consumption.filter.hidden: true
case _ChangedByUser.UserDescription
when ''
then PerfOblgnLastChangedByUsr
else _ChangedByUser.UserDescription end as LastChangedByUserDescription,
@Consumption.filter.selectionType: #INTERVAL
PerfOblgnCreationDate,
@Consumption.filter.hidden: true
@Consumption.filter.selectionType: #INTERVAL
PerfOblgnLastChangeDate,
@Consumption.filter.hidden: true
_RevenueAccountingContract.IsBusinessPurposeCompleted,
@Consumption.filter.hidden: true
_RevnAccountingPosting.RAHasPostingDataReduction,
/* Association */
@Consumption.filter.hidden: true
_RevenueAccountingContract,
@Consumption.filter.hidden: true
_AccountingPrinciple,
@Consumption.filter.hidden: true
_CompanyCode,
@Consumption.filter.hidden: true
_PerfOblgnStatusText,
@Consumption.filter.hidden: true
_FulfillmentTypeName,
@Consumption.filter.hidden: true
_EventTypeText,
@Consumption.filter.hidden: true
_SalesOrganization,
@Consumption.filter.hidden: true
_BusinessPartner,
@Consumption.filter.hidden: true
_Segment,
@Consumption.filter.hidden: true
_FunctionalArea,
@Consumption.filter.hidden: true
_WBSElement,
@Consumption.filter.hidden: true
_CreatedByUser,
@Consumption.filter.hidden: true
_ChangedByUser,
@Consumption.filter.hidden: true
_BusinessArea,
@Consumption.filter.hidden: true
_DocFlow,
_CostCenterHierarchyLeafNode,
_ProfitCenterHierLeafNode
}
where _RevenueAccountingContract.RAContractIsCreatedByContrMgr = 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNER",
"I_COMPANYCODE",
"I_COSTCENTER",
"I_COSTCENTERTEXT",
"I_CUSTOMER",
"I_FUNCTIONALAREA",
"I_FUNCTIONALAREATEXT",
"I_PROFITCENTER",
"I_PROFITCENTERTEXT",
"I_RAPERFORMANCEOBLIGATION",
"I_RAPOSTINGAGGREGATIONTYPE",
"I_REVENUEACCOUNTINGCONTRACT",
"I_REVENUEACCOUNTINGMAPPING",
"I_SALESORGANIZATION",
"I_SALESORGANIZATIONTEXT",
"I_USER",
"P_RAHIGHLVLPERFOBLGNAMT"
],
"ASSOCIATED":
[
"C_HIERRUNTIMERPRSTNDPLLEAFNODE",
"C_RAPERFOBLGNDOCUMENTFLOW",
"I_ACCOUNTINGPRINCIPLE",
"I_BUSINESSAREA",
"I_BUSINESSPARTNER",
"I_COMPANYCODE",
"I_FUNCTIONALAREA",
"I_RAPERFOBLGNEVENTTYPETEXT",
"I_RAPERFOBLGNFLFMTTYPETEXT",
"I_RAPERFOBLGNSTATUSTEXT",
"I_RAPOSTINGAGGREGATIONTYPE",
"I_REVENUEACCOUNTINGCONTRACT",
"I_SALESORGANIZATION",
"I_SEGMENT",
"I_USER",
"I_WBSELEMENTBYEXTERNALID"
],
"BASE":
[
"I_RAPERFORMANCEOBLIGATION"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/