R_CADOCBPITEMBUSLOCKSNAPSHOTTP

CDS View

Business Locks Snapshot - TP

R_CADOCBPITEMBUSLOCKSNAPSHOTTP is a CDS View in S/4HANA. Business Locks Snapshot - TP. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
C_CAClearingLockAnalysis view_entity from CONSUMPTION
C_CADunningLockAnalysis view_entity from CONSUMPTION Analyze Dunning Locks Version2
C_CAPaymentLockAnalysis view_entity from CONSUMPTION Payment Lock Analysis
@EndUserText.label: 'Business Locks Snapshot - TP'
@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.authorizationCheck: #MANDATORY

@Aggregation.allowPrecisionLoss: true

define view entity R_CADocBPItemBusLockSnapshotTP
  with parameters
    P_DisplayCurrency : waers_kk
  as select from           I_CADocBPItemBusLockSnapshot
    left outer to one join P_CABPTotalAmounts3 (P_DisplayCurrency: $parameters.P_DisplayCurrency) as _TotalAmounts on I_CADocBPItemBusLockSnapshot.BusinessPartner = _TotalAmounts.BusinessPartner

  association [1..1] to I_BusinessPartner              as _BusinessPartner           on  $projection.BusinessPartner = _BusinessPartner.BusinessPartner
  association [1..1] to I_CABusinessLockObjCategory    as _CABusinessLockObjCategory on  $projection.CABusinessLockObjectCategory = _CABusinessLockObjCategory.CABusinessLockObjectCategory
  association [1..1] to I_CABusinessLockObjectLevel    as _CABusinessLockObjectLevel on  $projection.CABusinessLockObjectLevel = _CABusinessLockObjectLevel.CABusinessLockObjectLevel
  association [1..1] to I_ContractAccountCategory      as _ContractAccountCategory   on  $projection.ContractAccountCategory = _ContractAccountCategory.ContractAccountCategory
                                                                                     and $projection.CAApplicationArea       = _ContractAccountCategory.CAApplicationArea
  association [1..1] to I_CABusinessProcess            as _CABusinessProcess         on  $projection.CABusinessProcess = _CABusinessProcess.CABusinessProcess
  association [1..1] to I_ContractAccountPartner       as _CAPartner                 on  $projection.BusinessPartner = _CAPartner.BusinessPartner
                                                                                     and $projection.ContractAccount = _CAPartner.ContractAccount
  association [1..1] to I_CASubApplication             as _CASubApplication          on  $projection.CASubApplication = _CASubApplication.CASubApplication
  association [1..1] to I_CAMainTransaction            as _CAMainTransaction         on  $projection.CAMainTransaction = _CAMainTransaction.CAMainTransaction
                                                                                     and $projection.CAApplicationArea = _CAMainTransaction.CAApplicationArea

  association [1..1] to I_CASubTransaction             as _SubTransaction            on  $projection.CAMainTransaction = _SubTransaction.CAMainTransaction
                                                                                     and $projection.CASubTransaction  = _SubTransaction.CASubTransaction
                                                                                     and $projection.CAApplicationArea = _SubTransaction.CAApplicationArea

  association [1..1] to I_CompanyCode                  as _CompCode                  on  $projection.CompanyCode = _CompCode.CompanyCode

  association [0..1] to I_CABusPartLastWorklistItem    as _LastWorklistItem          on  $projection.BusinessPartner             = _LastWorklistItem.BusinessPartner
                                                                                     and $projection.CAFioriApplication          = _LastWorklistItem.CAFioriApplication
                                                                                     and $projection.CADocumentBPItemPyblRblCode = _LastWorklistItem.CADocumentBPItemPyblRblCode

  association [0..1] to I_CAPayableReceivableCode      as _PayableReceivable         on  $projection.CADocumentBPItemPyblRblCode = _PayableReceivable.CADocumentBPItemPyblRblCode

  association [0..1] to I_CACalendarMonth              as _ValidFromMonth            on  $projection.CABusLockValidFromDateMonth = _ValidFromMonth.CalendarMonth
  association [0..1] to I_CACalendarMonth              as _ValidToMonth              on  $projection.CABusLockValidToDateMonth = _ValidToMonth.CalendarMonth
  association [0..1] to I_CACalendarMonth              as _LastChangeMonth           on  $projection.LastChangeDateMonth = _LastChangeMonth.CalendarMonth

