I_PaymentAdvice

DDL: I_PAYMENTADVICE SQL: IPAYTADVC Type: view BASIC Package: ODATA_PAYMENTADVICES

Payment Advice Header

I_PaymentAdvice is a Basic CDS View that provides data about "Payment Advice Header" in SAP S/4HANA. It reads from 1 data source (avik) and exposes 57 fields with key fields CompanyCode, PaymentAdviceAccountType, PaymentAdviceAccount, PaymentAdvice. It has 12 associations to related views. Part of development package ODATA_PAYMENTADVICES.

Data Sources (1)

SourceAliasJoin Type
avik avik from

Associations (12)

CardinalityTargetAliasCondition
[0..1] I_UserContactCard _UserContactCard $projection.CreatedByUser = _UserContactCard.ContactCardID
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Currency _Currency $projection.PaymentCurrency = _Currency.Currency
[1..1] I_ReasonCodeConversionVers _PaytAdvcDiffDeterminationRule $projection.PaytAdvcDiffDeterminationRule = _PaytAdvcDiffDeterminationRule.PaytAdvcDiffDeterminationRule
[1..1] I_PaytAdviceSelRules _PaytAdviceSelRules $projection.PaymentAdviceSelectionRule = _PaytAdviceSelRules.PaymentAdviceSelectionRule
[1..1] I_PaymentAdviceType _PaymentAdviceType $projection.PaymentAdviceType = _PaymentAdviceType.PaymentAdviceType
[1..*] I_PaymentAdviceItem _PaymentAdviceItem $projection.CompanyCode = _PaymentAdviceItem.CompanyCode and $projection.PaymentAdviceAccountType = _PaymentAdviceItem.PaymentAdviceAccountType and $projection.PaymentAdviceAccount = _PaymentAdviceItem.PaymentAdviceAccount and $projection.PaymentAdvice = _PaymentAdviceItem.PaymentAdvice
[0..1] I_Customer _Customer $projection.PaymentAdviceAccount = _Customer.Customer
[1..1] I_CustomerCompany _CustomerCompany $projection.PaymentAdviceAccount = _CustomerCompany.Customer and $projection.CompanyCode = _CustomerCompany.CompanyCode
[0..1] I_Supplier _Supplier $projection.PaymentAdviceAccount = _Supplier.Supplier
[1..1] I_SupplierCompany _SupplierCompany $projection.PaymentAdviceAccount = _SupplierCompany.Supplier and $projection.CompanyCode = _SupplierCompany.CompanyCode
[0..1] I_BusinessPartner _BusinessPartner $projection.PaymentAdviceAccount = _BusinessPartner.BusinessPartner and $projection.PaymentAdviceAccountType = 'G'

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IPAYTADVC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Payment Advice Header view
VDM.viewType #BASIC view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (57)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode bukrs
KEY PaymentAdviceAccountType koart
KEY PaymentAdviceAccount konto
KEY PaymentAdvice
IsOutgoingPayment xausg
PaymentDocument
AccountByShipper
PaymentCurrency
PaymentDate
PaidAmountInPaytCurrency rwbtr
CashDiscountAmountInPaytCrcy
BillOfExchangeDueDate wefae
PaymentMethod rzawe
PartnerBank
PartnerBankAccount
PartnerBankCountry zbnks
PartnerBankSWIFTCode zbswi
CreatedByUser ernam
CreationDate erdat
LastChangeDate aedat
LastChangeDateTime lastchangedatetime
LastChangedByUser aenam
PaymentAdviceHeaderText
PaymentAdviceType avsrt
CreationTime cputm
PaymentAdviceStatus astat
PaymentAdviceIsHeld xkeep
PaymentAdviceHasSingleAccount xuniq
PaytAdvcDiffDeterminationRule
PaymentAdviceSelectionRule sregl
OriginalReferenceDocument xbenr
ReferenceDocumentType xbtyp
BankReference vgref
BankPostingDate bvdat
ValueDateTime butim
FeeAmountInTransactionCrcy spesk
PaymentTransaction vorgc
ExchangeRate
BillOfExchangeFailureDate jpdat
Cheque chect
ValueDate valut
BusinessPartnerName zbprn
CAPaymentDocument fica_apbel
ContractAccount fica_vkont
CAPaymentAdvice fica_avkey
_PaymentAdviceItem _PaymentAdviceItem
_CompanyCode _CompanyCode
_Currency _Currency
_PaytAdvcDiffDeterminationRule _PaytAdvcDiffDeterminationRule
_PaytAdviceSelRules _PaytAdviceSelRules
_UserContactCard _UserContactCard
_PaymentAdviceType _PaymentAdviceType
_Customer _Customer
_CustomerCompany _CustomerCompany
_Supplier _Supplier
_SupplierCompany _SupplierCompany
_BusinessPartner _BusinessPartner
@AbapCatalog.sqlViewName: 'IPAYTADVC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true

