I_BkPaytRunDocSettlementData

DDL: I_BKPAYTRUNDOCSETTLEMENTDATA Type: view_entity COMPOSITE Package: FIN_BNK_COM_RAP_MONIP_UI

Payment run documents settlement data

I_BkPaytRunDocSettlementData is a Composite CDS View that provides data about "Payment run documents settlement data" in SAP S/4HANA. It reads from 1 data source (I_BkPaytRunDocCrsPaytRunPayt) and exposes 140 fields with key fields PaymentRunDate, PaymentRunID, PayingCompanyCode, Supplier, Customer. It has 8 associations to related views. Part of development package FIN_BNK_COM_RAP_MONIP_UI.

Data Sources (1)

SourceAliasJoin Type
I_BkPaytRunDocCrsPaytRunPayt I_BkPaytRunDocCrsPaytRunPayt from

Associations (8)

CardinalityTargetAliasCondition
[1..1] I_PaymentProposalHeader _PaymentProposalHeader $projection.PaymentRunID = _PaymentProposalHeader.PaymentRunID and $projection.PaymentRunDate = _PaymentProposalHeader.PaymentRunDate and $projection.PayingCompanyCode = _PaymentProposalHeader.PayingCompanyCode and $projection.Supplier = _PaymentProposalHeader.Supplier and $projection.Customer = _PaymentProposalHeader.Customer and $projection.PaymentRecipient = _PaymentProposalHeader.PaymentRecipient and $projection.PaymentDocument = _PaymentProposalHeader.PaymentDocument and ' ' = _PaymentProposalHeader.PaymentRunIsProposal
[0..1] I_BankPaymentBatchItem _BankPaymentBatchItem $projection.PaymentRunID = _BankPaymentBatchItem.PaymentRunID and $projection.PaymentRunDate = _BankPaymentBatchItem.PaymentRunDate and $projection.PayingCompanyCode = _BankPaymentBatchItem.PayingCompanyCode and $projection.Supplier = _BankPaymentBatchItem.Supplier and $projection.Customer = _BankPaymentBatchItem.Customer and $projection.PaymentRecipient = _BankPaymentBatchItem.PaymentRecipient and $projection.PaymentDocument = _BankPaymentBatchItem.PaymentDocument and $projection.PaymentBatch = _BankPaymentBatchItem.PaymentBatch
[0..1] I_BkPaytRunDocSettlementData _BkPaytRunDocMergeData $projection.PaymentRunMergeIdentifier = _BkPaytRunDocMergeData.PaymentRunID and $projection.PaymentRunMergeDate = _BkPaytRunDocMergeData.PaymentRunDate and $projection.PayingCompanyCode = _BkPaytRunDocMergeData.PayingCompanyCode and $projection.Supplier = _BkPaytRunDocMergeData.Supplier and $projection.Customer = _BkPaytRunDocMergeData.Customer and $projection.PaymentRecipient = _BkPaytRunDocMergeData.PaymentRecipient and $projection.PaymentDocument = _BkPaytRunDocMergeData.PaymentDocument
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[1..1] I_BankPaymentBatchRuleBaseCust _BankPaymentBatchRuleBaseCust _BankPaymentBatchRuleBaseCust.PaymentBatchRuleCurrency <> ''
[0..1] I_CompanyCode _CompanyCode $projection.PayingCompanyCode = _CompanyCode.CompanyCode
[0..1] I_PaymentReasonText _PaymentReasonText $projection.paymentreason = _PaymentReasonText.PaymentReason and _PaymentReasonText.Language = $session.system_language

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Payment run documents settlement data view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view

Fields (140)