{
  key     I_CADocBPItemBusLockSnapshot.CAFioriApplication,
  key     I_CADocBPItemBusLockSnapshot.CABusinessLockSnapshotDateTime,
  key     I_CADocBPItemBusLockSnapshot.CADocumentNumber,
  key     I_CADocBPItemBusLockSnapshot.CARepetitionItemNumber,
  key     I_CADocBPItemBusLockSnapshot.CABPItemNumber,
  key     I_CADocBPItemBusLockSnapshot.CASubItemNumber,

          dats_days_between(cast(substring
            (cast(I_CADocBPItemBusLockSnapshot.CABusinessLockSnapshotDateTime as abap.sstring( 20 )), 1, 8) as abap.dats(8)), $session.system_date) as DifferenceInDays,
          I_CADocBPItemBusLockSnapshot.CAApplicationArea,
          I_CADocBPItemBusLockSnapshot.CABusinessLockObject,
          I_CADocBPItemBusLockSnapshot.CABusinessLockObjectLevel,
          I_CADocBPItemBusLockSnapshot.CABusinessProcess,
          _CABusinessProcess._Text[1: Language=$session.system_language].CABusinessProcessName,
          I_CADocBPItemBusLockSnapshot.CABusinessLockValidFromDate,
          I_CADocBPItemBusLockSnapshot.CABusinessLockValidToDate,
          I_CADocBPItemBusLockSnapshot.CABusinessLockDuration,
          I_CADocBPItemBusLockSnapshot.BusinessPartner,
          _BusinessPartner.BusinessPartnerFullName,
          I_CADocBPItemBusLockSnapshot.ContractAccount,
          _CAPartner.ContractAccountName,
          I_CADocBPItemBusLockSnapshot.CAContract,
          I_CADocBPItemBusLockSnapshot.CAProviderContractItemNumber,
          I_CADocBPItemBusLockSnapshot.CAProviderContractItemUUID,
          I_CADocBPItemBusLockSnapshot.CASubApplication,
          _CASubApplication._CASubApplicationText[1: Language=$session.system_language].CASubApplicationText,
          I_CADocBPItemBusLockSnapshot.CABusinessLockObjectCategory,
          cast( case 
                   when I_CADocBPItemBusLockSnapshot.ItemIsLockedForMultipleReasons = 'X'
                      then 
                      'ML'
                   when I_CADocBPItemBusLockSnapshot.ItemIsLockedForMultipleReasons <> 'X'
                     then I_CADocBPItemBusLockSnapshot.CABusinessLockReason
                  end as lockrenh_kk preserving type )                                                                                             as CABusinessLockReasonEnhanced,
          I_CADocBPItemBusLockSnapshot.ContractAccountCategory,
          _ContractAccountCategory._Text[1: Language=$session.system_language].ContractAccountCategoryName,
          _CABusinessLockObjCategory._Text[1: Language=$session.system_language].CABusinessLockObjectCatName,
          _CABusinessLockObjectLevel._Text[1: Language=$session.system_language].CABusinessLockObjectLevelText,
          I_CADocBPItemBusLockSnapshot.CreationDate,
          I_CADocBPItemBusLockSnapshot.CABusLockNumberOfExtensions,
          I_CADocBPItemBusLockSnapshot.CompanyCode,
          _CompCode.CompanyCodeName,
          I_CADocBPItemBusLockSnapshot.BusinessArea,
          I_CADocBPItemBusLockSnapshot.Segment,
          I_CADocBPItemBusLockSnapshot.Division,
          I_CADocBPItemBusLockSnapshot.CAMainTransaction,
          _CAMainTransaction._Text[1: Language=$session.system_language].CAMainTransactionName,
          I_CADocBPItemBusLockSnapshot.CASubTransaction,
          _SubTransaction._Text[1: Language=$session.system_language].CASubTransactionName,
          I_CADocBPItemBusLockSnapshot.CAAmountInTransactionCurrency,
          @Semantics.amount.currencyCode: 'DisplayCurrency'
          currency_conversion( amount => I_CADocBPItemBusLockSnapshot.CAAmountInTransactionCurrency,
                      source_currency => I_CADocBPItemBusLockSnapshot.TransactionCurrency,
                      round =>  'X',
                      target_currency => $parameters.P_DisplayCurrency,
                      exchange_rate_date => $session.system_date,
                      error_handling => 'FAIL_ON_ERROR' )                                                                                           as AmountInDisplayCurrency,
          $parameters.P_DisplayCurrency                                                                                                             as DisplayCurrency,
          I_CADocBPItemBusLockSnapshot.TransactionCurrency,
          I_CADocBPItemBusLockSnapshot.CABusLockValidFromDateYearMnth,
          I_CADocBPItemBusLockSnapshot.CABusLockValidFromDateYear,
          I_CADocBPItemBusLockSnapshot.CABusLockValidFromDateYearWeek,
          I_CADocBPItemBusLockSnapshot.CABusLockValidFromDateYearQtr,
          cast(right(I_CADocBPItemBusLockSnapshot.CABusLockValidFromDateYearMnth,2) as calendarmonth)                                               as CABusLockValidFromDateMonth,
          I_CADocBPItemBusLockSnapshot.CABusLockValidToDateYearMonth,
          I_CADocBPItemBusLockSnapshot.CABusLockValidToDateYear,
          I_CADocBPItemBusLockSnapshot.CABusLockValidToDateYearWeek,
          I_CADocBPItemBusLockSnapshot.CABusLockValidToDateYearQtr,
          cast(right(I_CADocBPItemBusLockSnapshot.CABusLockValidToDateYearMonth,2) as calendarmonth)                                                as CABusLockValidToDateMonth,
          I_CADocBPItemBusLockSnapshot.LastChangeDateYearMonth,
          I_CADocBPItemBusLockSnapshot.LastChangeDateYear,
          I_CADocBPItemBusLockSnapshot.LastChangeDateYearWeek,
          I_CADocBPItemBusLockSnapshot.LastChangeDateYearQuarter,
          I_CADocBPItemBusLockSnapshot.CABusinessLockDurationInWeeks,
          I_CADocBPItemBusLockSnapshot.CABusinessLockDurationInMonths,
          I_CADocBPItemBusLockSnapshot.CABusinessLockDurationInQtrs,
          I_CADocBPItemBusLockSnapshot.CABusinessLockDurationInYears,
          cast(right(I_CADocBPItemBusLockSnapshot.LastChangeDateYearMonth,2) as calendarmonth)                                                      as LastChangeDateMonth,

          I_CADocBPItemBusLockSnapshot.CAProviderContractAuthznGroup,

          cast(1 as abap.int4)                                                                                                                      as NumberOfCABusLockSnpshtBPItems,

          @ObjectModel.foreignKey.association: '_PayableReceivable'
          cast( case
            when I_CADocBPItemBusLockSnapshot.CAAmountInTransactionCurrency > 00
              then 'R'
              else 'P'
            end as recvbl_paybl_indicator_kk )                                                                                                      as CADocumentBPItemPyblRblCode,

          @Semantics.amount.currencyCode: 'DisplayCurrency'
          _TotalAmounts.BPBalanceAmountInDC,
          @Semantics.amount.currencyCode: 'DisplayCurrency'
          _TotalAmounts.BPCreditAmountInDC,
          @Semantics.amount.currencyCode: 'DisplayCurrency'
          _TotalAmounts.BPDebitAmountInDC,


          _BusinessPartner,
          _CABusinessLockObjCategory,
          _CABusinessLockObjectLevel,
          _ContractAccountCategory,
          _CABusinessProcess,
          _CAPartner,
          _CASubApplication,
          _CAMainTransaction,
          _SubTransaction,
          _CompCode,
          _PayableReceivable,
          _LastWorklistItem,
          _ValidFromMonth,
          _ValidToMonth,
          _LastChangeMonth


}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNER",
"I_CABUSINESSLOCKOBJCATEGORY",
"I_CABUSINESSLOCKOBJCATEGORYT",
"I_CABUSINESSLOCKOBJECTLEVEL",
"I_CABUSINESSLOCKOBJECTLEVELTXT",
"I_CABUSINESSPROCESS",
"I_CABUSINESSPROCESSTEXT",
"I_CADOCBPITEMBUSLOCKSNAPSHOT",
"I_CAMAINTRANSACTION",
"I_CAMAINTRANSACTIONTEXT",
"I_CASUBAPPLICATION",
"I_CASUBAPPLICATIONTEXT",
"I_CASUBTRANSACTION",
"I_CASUBTRANSACTIONTEXT",
"I_COMPANYCODE",
"I_CONTRACTACCOUNTCATEGORY",
"I_CONTRACTACCOUNTCATEGORYTEXT",
"I_CONTRACTACCOUNTPARTNER",
"P_CABPTOTALAMOUNTS3"
],
"ASSOCIATED":
[
"I_BUSINESSPARTNER",
"I_CABUSINESSLOCKOBJCATEGORY",
"I_CABUSINESSLOCKOBJECTLEVEL",
"I_CABUSINESSPROCESS",
"I_CABUSPARTLASTWORKLISTITEM",
"I_CACALENDARMONTH",
"I_CAMAINTRANSACTION",
"I_CAPAYABLERECEIVABLECODE",
"I_CASUBAPPLICATION",
"I_CASUBTRANSACTION",
"I_COMPANYCODE",
"I_CONTRACTACCOUNTCATEGORY",
"I_CONTRACTACCOUNTPARTNER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/