P_AR_SuplrPaymentPartialFull2

DDL: P_AR_SUPLRPAYMENTPARTIALFULL2 Type: view_entity CONSUMPTION Package: GLO_FIN_IS_AR_SUPPLIER_PAYMENT

Argentina Supplier Payment Full and Partial Payment 2

P_AR_SuplrPaymentPartialFull2 is a Consumption CDS View that provides data about "Argentina Supplier Payment Full and Partial Payment 2" in SAP S/4HANA. It reads from 2 data sources (P_AR_SuplrPaymentPartialFull, I_OperationalAcctgDocItem) and exposes 17 fields with key fields StatryRptgEntity, StatryRptCategory, StatryRptRunID, CompanyCode, FiscalYear. Part of development package GLO_FIN_IS_AR_SUPPLIER_PAYMENT.

Data Sources (2)

SourceAliasJoin Type
P_AR_SuplrPaymentPartialFull PaymentItem from
I_OperationalAcctgDocItem RelatedItem inner

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY StatryRptgEntity P_AR_SuplrPaymentPartialFull StatryRptgEntity
KEY StatryRptCategory P_AR_SuplrPaymentPartialFull StatryRptCategory
KEY StatryRptRunID P_AR_SuplrPaymentPartialFull StatryRptRunID
KEY CompanyCode P_AR_SuplrPaymentPartialFull CompanyCode
KEY FiscalYear P_AR_SuplrPaymentPartialFull FiscalYear
KEY AccountingDocument P_AR_SuplrPaymentPartialFull AccountingDocument
KEY AccountingDocumentItem P_AR_SuplrPaymentPartialFull AccountingDocumentItem
KEY ClearingInformationIndex P_AR_SuplrPaymentPartialFull ClearingInformationIndex
KEY PaidItemClearingInfoIndex P_AR_SuplrPaymentPartialFull PaidItemClearingInfoIndex
PaymentDate P_AR_SuplrPaymentPartialFull PaymentDate
CompanyCodeCountry P_AR_SuplrPaymentPartialFull CompanyCodeCountry
CompanyCodeCurrency P_AR_SuplrPaymentPartialFull CompanyCodeCurrency
PaytAmountInCoCodeCurrency P_AR_SuplrPaymentPartialFull PaytAmountInCoCodeCurrency
ReltdSpclGLTransacType P_AR_SuplrPaymentPartialFull ReltdSpclGLTransacType
HouseBank P_AR_SuplrPaymentPartialFull HouseBank
PaymentGLAccount P_AR_SuplrPaymentPartialFull PaymentGLAccount
_GLAccountInCompanyCode P_AR_SuplrPaymentPartialFull _GLAccountInCompanyCode
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@VDM.viewType: #CONSUMPTION
@VDM.private: true
define view entity P_AR_SuplrPaymentPartialFull2
  as select from           P_AR_SuplrPaymentPartialFull as PaymentItem

    inner join             I_OperationalAcctgDocItem    as RelatedItem       on  RelatedItem.CompanyCode            = PaymentItem.CompanyCode
                                                                             and RelatedItem.FiscalYear             = PaymentItem.RelatedDocumentFiscalYear
                                                                             and RelatedItem.AccountingDocument     = PaymentItem.ReltdDocAccountingDocument
                                                                             and RelatedItem.AccountingDocumentItem = PaymentItem.RelatedDocumentItemNumber

    left outer to one join I_OperationalAcctgDocItem    as PartiallyPaidItem on  PartiallyPaidItem.CompanyCode          = RelatedItem.CompanyCode
                                                                             and PartiallyPaidItem.FiscalYear           = RelatedItem.InvoiceReferenceFiscalYear
                                                                             and PartiallyPaidItem.AccountingDocument   = RelatedItem.InvoiceReference
                                                                             and PartiallyPaidItem.FinancialAccountType = 'K'
                                                                             and PaymentItem.ReltdSpclGLTransacType     = 'P' // Payment Request


{
  key PaymentItem.StatryRptgEntity,
  key PaymentItem.StatryRptCategory,
  key PaymentItem.StatryRptRunID,
  key PaymentItem.CompanyCode,
  key PaymentItem.FiscalYear,
  key PaymentItem.AccountingDocument,
  key PaymentItem.AccountingDocumentItem,
  key PaymentItem.ClearingInformationIndex,
  key PaymentItem.PaidItemClearingInfoIndex,

  key cast(
        case
          when PartiallyPaidItem.AccountingDocument is not null then PartiallyPaidItem.AccountingDocument
          when PartiallyPaidItem.AccountingDocument is null then RelatedItem.AccountingDocument
        end as fis_belnr_rel_doc preserving type )               as ReltdDocAccountingDocument,

  key cast(
        case
          when PartiallyPaidItem.AccountingDocumentItem is not null then PartiallyPaidItem.AccountingDocumentItem
          when PartiallyPaidItem.AccountingDocumentItem is null then RelatedItem.AccountingDocumentItem
        end as fis_buzei preserving type )                       as RelatedDocumentItemNumber,

      cast(
        case
          when PartiallyPaidItem.FiscalYear is not null then PartiallyPaidItem.FiscalYear
          when PartiallyPaidItem.FiscalYear is null then RelatedItem.FiscalYear
        end as fis_gjahr_rel_doc preserving type )               as RelatedDocumentFiscalYear,

      cast(
        case
          when PartiallyPaidItem.TransactionCurrency is not null then PartiallyPaidItem.TransactionCurrency
          when PartiallyPaidItem.TransactionCurrency is null then RelatedItem.TransactionCurrency
        end as fiar_reltd_document_trans_crcy  preserving type ) as ReltdDocTransactionCurrency,

      @Semantics.amount.currencyCode: 'ReltdDocTransactionCurrency'
      cast(
        case
          when PartiallyPaidItem.AmountInTransactionCurrency is not null then abs(PartiallyPaidItem.AmountInTransactionCurrency)
          when PartiallyPaidItem.AmountInTransactionCurrency is null then abs(RelatedItem.AmountInTransactionCurrency)
        end as fiar_reltd_doc_amnt_trans_crcy  preserving type ) as ReltdDocAmtInTransCurrency,

      cast(
        case
          when PartiallyPaidItem.Supplier is not null then PartiallyPaidItem.Supplier
          when PartiallyPaidItem.Supplier is null then RelatedItem.Supplier
        end as md_supplier preserving type )                     as Supplier,

      cast(
        case
          when PartiallyPaidItem.GLAccount is not null then PartiallyPaidItem.GLAccount
          when PartiallyPaidItem.GLAccount is null then RelatedItem.GLAccount
        end as fis_racct preserving type )                       as GLAccount,

      cast(
        case
          when PaymentItem.PaymentMethod is not null then PaymentItem.PaymentMethod
          when PaymentItem.PaymentMethod is null then RelatedItem.PaymentMethod
        end as farp_schzw_bseg preserving type )                 as PaymentMethod,

      PaymentItem.PaymentDate,
      PaymentItem.CompanyCodeCountry,
      PaymentItem.CompanyCodeCurrency,
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      PaymentItem.PaytAmountInCoCodeCurrency,
      PaymentItem.ReltdSpclGLTransacType,
      PaymentItem.HouseBank,
      PaymentItem.PaymentGLAccount,
      PaymentItem._GLAccountInCompanyCode

}