KeyFieldSource TableSource FieldDescription
KEY PaymentRunDate Run On
KEY PaymentRunID PaymentRunID
KEY PayingCompanyCode Paying Company Code
KEY Supplier Supplier Supplier
KEY Customer Customer Sold-to Party
KEY PaymentRecipient PaymentRecipient
KEY PaymentDocument Payment Document Number
PaymentRunMergeDate
PaymentRunMergeIdentifier
HouseBank HouseBank House Bank
HouseBankAccount House Bank Account
PaymentMethod PaymentMethod Pymt Meth.
PaymentMethodSupplement Pmnt Meth. Sup.
PaymentCurrency Payment Currency
PaymentDocumentPostingDate
ValueDate ValueDate Value Date
PayeeBankValueDate
PaidItemDueDate PaidItemDueDate
PaymentBatch
PaymentRunIsProposal _PaymentProposalHeader PaymentRunIsProposal
SupplierClerkIDBySupplier _PaymentProposalHeader SupplierClerkIDBySupplier Acct w/ vendor
BankAccountHolderName _PaymentProposalHeader BankAccountHolderName Account Holder
AccountingClerk _PaymentProposalHeader AccountingClerk Clerk Abbrev.
PaidAmountInPaytCurrency
AmountInCompanyCodeCurrency
PayeeBankControlKey
BankControlKey _PaymentProposalHeader BankControlKey Control Key
BankCountry
PaymentRunDocumentPayeeBankKey
PayeeBank
BusinessArea _PaymentProposalHeader BusinessArea Business Area
CashDiscountAmtInTransacCrcy
CashDiscountAmtInCoCodeCrcy
SupplierCityName _PaymentProposalHeader SupplierCityName Supplier City
PayeeCityName
SupplierCountry _PaymentProposalHeader SupplierCountry
PayeeBankCountry
District _PaymentProposalHeader District District Court
EDIPaymentOrderStatus _PaymentProposalHeader EDIPaymentOrderStatus
EDIPaymentAdviceStatus _PaymentProposalHeader EDIPaymentAdviceStatus
PaymentRequestPaymentGroup _PaymentProposalHeader PaymentRequestPaymentGroup
BankInternalID _PaymentProposalHeader BankInternalID Bank Key
Bank
HouseBankIBAN
PayeeIBAN
DataExchangeInstructionKey _PaymentProposalHeader DataExchangeInstructionKey Instruction Key
DataExchangeInstruction1 _PaymentProposalHeader DataExchangeInstruction1 Instruction 1
DataExchangeInstruction2 _PaymentProposalHeader DataExchangeInstruction2 Instruction 2
DataExchangeInstruction3 _PaymentProposalHeader DataExchangeInstruction3 Instruction 3
DataExchangeInstruction4 _PaymentProposalHeader DataExchangeInstruction4 Instruction 4
PaymentReason _PaymentProposalHeader PaymentReason Payment Reason
DirectDebitType _PaymentProposalHeader DirectDebitType
LostCashDiscountInTransacCrcy _PaymentProposalHeader LostCashDiscountInTransacCrcy
LostCashDiscountInCoCodeCrcy _PaymentProposalHeader LostCashDiscountInCoCodeCrcy
FunctionalCurrency _PaymentProposalHeader FunctionalCurrency Functional Currency
PaymentAmountInFunctionalCrcy
CashDiscountAmountInFuncnlCrcy
SupplierName
SupplierAdditionalName _PaymentProposalHeader SupplierAdditionalName
CustomerName
CustomerAdditionalName _PaymentProposalHeader CustomerAdditionalName
PayeeName
PayeeAdditionalName
PayeeTitle _PaymentProposalHeader PayeeTitle
AddressID _PaymentProposalHeader AddressID Ship-to address
NumberOfTextLines _PaymentProposalHeader NumberOfTextLines
NumberOfPaidItems _PaymentProposalHeader NumberOfPaidItems
BankAccount
BankAccountLongID
POBoxDeviatingCityName _PaymentProposalHeader POBoxDeviatingCityName PO Box City
POBoxPostalCode _PaymentProposalHeader POBoxPostalCode PO Box Postal Code
PayeePOBoxPostalCode _PaymentProposalHeader PayeePOBoxPostalCode
PayeePostalCode _PaymentProposalHeader PayeePostalCode
PayeeBankAccount
PayeeBankAccountLongID
PayeeCountry
PayeeLanguage _PaymentProposalHeader PayeeLanguage
PayeePOBox _PaymentProposalHeader PayeePOBox
PayeeStreet
PaymentReference
PersonnelNumber _PaymentProposalHeader PersonnelNumber Personnel No.
POBox _PaymentProposalHeader POBox PO Box
PostalCode _PaymentProposalHeader PostalCode Postal Code
PostingDate _PaymentProposalHeader PostingDate Posting Date for GR
BankAccountReferenceText
Region _PaymentProposalHeader Region Venue Region
PaymentOrder
SendingCompanyCode _PaymentProposalHeader SendingCompanyCode
SEPASequenceType _PaymentProposalHeader SEPASequenceType
StreetAddressName _PaymentProposalHeader StreetAddressName Street
SWIFTCode
SEPAMandateUUID _PaymentProposalHeader SEPAMandateUUID Mandate ID
SupplierRegion
ExchangeRate _PaymentProposalHeader ExchangeRate Exchange rate
PaymentsGroupingCriterion
BillOfExchangeIssueDate _PaymentProposalHeader BillOfExchangeIssueDate
BillOfExchangeDueDate
PaymentOrigin
SWIFTTransactionReferenceUUID
BusinessPlace _PaymentProposalHeader BusinessPlace Business place
BankChainBank1Type
BankChainBank1Country
BankChainBank1
BankChainBank1BankAccount
BankChainBank1ControlKey _PaymentProposalHeader BankChainBank1ControlKey
BankChainBank1DetailReference _PaymentProposalHeader BankChainBank1DetailReference
BankChainBank1IBAN
BankChainBank2Type
BankChainBank2Country
BankChainBank2
BankChainBank2BankAccount
BankChainBank2ControlKey _PaymentProposalHeader BankChainBank2ControlKey
BankChainBank2DetailReference _PaymentProposalHeader BankChainBank2DetailReference
BankChainBank2IBAN
BankChainBank3Type
BankChainBank3Country
BankChainBank3
BankChainBank3BankAccount
BankChainBank3ControlKey _PaymentProposalHeader BankChainBank3ControlKey
BankChainBank3DetailReference _PaymentProposalHeader BankChainBank3DetailReference
BankChainBank3IBAN
PayeePaymentSystem _PaymentProposalHeader PayeePaymentSystem
PayeeAliasType
PayeeAliasName
CompanyCodeCurrency
Country _PaymentProposalHeader Country Venue: Ctry/Reg
IsUrgentPayment
PaymentMethodName
AliasTypeText
PaymentBatchItem _BankPaymentBatchItem PaymentBatchItem
BatchUUID _BankPaymentBatchItem BatchUUID Target Grp GUID
SWIFTGPIReason
PaymentBatchItemCurrentStatus
_BkPaytRunDocMergeData _BkPaytRunDocMergeData
_Supplier _Supplier
_Customer _Customer
PaymentBatchRuleCurrency _BankPaymentBatchRuleBaseCust PaymentBatchRuleCurrency
FiscalYearVariant _CompanyCode FiscalYearVariant FY Variant
_CompanyCode _CompanyCode
_PaymentReasonText _PaymentReasonText

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_BkPaytRunDocSettlementData.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW I_BkPaytRunDocSettlementData AS
SELECT
  cast(PaymentRunDate as payt_run_doc_paymentrundate preserving type ) AS PaymentRunDate,
  PaymentRunID,
  cast(PayingCompanyCode as payt_run_doc_payingcompanycode preserving type ) AS PayingCompanyCode,
  Supplier,
  Customer,
  PaymentRecipient,
  cast (PaymentDocument as payt_run_doc_payment_document preserving type) AS PaymentDocument,
  cast (PaymentMediumRunDate as payt_run_doc_paytrunmrgdte preserving type ) AS PaymentRunMergeDate,
  cast(PaymentMediumRun as payt_run_doc_paytrunmrgid preserving type ) AS PaymentRunMergeIdentifier,
  HouseBank,
  cast(HouseBankAccount as payt_run_doc_housebankaccount preserving type ) AS HouseBankAccount,
  PaymentMethod,
  cast(PaymentMethodSupplement as payt_run_doc_paytmethsuplmnt preserving type ) AS PaymentMethodSupplement,
  cast(PaymentCurrency as payt_run_doc_paymentcurrency preserving type ) AS PaymentCurrency,
  cast(PaymentDocumentPostingDate as payt_run_doc_paytdocpostgdte preserving type ) AS PaymentDocumentPostingDate,
  ValueDate,
  cast(PayeeBankValueDate as payt_run_doc_pyebkvaldte preserving type ) AS PayeeBankValueDate,
  PaidItemDueDate,
  cast(PaymentBatch as payt_run_doc_paymentbatch preserving type ) AS PaymentBatch,
  _PaymentProposalHeader.PaymentRunIsProposal AS PaymentRunIsProposal,
  _PaymentProposalHeader.SupplierClerkIDBySupplier AS SupplierClerkIDBySupplier,
  _PaymentProposalHeader.BankAccountHolderName AS BankAccountHolderName,
  _PaymentProposalHeader.AccountingClerk AS AccountingClerk,
  cast(_PaymentProposalHeader.PaidAmountInPaytCurrency as payt_run_doc_paidamtinpaytcrcy preserving type ) AS PaidAmountInPaytCurrency,
  cast(_PaymentProposalHeader.AmountInCompanyCodeCurrency as payt_run_doc_amtincccrcy preserving type ) AS AmountInCompanyCodeCurrency,
  cast(_PaymentProposalHeader.PayeeBankControlKey as payt_run_doc_pyebkctrlkey preserving type ) AS PayeeBankControlKey,
  _PaymentProposalHeader.BankControlKey AS BankControlKey,
  cast(_PaymentProposalHeader.BankCountry as payt_run_doc_bankcountry preserving type ) AS BankCountry,
  cast(_PaymentProposalHeader.PayeeBankInternalID as payt_run_doc_pyebkintid ) AS PaymentRunDocumentPayeeBankKey,
  cast(_PaymentProposalHeader.PayeeBank as payt_run_doc_payeebank preserving type ) AS PayeeBank,
  _PaymentProposalHeader.BusinessArea AS BusinessArea,
  cast(_PaymentProposalHeader.CashDiscountAmtInTransacCrcy as payt_run_doc_cshdiscamtintracr preserving type ) AS CashDiscountAmtInTransacCrcy,
  cast(_PaymentProposalHeader.CashDiscountAmtInCoCodeCrcy as payt_run_doc_cshdiscamticccrcy preserving type ) AS CashDiscountAmtInCoCodeCrcy,
  _PaymentProposalHeader.SupplierCityName AS SupplierCityName,
  cast(_PaymentProposalHeader.PayeeCityName as payt_run_doc_payeecityname preserving type ) AS PayeeCityName,
  _PaymentProposalHeader.SupplierCountry AS SupplierCountry,
  cast(_PaymentProposalHeader.PayeeBankCountry as payt_run_doc_payeebankcountry preserving type ) AS PayeeBankCountry,
  _PaymentProposalHeader.District AS District,
  _PaymentProposalHeader.EDIPaymentOrderStatus AS EDIPaymentOrderStatus,
  _PaymentProposalHeader.EDIPaymentAdviceStatus AS EDIPaymentAdviceStatus,
  _PaymentProposalHeader.PaymentRequestPaymentGroup AS PaymentRequestPaymentGroup,
  _PaymentProposalHeader.BankInternalID AS BankInternalID,
  cast(_PaymentProposalHeader.Bank as payt_run_doc_bank preserving type ) AS Bank,
  cast(_PaymentProposalHeader.HouseBankIBAN as payt_run_doc_housebankiban preserving type ) AS HouseBankIBAN,
  cast(_PaymentProposalHeader.PayeeIBAN as payt_run_doc_payeeiban preserving type ) AS PayeeIBAN,
  _PaymentProposalHeader.DataExchangeInstructionKey AS DataExchangeInstructionKey,
  _PaymentProposalHeader.DataExchangeInstruction1 AS DataExchangeInstruction1,
  _PaymentProposalHeader.DataExchangeInstruction2 AS DataExchangeInstruction2,
  _PaymentProposalHeader.DataExchangeInstruction3 AS DataExchangeInstruction3,
  _PaymentProposalHeader.DataExchangeInstruction4 AS DataExchangeInstruction4,
  _PaymentProposalHeader.PaymentReason AS PaymentReason,
  _PaymentProposalHeader.DirectDebitType AS DirectDebitType,
  _PaymentProposalHeader.LostCashDiscountInTransacCrcy AS LostCashDiscountInTransacCrcy,
  _PaymentProposalHeader.LostCashDiscountInCoCodeCrcy AS LostCashDiscountInCoCodeCrcy,
  _PaymentProposalHeader.FunctionalCurrency AS FunctionalCurrency,
  cast(_PaymentProposalHeader.PaymentAmountInFunctionalCrcy as payt_run_doc_paytamtinfunlcrcy preserving type ) AS PaymentAmountInFunctionalCrcy,
  cast(_PaymentProposalHeader.CashDiscountAmountInFuncnlCrcy as payt_run_doc_cshdiscamtfuncrcy preserving type ) AS CashDiscountAmountInFuncnlCrcy,
  cast(_PaymentProposalHeader.SupplierName as payt_run_doc_suppliername preserving type ) AS SupplierName,
  _PaymentProposalHeader.SupplierAdditionalName AS SupplierAdditionalName,
  cast(_PaymentProposalHeader.CustomerName as payt_run_doc_customername preserving type ) AS CustomerName,
  _PaymentProposalHeader.CustomerAdditionalName AS CustomerAdditionalName,
  cast(_PaymentProposalHeader.PayeeName as payt_run_doc_payeename preserving type ) AS PayeeName,
  cast(_PaymentProposalHeader.PayeeAdditionalName as payt_run_doc_pyeaddlname preserving type ) AS PayeeAdditionalName,
  _PaymentProposalHeader.PayeeTitle AS PayeeTitle,
  _PaymentProposalHeader.AddressID AS AddressID,
  _PaymentProposalHeader.NumberOfTextLines AS NumberOfTextLines,
  _PaymentProposalHeader.NumberOfPaidItems AS NumberOfPaidItems,
  cast(_PaymentProposalHeader.BankAccount as payt_run_doc_bankaccount preserving type ) AS BankAccount,
  cast(_PaymentProposalHeader.BankAccountLongID as payt_run_doc_bankaccountlongid preserving type ) AS BankAccountLongID,
  _PaymentProposalHeader.POBoxDeviatingCityName AS POBoxDeviatingCityName,
  _PaymentProposalHeader.POBoxPostalCode AS POBoxPostalCode,
  _PaymentProposalHeader.PayeePOBoxPostalCode AS PayeePOBoxPostalCode,
  _PaymentProposalHeader.PayeePostalCode AS PayeePostalCode,
  cast(_PaymentProposalHeader.PayeeBankAccount as payt_run_doc_pyebkacct preserving type ) AS PayeeBankAccount,
  cast(_PaymentProposalHeader.PayeeBankAccountLongID as payt_run_doc_pyebkacctlongid preserving type ) AS PayeeBankAccountLongID,
  cast(_PaymentProposalHeader.PayeeCountry as payt_run_doc_payeecountry preserving type ) AS PayeeCountry,
  _PaymentProposalHeader.PayeeLanguage AS PayeeLanguage,
  _PaymentProposalHeader.PayeePOBox AS PayeePOBox,
  cast(_PaymentProposalHeader.PayeeStreet as payt_run_doc_payeestreet preserving type ) AS PayeeStreet,
  cast(_PaymentProposalHeader.PaymentReference as payt_run_doc_paymentreference preserving type ) AS PaymentReference,
  _PaymentProposalHeader.PersonnelNumber AS PersonnelNumber,
  _PaymentProposalHeader.POBox AS POBox,
  _PaymentProposalHeader.PostalCode AS PostalCode,
  _PaymentProposalHeader.PostingDate AS PostingDate,
  cast(_PaymentProposalHeader.BankAccountReferenceText as payt_run_doc_bkacctreftxt preserving type ) AS BankAccountReferenceText,
  _PaymentProposalHeader.Region AS Region,
  cast(_PaymentProposalHeader.PaymentOrder as payt_run_doc_paymentorder preserving type ) AS PaymentOrder,
  _PaymentProposalHeader.SendingCompanyCode AS SendingCompanyCode,
  _PaymentProposalHeader.SEPASequenceType AS SEPASequenceType,
  _PaymentProposalHeader.StreetAddressName AS StreetAddressName,
  cast(_PaymentProposalHeader.SWIFTCode as payt_run_doc_swiftcode preserving type ) AS SWIFTCode,
  _PaymentProposalHeader.SEPAMandateUUID AS SEPAMandateUUID,
  cast(_PaymentProposalHeader.SupplierRegion as payt_run_doc_payeeregion preserving type ) AS SupplierRegion,
  _PaymentProposalHeader.ExchangeRate AS ExchangeRate,
  cast(_PaymentProposalHeader.PaymentOrigin as payt_run_doc_paytsgrpgcritrn preserving type ) AS PaymentsGroupingCriterion,
  _PaymentProposalHeader.BillOfExchangeIssueDate AS BillOfExchangeIssueDate,
  cast(_PaymentProposalHeader.BillOfExchangeDueDate as payt_run_doc_billofexchdudte preserving type ) AS BillOfExchangeDueDate,
  cast( _PaymentProposalHeader.BankPaymentGroupingOrigin as payt_run_doc_paymentorigin preserving type ) AS PaymentOrigin,
  cast(_PaymentProposalHeader.SWIFTTransactionReferenceUUID as payt_run_doc_swifttransrefuuid preserving type) AS SWIFTTransactionReferenceUUID,
  _PaymentProposalHeader.BusinessPlace AS BusinessPlace,
  cast(_PaymentProposalHeader.BankChainBank1Type as payt_run_doc_bkchnbk1type preserving type ) AS BankChainBank1Type,
  cast(_PaymentProposalHeader.BankChainBank1Country as payt_run_doc_bkchnbk1cntry preserving type ) AS BankChainBank1Country,
  cast(_PaymentProposalHeader.BankChainBank1 as payt_run_doc_bkchnbk1 preserving type ) AS BankChainBank1,
  cast(_PaymentProposalHeader.BankChainBank1BankAccount as payt_run_doc_bkchnbk1bkacct preserving type ) AS BankChainBank1BankAccount,
  _PaymentProposalHeader.BankChainBank1ControlKey AS BankChainBank1ControlKey,
  _PaymentProposalHeader.BankChainBank1DetailReference AS BankChainBank1DetailReference,
  cast(_PaymentProposalHeader.BankChainBank1IBAN as payt_run_doc_bkchnbk1iban preserving type ) AS BankChainBank1IBAN,
  cast(_PaymentProposalHeader.BankChainBank2Type as payt_run_doc_bkchnbk2type preserving type ) AS BankChainBank2Type,
  cast(_PaymentProposalHeader.BankChainBank2Country as payt_run_doc_bkchnbk2cntry preserving type ) AS BankChainBank2Country,
  cast(_PaymentProposalHeader.BankChainBank2 as payt_run_doc_bkchnbk2 preserving type ) AS BankChainBank2,
  cast(_PaymentProposalHeader.BankChainBank2BankAccount as payt_run_doc_bkchnbk2bkacct preserving type ) AS BankChainBank2BankAccount,
  _PaymentProposalHeader.BankChainBank2ControlKey AS BankChainBank2ControlKey,
  _PaymentProposalHeader.BankChainBank2DetailReference AS BankChainBank2DetailReference,
  cast(_PaymentProposalHeader.BankChainBank2IBAN as payt_run_doc_bkchnbk2iban preserving type ) AS BankChainBank2IBAN,
  cast(_PaymentProposalHeader.BankChainBank3Type as payt_run_doc_bkchnbk3type preserving type ) AS BankChainBank3Type,
  cast(_PaymentProposalHeader.BankChainBank3Country as payt_run_doc_bkchnbk3cntry preserving type ) AS BankChainBank3Country,
  cast(_PaymentProposalHeader.BankChainBank3 as payt_run_doc_bkchnbk3 preserving type ) AS BankChainBank3,
  cast(_PaymentProposalHeader.BankChainBank3BankAccount as payt_run_doc_bkchnbk3bkacct preserving type ) AS BankChainBank3BankAccount,
  _PaymentProposalHeader.BankChainBank3ControlKey AS BankChainBank3ControlKey,
  _PaymentProposalHeader.BankChainBank3DetailReference AS BankChainBank3DetailReference,
  cast(_PaymentProposalHeader.BankChainBank3IBAN as payt_run_doc_bkchnbk3iban preserving type ) AS BankChainBank3IBAN,
  _PaymentProposalHeader.PayeePaymentSystem AS PayeePaymentSystem,
  cast(_PaymentProposalHeader.PayeeAliasType as payt_run_doc_payeealiastype preserving type ) AS PayeeAliasType,
  cast(_PaymentProposalHeader.PayeeAliasName as payt_run_doc_payeealiasname preserving type ) AS PayeeAliasName,
  cast(_PaymentProposalHeader.CompanyCodeCurrency as payt_run_doc_cocodecrcy preserving type ) AS CompanyCodeCurrency,
  _PaymentProposalHeader.Country AS Country,
  _PaymentProposalHeader._DataExchangeInstructionKeys.IsUrgentPayment AS IsUrgentPayment,
  _PaymentProposalHeader._PaymentMethod.PaymentMethodName AS PaymentMethodName,
  _PaymentProposalHeader._PayeeAliasType.AliasTypeText AS AliasTypeText,
  _BankPaymentBatchItem.PaymentBatchItem AS PaymentBatchItem,
  _BankPaymentBatchItem.BatchUUID AS BatchUUID,
  cast(_BankPaymentBatchItem.SWIFTGPIReason as payt_run_doc_paytstsrsn preserving type ) AS SWIFTGPIReason,
  cast(_BankPaymentBatchItem.PaymentBatchItemCurrentStatus as payt_run_doc_paytbatitmcursts preserving type ) AS PaymentBatchItemCurrentStatus,
  _BankPaymentBatchRuleBaseCust.PaymentBatchRuleCurrency AS PaymentBatchRuleCurrency,
  _CompanyCode.FiscalYearVariant AS FiscalYearVariant
