I_ARLOCKBOXBATCH

CDS View

Lock Box Batch Header Data

I_ARLOCKBOXBATCH is a CDS View in S/4HANA. Lock Box Batch Header Data. It contains 3 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
C_ARLockBoxBatch view_entity from CONSUMPTION Manage Lockbox Batch
C_LockboxBatchItemWorklist view left_outer CONSUMPTION View for Worklist of Lockbox items
R_ARLockboxBatchTP view_entity from TRANSACTIONAL Lockbox Batch

Fields (3)

KeyField CDS FieldsUsed in Views
KEY LockboxBatch LockboxBatch 1
KEY LockboxBatchInternalKey LockboxBatchInternalKey 1
BankName BankName 1
@EndUserText.label: 'Lock Box Batch Header Data' 
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED //only company data

@Search.searchable: true
@ObjectModel.usageType.sizeCategory: #XL 
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED

define view entity I_ARLockBoxBatch 

 // as select from P_Arlockboxbatch as  hdr 

  as select from P_Arlockboxbatch as hdr 
  // select status description from fix values of the domain FAR_ASTAT

  left outer join dd07t            on dd07t.domvalue_l = hdr.LockboxBatchStatus
                                   and dd07t.domname = 'FAR_ASTAT'
                                   and dd07t.ddlanguage = $session.system_language    
                                   
  left outer join P_Arlockboxbatchlatest as latestbatch
                                   on hdr.LockboxBatchInternalKey = latestbatch.LockboxBatchInternalKey
                                   and hdr.Lockbox                = latestbatch.Lockbox
                                   and hdr.LockboxBatch           = latestbatch.LockboxBatch

//Value Help for Company Code                       

  association [0..1] to I_CompanyCode as _Company     on _Company.CompanyCode = $projection.CompanyCode 
                
  association [0..1] to I_Currency    as _Currency    on _Currency.Currency   = $projection.Currency
//Value Help for House Bank  

  association [0..1] to I_Housebank   as _Housebank   on _Housebank.CompanyCode = $projection.CompanyCode
                                                      and _Housebank.HouseBank   = $projection.HouseBank
//Value Help for Lockbox Number                                                      

  association [0..1] to I_ARLockbox     as _Lockbox   on  _Lockbox.CompanyCode = $projection.CompanyCode
                                                      and _Lockbox.HouseBank   = $projection.HouseBank
                                                      and _Lockbox.HouseBankAccount   = $projection.HouseBankAccount
                                                      and _Lockbox.Lockbox   = $projection.Lockbox
  
  -- Association with Lockbox Items    
  association [0..*] to I_ARLockBoxBatchItem as _Item
                                                      on  $projection.LockboxBatchInternalKey   = _Item.LockboxBatchInternalKey
                                                      and $projection.LockboxBatch   = _Item.LockboxBatch   
   association [0..*] to I_IncomingPaymentFileLine as _IncomingPaymentFileLine on _IncomingPaymentFileLine.BankStatementShortID = $projection.LockboxBatchInternalKey
 
  {
   
   key hdr.LockboxBatchInternalKey,
    
   key cast(hdr.LockboxBatch as batch_eb)                              as LockboxBatch,
   substring(hdr.SendingBank,  1, 10 )                                 as LockboxBatchDestination,
   substring(hdr.SendingBank, 12, 10 )                                 as LockboxBatchOrigin, // why is there a space in sending bank??

   cast(hdr.Lockbox as far_lbnum)                                      as Lockbox,
   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.8 
   @Search.ranking: #HIGH
   hdr.CompanyCode,
   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.8
   @Search.ranking: #HIGH   
   cast(hdr.HouseBank as farp_hbkid)                                       as HouseBank,
   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.8   
   cast(hdr.HouseBankAccount as fac_hktid)                                 as HouseBankAccount,   
   cast(hdr.DepositDate as far_azdat)                                      as DepositDate, 
   cast(hdr.DepositTime as far_aztim)                                      as DepositTime,
   cast ( cast(hdr.NumberOfItems as abap.int2) as far_chect_anzes )        as NumberOfItems,   
   hdr.Currency,
   @DefaultAggregation: #NONE    
   @Semantics.amount.currencyCode: 'Currency'   
   cast(hdr.AmountInTransactionCurrency   as farp_fwbtr)                   as AmountInTransactionCurrency,   
   cast(hdr.NumberOfIncompleteCheques as far_eperl_anzes)                  as NumberOfIncompleteCheques,                              
   _IncomingPaymentFileLine.IncomingPaymentFile  as IncomingPaymentFile, //no cardinality problem: only 1 File per kukey

   cast (hdr.LockboxBatchStatus as farp_batch_status)                      as LockboxBatchStatus,                          
   cast (dd07t.ddtext as far_lb_stat_desc)                             as LockboxBatchStatusName,

   cast (         
    case when latestbatch.LockboxBatch is not null
        then 'X' 
        else ' ' end                             as far_islatestlb)    as BatchIsLatest,
//   @UI.hidden: true

   _Company,
//   @UI.hidden: true

   _Currency,
//   @UI.hidden: true

   _Item,
//   @UI.hidden: true

   _Housebank,
//   @UI.hidden: true

   _Lockbox,
   hdr.BankAccount,
   hdr.BankAccountInternalID,
   hdr.BankAccountHolderName,
   hdr.BankAccountAdditionalName,
   hdr.BankAccountType,
   hdr.BankName,
   hdr.ChartOfAccounts,
   hdr.CreatedByUser,
   hdr.GLAccount,
   hdr.InterestRateInPercent,
   hdr.BankAccountReferenceText,
   hdr.BankStatementImportDate,                         
   hdr.BankStatementImportTime
   
  }