@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.privilegedAssociations: [ '_UserContactCard' ]

@EndUserText.label: 'Payment Advice Header'

@VDM.viewType: #BASIC

@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.supportedCapabilities: [ #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE ]
@ObjectModel.modelingPattern: [ #NONE ]

@ClientHandling.algorithm: #SESSION_VARIABLE

@Metadata.ignorePropagatedAnnotations: true

define view I_PaymentAdvice
  as select from avik

  association [0..1] to I_UserContactCard          as _UserContactCard               on  $projection.CreatedByUser = _UserContactCard.ContactCardID

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

  association [0..1] to I_Currency                 as _Currency                      on  $projection.PaymentCurrency = _Currency.Currency

  association [1..1] to I_ReasonCodeConversionVers as _PaytAdvcDiffDeterminationRule on  $projection.PaytAdvcDiffDeterminationRule = _PaytAdvcDiffDeterminationRule.PaytAdvcDiffDeterminationRule

  association [1..1] to I_PaytAdviceSelRules       as _PaytAdviceSelRules            on  $projection.PaymentAdviceSelectionRule = _PaytAdviceSelRules.PaymentAdviceSelectionRule

  association [1..1] to I_PaymentAdviceType        as _PaymentAdviceType             on  $projection.PaymentAdviceType = _PaymentAdviceType.PaymentAdviceType

  association [1..*] to I_PaymentAdviceItem        as _PaymentAdviceItem             on  $projection.CompanyCode              = _PaymentAdviceItem.CompanyCode
                                                                                     and $projection.PaymentAdviceAccountType = _PaymentAdviceItem.PaymentAdviceAccountType
                                                                                     and $projection.PaymentAdviceAccount     = _PaymentAdviceItem.PaymentAdviceAccount
                                                                                     and $projection.PaymentAdvice            = _PaymentAdviceItem.PaymentAdvice

  association [0..1] to I_Customer                 as _Customer                      on  $projection.PaymentAdviceAccount = _Customer.Customer

  association [1..1] to I_CustomerCompany          as _CustomerCompany               on  $projection.PaymentAdviceAccount = _CustomerCompany.Customer
                                                                                     and $projection.CompanyCode          = _CustomerCompany.CompanyCode

  association [0..1] to I_Supplier                 as _Supplier                      on  $projection.PaymentAdviceAccount = _Supplier.Supplier

  association [1..1] to I_SupplierCompany          as _SupplierCompany               on  $projection.PaymentAdviceAccount = _SupplierCompany.Supplier
                                                                                     and $projection.CompanyCode          = _SupplierCompany.CompanyCode
                                                                                     
  association [0..1] to I_BusinessPartner          as _BusinessPartner               on  $projection.PaymentAdviceAccount = _BusinessPartner.BusinessPartner
                                                                                     and  $projection.PaymentAdviceAccountType = 'G'                                                                                    

{
      @ObjectModel.foreignKey.association: '_CompanyCode'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'I_PaytAdviceCompanyCodeVH', element : 'CompanyCode' } }]
  key bukrs                                             as CompanyCode,
  key koart                                             as PaymentAdviceAccountType,
  key konto                                             as PaymentAdviceAccount,
  key cast(avsid as farp_pa_avsid preserving type)      as PaymentAdvice,
      xausg                                             as IsOutgoingPayment,
      cast(vblnr as farp_pa_vblnr preserving type)      as PaymentDocument,
      cast(eikto as farp_pa_eikto preserving type)      as AccountByShipper,
      @ObjectModel.foreignKey.association: '_Currency'
      @Semantics.currencyCode: true
      cast(waers as farp_fwaer preserving type)         as PaymentCurrency,
      cast(zaldt as farp_payment_date preserving type)  as PaymentDate,
      @Semantics.amount.currencyCode: 'PaymentCurrency'
      rwbtr                                             as PaidAmountInPaytCurrency,
      @Semantics.amount.currencyCode: 'PaymentCurrency'
      cast(rwskt as fis_wskto)                          as CashDiscountAmountInPaytCrcy,
      wefae                                             as BillOfExchangeDueDate,
      rzawe                                             as PaymentMethod,
      cast(zbnkl as farp_pa_dzbnkl preserving type)     as PartnerBank,
      cast(zbnkn as farp_pa_dzbnkn preserving type)     as PartnerBankAccount,
      zbnks                                             as PartnerBankCountry,
      zbswi                                             as PartnerBankSWIFTCode,
      @ObjectModel.foreignKey.association: '_UserContactCard'
      ernam                                             as CreatedByUser,
      erdat                                             as CreationDate,
      aedat                                             as LastChangeDate,
      lastchangedatetime                                as LastChangeDateTime,
      aenam                                             as LastChangedByUser,
      cast(avtxt as farp_avtxt_avik preserving type)    as PaymentAdviceHeaderText,
      @ObjectModel.foreignKey.association: '_PaymentAdviceType'
      avsrt                                             as PaymentAdviceType,
      cputm                                             as CreationTime,
      astat                                             as PaymentAdviceStatus,
      xkeep                                             as PaymentAdviceIsHeld,
      xuniq                                             as PaymentAdviceHasSingleAccount,
      @ObjectModel.foreignKey.association: '_PaytAdvcDiffDeterminationRule'
      cast(vrsdg as farp_vrsdg preserving type)         as PaytAdvcDiffDeterminationRule,
      @ObjectModel.foreignKey.association: '_PaytAdviceSelRules'
      sregl                                             as PaymentAdviceSelectionRule,
      xbenr                                             as OriginalReferenceDocument,
      xbtyp                                             as ReferenceDocumentType,
      vgref                                             as BankReference,
      bvdat                                             as BankPostingDate,
      butim                                             as ValueDateTime,
      @Semantics.amount.currencyCode: 'PaymentCurrency'
      spesk                                             as FeeAmountInTransactionCrcy,
      vorgc                                             as PaymentTransaction,
      cast(kursf as farp_kursf)                         as ExchangeRate,
      jpdat                                             as BillOfExchangeFailureDate,
      chect                                             as Cheque,
      valut                                             as ValueDate,
      zbprn                                             as BusinessPartnerName,
      fica_apbel                                        as CAPaymentDocument,
      fica_vkont                                        as ContractAccount,
      fica_avkey                                        as CAPaymentAdvice,
//      paymentadviceattachmentkey                        as PaymentAdviceAttachmentKey,


      _PaymentAdviceItem,
      _CompanyCode,
      _Currency,
      _PaytAdvcDiffDeterminationRule,
      _PaytAdviceSelRules,
      _UserContactCard,
      _PaymentAdviceType,
      _Customer,
      _CustomerCompany,
      _Supplier,
      _SupplierCompany,
      _BusinessPartner
}