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_ARBankStatementItemTP.
-- 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.
-- SQL view name: IBANKSTMTITEMTP
CREATE VIEW I_ARBankStatementItemTP AS
SELECT
item.BankStatementShortID AS BankStatementShortID,
item.BankStatementItem AS BankStatementItem,
item.TransactionCurrency AS TransactionCurrency,
cast ( item.OriginalCurrency as farp_fwaer ) AS OriginalCurrency,
item.BankLedgerIsPosted AS BankLedgerIsPosted,
item.SubledgerIsPostedSuccessfully AS SubledgerIsPostedSuccessfully,
item.AmountInTransactionCurrency AS AmountInTransactionCurrency,
cast ( item.BankStatementItemGroup as farp_grpnr ) AS BankStatementItemGroup,
cast ( item.PaymentManualTransacType as far_vgman ) AS PaymentManualTransacType,
cast ( item.PaymentManualTransacTypeName as far_vgman_text ) AS PaymentManualTransacTypeName,
item.BankStatementPostingRule AS BankStatementPostingRule,
item.BankStatementPostingRuleName AS BankStatementPostingRuleName,
cast ( item.PaymentTransaction as farp_vorgc ) AS PaymentTransaction,
cast ( item.PaymentTransactionCategory as fac_bs_it_tatyp ) AS PaymentTransactionCategory,
cast ( item.PaymentTransactionCategoryName as fac_bs_it_tatxt ) AS PaymentTransactionCategoryName,
item.InterpretationAlgorithm AS InterpretationAlgorithm,
cast ( item.ValueDate as farp_valut ) AS ValueDate,
cast ( item.PaymentAdviceAccountType as farp_avkoa ) AS PaymentAdviceAccountType,
item.PaymentAdviceAccountTypeName AS PaymentAdviceAccountTypeName,
cast ( item.HasAttachment as far_d_has_attch ) AS HasAttachment,
cast ( item.MemoLineIsChanged as farp_n2pchgind ) AS MemoLineIsChanged,
item.MemoLine1 AS MemoLine1,
_MemoLine.OriginalMemoLine AS OriginalMemoLine,
_MemoLine.MemoLine AS MemoLine,
cast ( item.IsInProcess as far_d_in_process ) AS IsInProcess,
item.BankInternalID AS BankInternalID,
item.BankAccount AS BankAccount,
item.BankAccountInternalID AS BankAccountInternalID,
cast ( item.AmountInOriginalCurrency as farp_fwbtr ) AS AmountInOriginalCurrency,
cast ( item.ExchangeRate as far_curr_rate ) AS ExchangeRate,
item.DebitCreditCode AS DebitCreditCode,
item.BusinessPartnerName AS BusinessPartnerName,
cast ( item.PaymentAdvice as farp_avsid ) AS PaymentAdvice,
cast ( item.BankPostingDate as farp_bvdat) AS BankPostingDate,
cast ( item.PostingDate as farp_budat ) AS PostingDate,
item.ValueDateTime AS ValueDateTime,
cast ( item.PaymentExternalTransacType as farp_vgext ) AS PaymentExternalTransacType,
cast ( item.PaymentTransactionDescription as farp_butxt ) AS PaymentTransactionDescription,
cast ( item.AccountingClerk as farp_busab) AS AccountingClerk,
item.CostCenter AS CostCenter,
item.BusinessArea AS BusinessArea,
item.ProfitCenter AS ProfitCenter,
item.TreasuryContract AS TreasuryContract,
item.TreasuryContractType AS TreasuryContractType,
item.DaybookEntry AS DaybookEntry,
cast ( item.Cheque as farp_chect ) AS Cheque,
cast ( item.PaymentMediumReference as far_chect ) AS PaymentMediumReference,
cast ( item.CustomerReferenceNumber as far_chect_orig ) AS CustomerReferenceNumber,
cast ( item.PostingErrorStatus as farp_estat ) AS PostingErrorStatus,
cast ( item.BankLedgerDocument as farp_belnr_bank_ledger ) AS BankLedgerDocument,
item.FiscalYear AS FiscalYear,
cast ( item.FeeAmountInTransactionCrcy as farp_spesk ) AS FeeAmountInTransactionCrcy,
cast ( item.FeeAmountInOriginalCrcy as farp_spesf ) AS FeeAmountInOriginalCrcy,
cast ( item.BankPostingKey as farp_texts ) AS BankPostingKey,
item.AcctDetnFreeDefinedAttribute AS AcctDetnFreeDefinedAttribute,
item.DocumentReferenceID AS DocumentReferenceID,
cast ( item.AssignmentReference as farp_zuonr ) AS AssignmentReference,
cast ( item.PartnerBankCountry as farp_pabks ) AS PartnerBankCountry,
cast ( item.PartnerBank as farp_pablz ) AS PartnerBank,
cast ( item.PartnerBankSWIFTCode as paswi_eb) AS PartnerBankSWIFTCode,
cast ( item.PartnerBankAccount as farp_pakto ) AS PartnerBankAccount,
cast ( item.BankStatementItemDescription1 as farp_info1 ) AS BankStatementItemDescription1,
cast ( item.BankStatementItemDescription2 as farp_info2 ) AS BankStatementItemDescription2,
cast ( item.BankLedgerOnAccountDocument as farp_ak1bl) AS BankLedgerOnAccountDocument,
cast ( item.SubledgerOnAccountDocument as farp_akbln ) AS SubledgerOnAccountDocument,
item.PayerParty AS PayerParty,
item.BankStatementItemLifeCycSts AS BankStatementItemLifeCycSts,
cast ( item.BankStatementItmLifeCycStsName as farp_bs_itm_lifecyc_stat_name ) AS BankStatementItmLifeCycStsName,
cast ( item.AccountingExchangeRate as farp_kursf ) AS AccountingExchangeRate,
cast ( item.DocumentItemText as far_sgtxt) AS DocumentItemText,
cast ( item.BillOfExchangeFailureDate as farp_boe_failure_date ) AS BillOfExchangeFailureDate,
cast ( item.BankReference as farp_vgref ) AS BankReference,
cast ( item.ReferenceDocument as farp_awkey ) AS ReferenceDocument,
cast ( item.ReferenceDocumentType as farp_xbtyp ) AS ReferenceDocumentType,
cast ( item.OverdueChargeAmtInTransacCrcy as farp_arrsk ) AS OverdueChargeAmtInTransacCrcy,
item.BankStmntItemProcessingType AS BankStmntItemProcessingType,
item.PaymentReference AS PaymentReference,
cast ( item.ReturnReason as farp_return_reason ) AS ReturnReason,
item.DunningBlockingReason AS DunningBlockingReason,
cast ( item.BankLedgerExternalApplication as farp_applk ) AS BankLedgerExternalApplication,
cast ( item.BankLedgerPostingIsSuppressed as farp_b1std ) AS BankLedgerPostingIsSuppressed,
cast ( item.BankLedgerExtPostgErrorStatus as farp_b1err ) AS BankLedgerExtPostgErrorStatus,
cast ( item.BankLedgerExtPostingDocument as farp_b1doc ) AS BankLedgerExtPostingDocument,
cast ( item.BankLedgerExtPostingRefDocType as farp_b1typ ) AS BankLedgerExtPostingRefDocType,
cast ( item.SubledgerExtPostingApplication as farp_b2app ) AS SubledgerExtPostingApplication,
cast ( item.SubledgerPostingIsSuppressed as farp_b2std ) AS SubledgerPostingIsSuppressed,
cast ( item.SubledgerExtPostingErrorStatus as farp_b2err ) AS SubledgerExtPostingErrorStatus,
cast ( item.SubledgerExtPostingDocument as farp_b2doc ) AS SubledgerExtPostingDocument,
cast ( item.SubledgerExtPostingRefDocType as farp_b2typ ) AS SubledgerExtPostingRefDocType,
item.PartnerBankIBAN AS PartnerBankIBAN,
item.BankStmntProcessingApplication AS BankStmntProcessingApplication,
item.AccountServicerReference AS AccountServicerReference,
item.BankStatementItemStatusByBank AS BankStatementItemStatusByBank,
item.BankStmntItmProcessingCategory AS BankStmntItmProcessingCategory,
hdr.CompanyCode AS CompanyCode,
cast( item.IsCompleted as far_completed_status ) AS IsCompleted,
cast('Log' as far_applog) AS ApplicationLog,
cast ( 7 as fdc_ux_fc ) AS UxFcPaymentManualTransacType,
cast ( 7 as fdc_ux_fc ) AS UxFcValueDate,
cast ( 7 as fdc_ux_fc ) AS UxFcAmountInOriginalCurrency
FROM P_ARBankStatementItemIDBS AS item
LEFT OUTER JOIN I_Arbankstatement AS hdr ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ARBankStatementTP AS _BankStatement ON item.BankStatementShortID = _BankStatement.BankStatementShortID -- association [1..1]
LEFT OUTER JOIN I_ARBankStatementItemDetailTP AS _SubItem ON item.BankStatementShortID = _SubItem.BankStatementShortID AND item.BankStatementItem = _SubItem.BankStatementItem -- association [0..*]
LEFT OUTER JOIN I_Currency AS _Currency ON _Currency.Currency = TransactionCurrency -- association [0..1]
LEFT OUTER JOIN I_Currency AS _OriginalCurrency ON _OriginalCurrency.Currency = OriginalCurrency -- association [0..1]
LEFT OUTER JOIN I_Arbsitmemolinewithorig AS _MemoLine ON BankStatementShortID = _MemoLine.BankStatementShortID AND BankStatementItem = _MemoLine.BankStatementItem -- association [0..1]
LEFT OUTER JOIN I_Armanualtransactionvh AS _PaymentManualTransacTypeVH ON PaymentManualTransacType = _PaymentManualTransacTypeVH.PaymentManualTransacType -- association [0..*]
;