R_PaymentRequestTP

DDL: R_PAYMENTREQUESTTP Type: view_entity TRANSACTIONAL

Payment Request

R_PaymentRequestTP is a Transactional CDS View that provides data about "Payment Request" in SAP S/4HANA. It reads from 1 data source (I_PaymentRequest) and exposes 107 fields with key field PaymentRequest. It has 7 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PaymentRequest PaymentRequest from

Associations (7)

CardinalityTargetAliasCondition
[1..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[1..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[1..1] I_UserContactCard _ChangedBy $projection.lastchangedbyuser = _ChangedBy.ContactCardID
[1..1] P_PFFPCustomerSupplierBankType _BankType $projection.PaymentRequest = _BankType.PaymentRequest
[0..1] I_PaymentBatchPaymentDocument _BatchDocument $projection.ClearingAccountingDocument = _BatchDocument.PaymentDocument and $projection.PayingCompanyCode = _BatchDocument.PayingCompanyCode and $projection.ClearingFiscalYear = _BatchDocument.FiscalYear
[1..*] I_PaymentRequestStatusText _PaymentRequestStatusText $projection.PaymentRequestStatus = _PaymentRequestStatusText.PaymentRequestStatus
[1..1] E_PaymentRequest _Extension $projection.PaymentRequest = _Extension.PaymentRequest

Annotations (13)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
VDM.viewType #TRANSACTIONAL view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.sapObjectNodeType.name PaymentRequest view
AbapCatalog.extensibility.extensible true view
AbapCatalog.extensibility.elementSuffix PRQ view
AbapCatalog.extensibility.quota.maximumFields 408 view
AbapCatalog.extensibility.quota.maximumBytes 4080 view
EndUserText.label Payment Request view

Fields (107)

KeyFieldSource TableSource FieldDescription
KEY PaymentRequest I_PaymentRequest PaymentRequest
PaymentRequestStatus I_PaymentRequest StatusCode
CompanyCode I_PaymentRequest CompanyCode
BusinessArea I_PaymentRequest BusinessArea
AccountingDocumentCreationDate I_PaymentRequest AccountingDocumentCreationDate
AccountingDocument I_PaymentRequest AccountingDocument
FiscalYear I_PaymentRequest FiscalYear
ClearingAccountingDocument I_PaymentRequest ClearingAccountingDocument
ClearingDate I_PaymentRequest ClearingDate
ClearingFiscalYear
PaymentRequestType
CustomerBankType _BankType CustomerBankType
SupplierBankType _BankType SupplierBankType
PayingCompanyCode I_PaymentRequest PayingCompanyCode
HouseBank I_PaymentRequest HouseBank
BankInternalID I_PaymentRequest BankInternalID
HouseBankAccount I_PaymentRequest HouseBankAccount
PaymentRequestAmountInPaytCrcy I_PaymentRequest PaymentRequestAmountInPaytCrcy
PaymentRequestCurrency I_PaymentRequest PaymentRequestCurrency
PaymentRequestPostingDate I_PaymentRequest PaymentRequestPostingDate
ConsideredPaymentMethods I_PaymentRequest PaymentMethod
PaymentMethodSupplement I_PaymentRequest PaymentMethodSupplement
PaymentReason I_PaymentRequest PaymentReason
PaymentRepetitiveCode I_PaymentRequest PaymentRepetitiveCode
PayeeAliasType I_PaymentRequest PayeeAliasType
PayeeAliasName I_PaymentRequest PayeeAliasName
PayeePaymentSystem I_PaymentRequest PayeePaymentSystem
PaymentRequestOrigin I_PaymentRequest PaymentRequestOrigin
DocumentItemTextendasDocumentItemText
GLAccount I_PaymentRequest GLAccount
PaymentRequestAmountInCCCrcy I_PaymentRequest PaymentRequestAmountInCCCrcy
CompanyCodeCurrency I_PaymentRequest CompanyCodeCurrency
AmountInAdditionalCurrency1 I_PaymentRequest AmountInAdditionalCurrency1
AdditionalCurrency1 I_PaymentRequest AdditionalCurrency1
AmountInAdditionalCurrency2 I_PaymentRequest AmountInAdditionalCurrency2
AdditionalCurrency2 I_PaymentRequest AdditionalCurrency2
BankCountry I_PaymentRequest BankCountry
DataExchangeInstructionKey I_PaymentRequest DataExchangeInstructionKey
DataExchangeInstruction1 I_PaymentRequest DataExchangeInstruction1
DataExchangeInstruction2 I_PaymentRequest DataExchangeInstruction2
DataExchangeInstruction3 I_PaymentRequest DataExchangeInstruction3
DataExchangeInstruction4 I_PaymentRequest DataExchangeInstruction4
StateCentralBankPaymentReason I_PaymentRequest StateCentralBankPaymentReason
PayeeName I_PaymentRequest PayeeName
PayeeBank I_PaymentRequest PayeeBank
PayeeBankCountry I_PaymentRequest PayeeBankCountry
PayeeBankInternalID I_PaymentRequest PayeeBankInternalID
PayeeBankAccount I_PaymentRequest PayeeBankAccount
PayeeBankControlKey I_PaymentRequest PayeeBankControlKey
BankChain
BankAccountHolderName I_PaymentRequest BankAccountHolderName
BankDetailReference I_PaymentRequest BankDetailReference
ReferenceTypeText I_PaymentRequest ReferenceTypeText
IsSinglePayment I_PaymentRequest IsSinglePayment
PayeeTitle I_PaymentRequest PayeeTitle
PayeePostalCode I_PaymentRequest PayeePostalCode
PayeePOBox I_PaymentRequest PayeePOBox
POBoxPostalCode I_PaymentRequest POBoxPostalCode
PayeeAdditionalName2 I_PaymentRequest PayeeAdditionalName2
PayeeAdditionalName3 I_PaymentRequest PayeeAdditionalName3
PayeeAdditionalName4 I_PaymentRequest PayeeAdditionalName4
PayeeCityName I_PaymentRequest PayeeCityName
PayeeStreet I_PaymentRequest PayeeStreet
PayeeCountry I_PaymentRequest PayeeCountry
PayeeRegion I_PaymentRequest PayeeRegion
PayeeLanguage I_PaymentRequest PayeeLanguage
PayeeFaxNumber I_PaymentRequest PayeeFaxNumber
PayeeTelephoneNumber I_PaymentRequest PayeeTelephoneNumber
PayeeIBAN I_PaymentRequest PayeeIBAN
PaymentReference I_PaymentRequest PaymentReference
PaytReqIsReleasedForPosting I_PaymentRequest PaytReqIsReleasedForPosting
PaytReqIsCompleted I_PaymentRequest PaytReqIsCompleted
PaytReqIsReleasedForPayment I_PaymentRequest PaytReqIsReleasedForPayment
IsReversed I_PaymentRequest IsReversed
ReversalReason I_PaymentRequest ReversalReason
CreatedByUser I_PaymentRequest CreatedByUser
PaymentRequestReleasedByUser I_PaymentRequest PaymentRequestReleasedByUser
ReleaseDate I_PaymentRequest ReleaseDate
PostingCreatedByUser I_PaymentRequest PostingCreatedByUser
LastChangedByUser
SupplyingCountry I_PaymentRequest SupplyingCountry
TaxID1 I_PaymentRequest TaxID1
ValueDate I_PaymentRequest ValueDate
BankAliasEntryIsSelected
PaymentRequestVariant
_Customer _Customer
_Supplier _Supplier
_ChangedBy _ChangedBy
_BatchDocument _BatchDocument
_PaymentRequestStatusText _PaymentRequestStatusText
_CreatedBy I_PaymentRequest _CreatedBy
_PostedBy I_PaymentRequest _PostedBy
_ReleasedBy I_PaymentRequest _ReleasedBy
_CurrencyText I_PaymentRequest _CurrencyText
_PaytReqChangeAndPost I_PaymentRequest _PaytReqChangeAndPost
_BusinessAreaText I_PaymentRequest _BusinessAreaText
_CompanyCode I_PaymentRequest _CompanyCode
_PayingCompanyCode I_PaymentRequest _PayingCompanyCode
_Bank2 I_PaymentRequest _Bank2
_PaymentReason I_PaymentRequest _PaymentReason
_DataExchangeInstructionKeys I_PaymentRequest _DataExchangeInstructionKeys
_SystemStatusText I_PaymentRequest _SystemStatusText
_HouseBankAccount I_PaymentRequest _HouseBankAccount
_PayeeBank2 I_PaymentRequest _PayeeBank2
_PayeePaymentSystem I_PaymentRequest _PayeePaymentSystem
_PaymentMethod I_PaymentRequest _PaymentMethod
_PayeeAliasType I_PaymentRequest _PayeeAliasType
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED

@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@VDM.viewType: #TRANSACTIONAL

@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.semanticKey: ['PaymentRequest']
@ObjectModel.sapObjectNodeType.name: 'PaymentRequest'

@AbapCatalog.extensibility.extensible: true
@AbapCatalog.extensibility.dataSources: ['_Extension']
@AbapCatalog.extensibility.elementSuffix: 'PRQ'
@AbapCatalog.extensibility.quota: {
  maximumFields: 408,  //This is calculated with formula - 2* <Customer Percentage from SCFD_REGISTRY> * <max number of fields in SCFD_REGISTRY>

  maximumBytes: 4080 } //This is calculated with formula - 2* <Customer Percentage from SCFD_REGISTRY> * <number of chars as defined in SCFD_REGISTRY>


@EndUserText.label: 'Payment Request'
define root view entity R_PaymentRequestTP
  as select from           I_PaymentRequest          as PaymentRequest

    left outer to one join I_OperationalAcctgDocItem as _AccountingDocItem002 on  _AccountingDocItem002.CompanyCode            = PaymentRequest.CompanyCode
                                                                              and _AccountingDocItem002.AccountingDocument     = PaymentRequest.AccountingDocument
                                                                              and _AccountingDocItem002.FiscalYear             = PaymentRequest.FiscalYear
                                                                              and _AccountingDocItem002.AccountingDocumentItem = '002'

  association [1..1] to I_Customer                     as _Customer                on  $projection.Customer = _Customer.Customer
  association [1..1] to I_Supplier                     as _Supplier                on  $projection.Supplier = _Supplier.Supplier
  association [1..1] to I_UserContactCard              as _ChangedBy               on  $projection.lastchangedbyuser = _ChangedBy.ContactCardID

  association [1..1] to P_PFFPCustomerSupplierBankType as _BankType                on  $projection.PaymentRequest = _BankType.PaymentRequest

  association [0..1] to I_PaymentBatchPaymentDocument  as _BatchDocument           on  $projection.ClearingAccountingDocument = _BatchDocument.PaymentDocument
                                                                                   and $projection.PayingCompanyCode          = _BatchDocument.PayingCompanyCode
                                                                                   and $projection.ClearingFiscalYear         = _BatchDocument.FiscalYear
  association [1..*] to I_PaymentRequestStatusText     as _PaymentRequestStatusText on  $projection.PaymentRequestStatus = _PaymentRequestStatusText.PaymentRequestStatus

  association [1..1] to E_PaymentRequest               as _Extension               on  $projection.PaymentRequest = _Extension.PaymentRequest

{
  key PaymentRequest.PaymentRequest,
      PaymentRequest.StatusCode                               as PaymentRequestStatus,
      @ObjectModel.foreignKey.association: '_CompanyCode'
      PaymentRequest.CompanyCode,
      PaymentRequest.BusinessArea,
      PaymentRequest.AccountingDocumentCreationDate,
      PaymentRequest.AccountingDocument,
      PaymentRequest.FiscalYear,
      PaymentRequest.ClearingAccountingDocument,
      PaymentRequest.ClearingDate,
      PaymentRequest._CalendarDateForCompanyCode.FiscalYear   as ClearingFiscalYear,

      cast(
        case
          when (    _AccountingDocItem002.FinancialAccountType is null
                and PaymentRequest._PaytReqChangeAndPost.FinancialAccountType = 'D' )
            then PaymentRequest._PaytReqChangeAndPost.CustomerSupplierAccount

          when _AccountingDocItem002.FinancialAccountType = 'D'
            then _AccountingDocItem002.Customer

          else ''
      end as farp_customer_id)                                as Customer,

      cast(
        case
          when (    _AccountingDocItem002.FinancialAccountType is null
                and PaymentRequest._PaytReqChangeAndPost.FinancialAccountType = 'K' )
            then PaymentRequest._PaytReqChangeAndPost.CustomerSupplierAccount

          when _AccountingDocItem002.FinancialAccountType = 'K'
            then _AccountingDocItem002.Supplier

          else ''
      end as farp_supplier_id)                                as Supplier,

      cast( _BankType.PaymentRequestType as farp_payrq_type ) as PaymentRequestType,
      _BankType.CustomerBankType,
      _BankType.SupplierBankType,
      PaymentRequest.PayingCompanyCode,
      PaymentRequest.HouseBank,
      PaymentRequest.BankInternalID,
      PaymentRequest.HouseBankAccount,

      @Semantics.amount.currencyCode: 'PaymentRequestCurrency'
      PaymentRequest.PaymentRequestAmountInPaytCrcy,
      PaymentRequest.PaymentRequestCurrency,
      PaymentRequest.PaymentRequestPostingDate,
      PaymentRequest.PaymentMethod                            as ConsideredPaymentMethods,
      PaymentRequest.PaymentMethodSupplement,
      PaymentRequest.PaymentReason,
      PaymentRequest.PaymentRepetitiveCode,
      PaymentRequest.PayeeAliasType,
      PaymentRequest.PayeeAliasName,
      PaymentRequest.PayeePaymentSystem,
      PaymentRequest.PaymentRequestOrigin,

      cast(
        case
          when _AccountingDocItem002.FinancialAccountType is null
              then PaymentRequest._PaytReqChangeAndPost.CustomerSupplierAccount
          when _AccountingDocItem002.FinancialAccountType = 'D'
              then _AccountingDocItem002.Customer
          when _AccountingDocItem002.FinancialAccountType = 'K'
              then _AccountingDocItem002.Supplier
          when _AccountingDocItem002.FinancialAccountType = 'S'
              then _AccountingDocItem002.GLAccount
          else ''
      end as farp_account_apar)                               as CustomerSupplierAccount,

      case
        when _AccountingDocItem002.DocumentItemText is null
          then PaymentRequest._PaytReqChangeAndPost.DocumentItemText
        else _AccountingDocItem002.DocumentItemText
      end                                                     as DocumentItemText,

      cast(
        case
          when _AccountingDocItem002.FinancialAccountType is null
            then PaymentRequest._PaytReqChangeAndPost.FinancialAccountType
          else _AccountingDocItem002.FinancialAccountType
      end as financialaccounttype)                            as FinancialAccountType,

      cast(
        case
          when _AccountingDocItem002.FinancialAccountType is null
            then PaymentRequest._PaytReqChangeAndPost._FinancialAccountType._Text[1:Language = $session.system_language].FinancialAccountTypeName
          else _AccountingDocItem002._FinancialAccountType._Text[1:Language = $session.system_language].FinancialAccountTypeName
      end as farp_fin_acc_type_name)                          as FinancialAccountTypeName,

      PaymentRequest.GLAccount,
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      PaymentRequest.PaymentRequestAmountInCCCrcy,
      PaymentRequest.CompanyCodeCurrency,
      @Semantics.amount.currencyCode: 'AdditionalCurrency1'
      PaymentRequest.AmountInAdditionalCurrency1,
      PaymentRequest.AdditionalCurrency1,
      @Semantics.amount.currencyCode: 'AdditionalCurrency2'
      PaymentRequest.AmountInAdditionalCurrency2,
      PaymentRequest.AdditionalCurrency2,

      //      PaymentRequest.BankChain,

      PaymentRequest.BankCountry,
      PaymentRequest.DataExchangeInstructionKey,
      PaymentRequest.DataExchangeInstruction1,
      PaymentRequest.DataExchangeInstruction2,
      PaymentRequest.DataExchangeInstruction3,
      PaymentRequest.DataExchangeInstruction4,
      PaymentRequest.StateCentralBankPaymentReason,
      PaymentRequest.PayeeName,
      PaymentRequest.PayeeBank,
      PaymentRequest.PayeeBankCountry,
      PaymentRequest.PayeeBankInternalID,
      PaymentRequest.PayeeBankAccount,
      PaymentRequest.PayeeBankControlKey,
      PaymentRequest._PaytReqChangeAndPost.BankChain,
      PaymentRequest.BankAccountHolderName,
      PaymentRequest.BankDetailReference,
      PaymentRequest.ReferenceTypeText,
      PaymentRequest.IsSinglePayment,
      PaymentRequest.PayeeTitle,
      PaymentRequest.PayeePostalCode,
      PaymentRequest.PayeePOBox,
      PaymentRequest.POBoxPostalCode,
      PaymentRequest.PayeeAdditionalName2,
      PaymentRequest.PayeeAdditionalName3,
      PaymentRequest.PayeeAdditionalName4,
      PaymentRequest.PayeeCityName,
      PaymentRequest.PayeeStreet,
      PaymentRequest.PayeeCountry,
      PaymentRequest.PayeeRegion,
      PaymentRequest.PayeeLanguage,
      PaymentRequest.PayeeFaxNumber,
      PaymentRequest.PayeeTelephoneNumber,
      PaymentRequest.PayeeIBAN,
      PaymentRequest.PaymentReference,
      PaymentRequest.PaytReqIsReleasedForPosting,
      PaymentRequest.PaytReqIsCompleted,
      PaymentRequest.PaytReqIsReleasedForPayment,
      PaymentRequest.IsReversed,
      PaymentRequest.ReversalReason,
      PaymentRequest.CreatedByUser,
      PaymentRequest.PaymentRequestReleasedByUser,
      PaymentRequest.ReleaseDate,
      PaymentRequest.PostingCreatedByUser,
      PaymentRequest._PaytReqChangeAndPost.LastChangedByUser,
      PaymentRequest.SupplyingCountry,
      PaymentRequest.TaxID1,
      PaymentRequest.ValueDate,

      @Semantics.booleanIndicator: true
      cast ('' as abap_boolean)                               as BankAliasEntryIsSelected,
      cast ('' as fibl_opvar)                                 as PaymentRequestVariant,

      cast (
        case tims_is_valid(PaymentRequest._PaytReqChangeAndPost.CreationTime)
          when 1 then dats_tims_to_tstmp( PaymentRequest.AccountingDocumentCreationDate, PaymentRequest._PaytReqChangeAndPost.CreationTime,
                                     abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' )
          else dats_tims_to_tstmp( PaymentRequest.AccountingDocumentCreationDate, PaymentRequest.CreationTime,
                                     abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' )
       end as farp_prq_cr_date )                              as CreationDateTime,

      @Semantics.systemDateTime.lastChangedAt: true
      cast( dats_tims_to_tstmp( PaymentRequest._PaytReqChangeAndPost.LastChangeDate,
                         PaymentRequest._PaytReqChangeAndPost.LastChangeTime,
                         abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' )
                                 as farp_prq_chg_date )       as LastChangeDateTime,

      _Customer,
      _Supplier,
      _ChangedBy,
      _BatchDocument,
      _PaymentRequestStatusText,
      PaymentRequest._CreatedBy,
      PaymentRequest._PostedBy,
      PaymentRequest._ReleasedBy,
      PaymentRequest._CurrencyText,
      PaymentRequest._PaytReqChangeAndPost,
      PaymentRequest._BusinessAreaText,
      PaymentRequest._CompanyCode,
      PaymentRequest._PayingCompanyCode,
      PaymentRequest._Bank2,
      PaymentRequest._PaymentReason,
      PaymentRequest._DataExchangeInstructionKeys,
      PaymentRequest._SystemStatusText,
      PaymentRequest._HouseBankAccount,
      PaymentRequest._PayeeBank2,
      PaymentRequest._PayeePaymentSystem,
      PaymentRequest._PaymentMethod,
      PaymentRequest._PayeeAliasType
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_FINANCIALACCOUNTTYPE",
"I_FINANCIALACCOUNTTYPETEXT",
"I_FISCALYEARFORCOMPANYCODE",
"I_OPERATIONALACCTGDOCITEM",
"I_PAYMENTREQUEST",
"I_PAYTREQCHGANDPOSTINGDATA",
"P_PFFPCUSTOMERSUPPLIERBANKTYPE"
],
"ASSOCIATED":
[
"I_ALIASTYPE",
"I_BANK_2",
"I_BUSINESSAREATEXT",
"I_COMPANYCODE",
"I_CURRENCYTEXT",
"I_CUSTOMER",
"I_DATAEXCHANGEINSTRUCTIONKEYS",
"I_HOUSEBANKACCOUNT",
"I_PAYMENTBATCHPAYMENTDOCUMENT",
"I_PAYMENTMETHOD",
"I_PAYMENTREASON",
"I_PAYMENTREQUESTSTATUSTEXT",
"I_PAYMENTSYSTEM",
"I_PAYTREQCHGANDPOSTINGDATA",
"I_SUPPLIER",
"I_SYSTEMSTATUSTEXT",
"I_USERCONTACTCARD"
],
"BASE":
[
"I_PAYMENTREQUEST"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/