@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Revenue Accounting Contract Entity'
@Search.searchable: true
@AccessControl.privilegedAssociations: ['_CreatedByUserContactCard', '_LastChangedByContactCard']
@VDM.viewType: #CONSUMPTION
@VDM.usage.type:[#TRANSACTIONAL_PROCESSING_SERVICE]
@ObjectModel.usageType: {sizeCategory: #XXL, serviceQuality: #C, dataClass: #MIXED}
@ObjectModel.semanticKey: ['RevenueAccountingContract']
@ObjectModel.text.control: #('ASSOCIATED_TEXT_UI_HIDDEN')
@Metadata.allowExtensions: true
define root view entity C_RAContrManualSpreadingTP
as select from I_RevenueAccountingContract as Contract
inner join P_RAContrWithTimeBasedPOB as ContractWithTimeBasedPob on Contract.RevenueAccountingContract = ContractWithTimeBasedPob.RevenueAccountingContract
left outer to one join P_RAContractWithAttribConflict as ContractWithAttribConflict on Contract.RevenueAccountingContract = ContractWithAttribConflict.RevenueAccountingContract
left outer to one join P_RAContrWithSpreadingConflict as ContractWithSpreadingConflict on Contract.RevenueAccountingContract = ContractWithSpreadingConflict.RevenueAccountingContract
composition [0..*] of C_RAPerfOblgnManualSpreadingTP as _PerformanceObligation
association [0..*] to I_RAContractStatusText as _RAContractStatusText on $projection.RevnAcctgContractStatus = _RAContractStatusText.RevnAcctgContractStatus
association [0..*] to I_AccountingPrincipleText as _AccountingPrincipleText on $projection.AccountingPrinciple = _AccountingPrincipleText.AccountingPrinciple
association [0..1] to I_UserContactCard as _CreatedByUserContactCard on $projection.RevnAcctgContractCreatedByUser = _CreatedByUserContactCard.ContactCardID
association [0..1] to I_UserContactCard as _LastChangedByContactCard on $projection.RAContractLastChangedByUsr = _LastChangedByContactCard.ContactCardID
{
@Consumption.semanticObject: 'RevenueAccountingContract'
key Contract.RevenueAccountingContract,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CompanyCodeStdVH',
element: 'CompanyCode' }
}]
@ObjectModel.text.element: ['CompanyCodeName']
Contract.CompanyCode,
Contract._CompanyCode.CompanyCodeName,
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_AccountingPrinciple',
element: 'AccountingPrinciple' }
}]
@ObjectModel.text.element: ['AccountingPrincipleName']
Contract.AccountingPrinciple,
Contract._AccountingPrinciple._Text[1:Language=$session.system_language].AccountingPrincipleName,
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
@Consumption.semanticObject: 'BusinessPartner'
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BusinessPartnerVH',
element: 'BusinessPartner' }
}]
@ObjectModel.text.element: ['BusinessPartnerName']
Contract.BusinessPartner,
Contract._BusinessPartner.BusinessPartnerName,
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
@Consumption.semanticObject: 'Customer'
@Consumption.valueHelpDefinition: [
{ entity: { name: 'D_CustomerCVH',
element: 'Customer' }
}]
@ObjectModel.text.element: ['CustomerName']
Contract.Customer,
Contract._Customer.CustomerName,
@Semantics.amount.currencyCode: 'SalesDocumentCurrency'
Contract.TotContractualPrcInSlsDocCrcy,
@Semantics.amount.currencyCode: 'SalesDocumentCurrency'
@Consumption.filter.hidden: true
Contract.AllocEffctAmountInSalesDocCrcy,
Contract.RAContractHasAllocationEffect,
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
Contract.SalesDocumentCurrency,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAContractStatusVH',
element: 'RevnAcctgContractStatus' }
}]
@ObjectModel.text.element: ['RevnAcctgContractStatusName']
Contract.RevnAcctgContractStatus,
@Semantics.text: true
@Consumption.filter.hidden: true
Contract._RAContractStatus._Text[1:Language=$session.system_language].RevnAcctgContractStatusName,
@Consumption.filter.hidden: true
case
when Contract.RevnAcctgContractStatus = 'C' then 3 -- 'Completed' | 3: green colour
when Contract.RevnAcctgContractStatus = 'R' then 2 -- 'Pending' | 2: yellow colour
else 0 -- 'In Process' | 0: neutral colour
-- Not used here | 0: unknown
end as RAContractStatusCriticality,
Contract.RAContractIsCreatedByContrMgr,
Contract.RAContractLastSavedDateTime,
@Consumption.filter.selectionType: #INTERVAL
Contract.RevnAcctgContractCreationDate,
@ObjectModel.text.element: ['CreatedByUserDescription']
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAContractCreatedByUserVH',
element: 'RevnAcctgContractCreatedByUser' }
}]
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
@Semantics.user.createdBy: true
Contract.RevnAcctgContractCreatedByUser,
@ObjectModel.text.element: ['LastChangedByUserDescription']
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_RAContractChangedByUserVH',
element: 'RAContractLastChangedByUsr' }
}]
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
@Semantics.user.lastChangedBy: true
Contract.RAContractLastChangedByUsr,
@Semantics.text: true
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
Contract._CreatedByUser.UserDescription as CreatedByUserDescription,
@Semantics.text: true
Contract._ChangedByUser.UserDescription as LastChangedByUserDescription,
@Semantics.systemDate.lastChangedAt: true
@Consumption.filter.selectionType: #INTERVAL
Contract.RAContractLastChangeDate,
Contract.IsBusinessPurposeCompleted,
Contract.RAContrHasMnlPrcAllocConflict,
cast (coalesce(ContractWithAttribConflict.RAAttributeHasConflict, '') as farr_attr_conflict preserving type ) as RAAttributeHasConflict,
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.7
}
@Consumption.valueHelpDefinition: [
{ entity: { name: 'C_SalesOrganizationVH',
element: 'SalesOrganization' }
}]
@ObjectModel.text.element: ['SalesOrganizationName']
Contract.RevnAcctgSalesOrganization,
@Semantics.text: true
Contract._SalesOrganization._Text[1:Language=$session.system_language].SalesOrganizationName,
cast (coalesce(ContractWithSpreadingConflict.PerfOblgnHasSprdgConflict, '') as farr_spread_conflict preserving type ) as PerfOblgnHasSprdgConflict,
Contract.RAContractIsSoftDeleted,
// @EndUserText.label: 'Universal Revenue Contract'
@Consumption.filter.hidden: true
Contract.RAContractIsUniversal,
Contract.RAContractHasAssetsImpairment,
/* Association */
@ObjectModel.filter.enabled: false
@Consumption.filter.hidden: true
_PerformanceObligation,
_RAContractStatusText,
_AccountingPrincipleText,
_CreatedByUserContactCard,
_LastChangedByContactCard,
Contract._Customer,
Contract._SalesOrganization,
@Consumption.filter.hidden: true
Contract._AccountingPrinciple,
Contract._CompanyCode,
Contract._BusinessPartner
}
where
Contract.RAContractIsSoftDeleted = ''
and Contract.RAContractIsCreatedByContrMgr = 'X'
and Contract.RAContractHasAssetsImpairment <> 'X'