FROM I_BkPaytRunDocCrsPaytRunPayt
LEFT OUTER JOIN I_PaymentProposalHeader AS _PaymentProposalHeader ON PaymentRunID = _PaymentProposalHeader.PaymentRunID AND PaymentRunDate = _PaymentProposalHeader.PaymentRunDate AND PayingCompanyCode = _PaymentProposalHeader.PayingCompanyCode AND Supplier = _PaymentProposalHeader.Supplier AND Customer = _PaymentProposalHeader.Customer AND PaymentRecipient = _PaymentProposalHeader.PaymentRecipient AND PaymentDocument = _PaymentProposalHeader.PaymentDocument AND ' ' = _PaymentProposalHeader.PaymentRunIsProposal  -- association [1..1]
LEFT OUTER JOIN I_BankPaymentBatchItem AS _BankPaymentBatchItem ON PaymentRunID = _BankPaymentBatchItem.PaymentRunID AND PaymentRunDate = _BankPaymentBatchItem.PaymentRunDate AND PayingCompanyCode = _BankPaymentBatchItem.PayingCompanyCode AND Supplier = _BankPaymentBatchItem.Supplier AND Customer = _BankPaymentBatchItem.Customer AND PaymentRecipient = _BankPaymentBatchItem.PaymentRecipient AND PaymentDocument = _BankPaymentBatchItem.PaymentDocument AND PaymentBatch = _BankPaymentBatchItem.PaymentBatch  -- association [0..1]
LEFT OUTER JOIN I_BkPaytRunDocSettlementData AS _BkPaytRunDocMergeData ON PaymentRunMergeIdentifier = _BkPaytRunDocMergeData.PaymentRunID AND PaymentRunMergeDate = _BkPaytRunDocMergeData.PaymentRunDate AND PayingCompanyCode = _BkPaytRunDocMergeData.PayingCompanyCode AND Supplier = _BkPaytRunDocMergeData.Supplier AND Customer = _BkPaytRunDocMergeData.Customer AND PaymentRecipient = _BkPaytRunDocMergeData.PaymentRecipient AND PaymentDocument = _BkPaytRunDocMergeData.PaymentDocument  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_BankPaymentBatchRuleBaseCust AS _BankPaymentBatchRuleBaseCust ON /* condition not available in parsed metadata */  -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON PayingCompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_PaymentReasonText AS _PaymentReasonText ON paymentreason = _PaymentReasonText.PaymentReason AND _PaymentReasonText.Language = $session.system_language  -- association [0..1]
;