@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@OData.entitySet.name: 'C_CAClearingLockAnalysis'
@ObjectModel: {
usageType.serviceQuality: #D,
usageType.sizeCategory: #XXL,
usageType.dataClass: #MIXED
}
@VDM.viewType: #CONSUMPTION
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@Metadata.allowExtensions: true
define view entity C_CAClearingLockAnalysis
with parameters
@EndUserText.label: 'Display Currency'
@Consumption.valueHelpDefinition: [{entity: { name: 'I_CurrencyStdVH', element: 'Currency' }}]
P_DisplayCurrency : waers_kk
as select from R_CADocBPItemBusLockSnapshotTP( P_DisplayCurrency:$parameters.P_DisplayCurrency)
association [1..1] to I_CABusinessLockReasonEnhanced as _CABusinessLockReason on $projection.CABusinessLockReasonEnhanced = _CABusinessLockReason.CABusinessLockReasonEnhanced
and $projection.CABusinessProcess = _CABusinessLockReason.CABusinessProcess
association [0..1] to I_CAProviderContractHeader as _ProviderContract on $projection.CASubApplication = 'P'
and $projection.CAContract = _ProviderContract.CAProviderContract
{
key CAFioriApplication,
key CABusinessLockSnapshotDateTime,
key CADocumentNumber,
key CARepetitionItemNumber,
key CABPItemNumber,
key CASubItemNumber,
@Aggregation.default: #SUM
@EndUserText.label: 'Number of Items'
NumberOfCABusLockSnpshtBPItems,
// Payable or Receivable
@EndUserText.label: 'Variant'
@Consumption.filter.mandatory: true
@Consumption.filter.selectionType: #SINGLE
@Consumption.valueHelpDefinition: [{entity: { name: 'I_CAPayableReceivableCodeVH', element: 'CADocumentBPItemPyblRblCode' }}]
CADocumentBPItemPyblRblCode,
//field for snapshot KPI
@Semantics.durationInDays: true
cast(DifferenceInDays as abap.int4) as CABusinessLockSnapshotStatus,
@EndUserText.label: 'Lock Reason'
@ObjectModel: { text.element: [ 'CABusinessLockReasonName' ]}
CABusinessLockReasonEnhanced,
@Semantics.text: true
_CABusinessLockReason._Text[1:Language = $session.system_language].CABusinessLockReasonName,
@EndUserText.label: 'Business Partner'
@ObjectModel: { text.element: [ 'BusinessPartnerFullName' ]}
@Semantics: { contact.type: #PERSON }
BusinessPartner,
@Semantics.text: true
BusinessPartnerFullName,
@EndUserText.label: 'Created On'
CreationDate,
@EndUserText.label: 'Total Duration in Days'
CABusinessLockDuration,
@EndUserText.label: 'Expiration Date'
CABusinessLockValidToDate,
@EndUserText.label: 'Start Date'
CABusinessLockValidFromDate,
@EndUserText.label: 'Lock Category'
@ObjectModel: { text.element: [ 'CABusinessLockObjectCatName' ]}
CABusinessLockObjectCategory,
CAApplicationArea,
CABusinessLockObject,
@ObjectModel: { text.element: [ 'CABusinessLockObjectLevelText' ]}
CABusinessLockObjectLevel,
@ObjectModel: { text.element: [ 'CABusinessProcessName' ]}
CABusinessProcess,
@Semantics.text: true
CABusinessProcessName,
@ObjectModel: { text.element: [ 'ContractAccountName' ]}
@EndUserText.label: 'Contract Account'
ContractAccount,
@Semantics.text: true
ContractAccountName,
@ObjectModel.text.element: [ 'CAProviderContractName' ]
CAContract,
@Semantics.text: true
cast(_ProviderContract.CAProviderContractName as vtref_text_gfn_kk preserving type ) as CAProviderContractName,
CAProviderContractItemNumber,
CAProviderContractItemUUID,
@ObjectModel: { text: { element: ['CASubApplicationText'] } }
CASubApplication,
@Semantics.text: true
cast(CASubApplicationText as subap_text_gfn_kk preserving type ) as CASubApplicationText,
@EndUserText.label: 'Contract Account Category'
@ObjectModel: { text.element: [ 'ContractAccountCategoryName' ]}
ContractAccountCategory,
@Semantics.text: true
CABusinessLockObjectCatName,
@Semantics.text: true
CABusinessLockObjectLevelText,
@EndUserText.label: 'Number of Extensions'
CABusLockNumberOfExtensions,
@ObjectModel: { text.element: [ 'CompanyCodeName' ]}
CompanyCode,
BusinessArea,
Segment,
Division,
@ObjectModel: { text.element: [ 'CAMainTransactionName' ]}
CAMainTransaction,
@ObjectModel: { text.element: [ 'CASubTransactionName' ]}
CASubTransaction,
@Semantics.amount.currencyCode: 'TransactionCurrency'
CAAmountInTransactionCurrency,
TransactionCurrency,
DisplayCurrency,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
@EndUserText.label: 'Amount'
@ObjectModel:{text.element:['DisplayCurrency']}
AmountInDisplayCurrency,
// Start Date
@EndUserText.label: 'Start Date in Years'
CABusLockValidFromDateYear,
@EndUserText.label: 'Start Date in Quaters'
@ObjectModel.text.element: ['CABusLockValFrmDteYearQtrName']
CABusLockValidFromDateYearQtr,
@Semantics.text: true
concat(
concat(
right(CABusLockValidFromDateYearQtr,1),
'/'),
ltrim(CABusLockValidFromDateYear,'0')) as CABusLockValFrmDteYearQtrName,
@EndUserText.label: 'Start Date in Months'
@ObjectModel.text.element: ['CABusLockValFrmDteYearMnthName']
CABusLockValidFromDateYearMnth,
@Semantics.text: true
concat_with_space(
_ValidFromMonth._ShortText[1:Language = $session.system_language].CalendarMonthShortName,
ltrim(CABusLockValidFromDateYear,'0'),
1) as CABusLockValFrmDteYearMnthName,
@EndUserText.label: 'Start Date in Weeks'
@ObjectModel.text.element: ['CABusLockValFrmDteYearWeekName']
CABusLockValidFromDateYearWeek,
@Semantics.text: true
concat(
concat(
right(CABusLockValidFromDateYearWeek,2),
'/'),
ltrim(CABusLockValidFromDateYear,'0')) as CABusLockValFrmDteYearWeekName,
//Expiration Date
@EndUserText.label: 'Expiration Date in Years'
CABusLockValidToDateYear,
@EndUserText.label: 'Expiration Date in Quaters'
@ObjectModel.text.element: ['CABusLockValToDteYearQtrName']
CABusLockValidToDateYearQtr,
@Semantics.text: true
concat(
concat(
right(CABusLockValidToDateYearQtr,1),
'/'),
ltrim(CABusLockValidToDateYear,'0')) as CABusLockValToDteYearQtrName,
@EndUserText.label: 'Expiration Date in Months'
@ObjectModel.text.element: ['CABusLockValToDteYearMnthName']
CABusLockValidToDateYearMonth,
@Semantics.text: true
concat_with_space(
_ValidToMonth._ShortText[1:Language = $session.system_language].CalendarMonthShortName,
ltrim(CABusLockValidToDateYear,'0'),
1) as CABusLockValToDteYearMnthName,
@EndUserText.label: 'Expiration Date in Weeks'
@ObjectModel.text.element: ['CABusLockValToDteYearWeekName']
CABusLockValidToDateYearWeek,
@Semantics.text: true
concat(
concat(
right(CABusLockValidToDateYearWeek,2),
'/'),
ltrim(CABusLockValidToDateYear,'0')) as CABusLockValToDteYearWeekName,
//Created On
@EndUserText.label: 'Created On in Years'
LastChangeDateYear,
@EndUserText.label: 'Created On in Quaters'
@ObjectModel.text.element: ['LastChangeDateYearQuarterName']
LastChangeDateYearQuarter,
@Semantics.text: true
concat(
concat(
right(LastChangeDateYearQuarter,1),
'/'),
ltrim(LastChangeDateYear,'0')) as LastChangeDateYearQuarterName,
@EndUserText.label: 'Created On in Months'
@ObjectModel.text.element: ['LastChangeDateYearMonthName']
LastChangeDateYearMonth,
@Semantics.text: true
concat_with_space(
_LastChangeMonth._ShortText[1:Language = $session.system_language].CalendarMonthShortName,
ltrim(LastChangeDateYear,'0'),
1) as LastChangeDateYearMonthName,
@EndUserText.label: 'Created On in Weeks'
@ObjectModel.text.element: ['LastChangeDateYearWeekName']
LastChangeDateYearWeek,
@Semantics.text: true
concat(
concat(
right(LastChangeDateYearWeek,2),
'/'),
ltrim(LastChangeDateYear,'0')) as LastChangeDateYearWeekName,
//Duration
CABusinessLockDurationInYears,
CABusinessLockDurationInQtrs,
CABusinessLockDurationInMonths,
CABusinessLockDurationInWeeks,
CAProviderContractAuthznGroup,
@Semantics.text: true
CAMainTransactionName,
@Semantics.text: true
CASubTransactionName,
@Semantics.text: true
ContractAccountCategoryName,
@Semantics.text: true
CompanyCodeName,
//Total Amounts
@Semantics.amount.currencyCode: 'DisplayCurrency'
@EndUserText.label: 'Credit Amount'
BPCreditAmountInDC,
@Semantics.amount.currencyCode: 'DisplayCurrency'
@EndUserText.label: 'Debit Amount'
BPDebitAmountInDC,
@Semantics.amount.currencyCode: 'DisplayCurrency'
@EndUserText.label: 'Current Balance'
BPBalanceAmountInDC,
@EndUserText.label: 'Last Worklist Item Status'
@EndUserText.quickInfo: ''
@ObjectModel.text.element: ['CAClrfctnStatusName']
_LastWorklistItem.CAClrfctnStatus,
@Semantics.text: true
_LastWorklistItem._Status._Text[1:Language = $session.system_language].CAClrfctnStatusName,
@EndUserText.label: 'Last Worklist Item Created At'
@EndUserText.quickInfo: ''
@Semantics.dateTime: true
_LastWorklistItem.CreationDateTime as CAWorklistItemCreationDateTime,
_BusinessPartner,
_CABusinessLockObjCategory,
_CABusinessLockReason,
_ContractAccountCategory,
_CABusinessProcess,
_CAPartner,
_CASubApplication,
_CAMainTransaction,
_SubTransaction,
_CompCode,
_LastWorklistItem._Status as _WorklistStatus,
_CABusinessLockObjectLevel
}
where
(
CAFioriApplication = 'F1653A'
)