C_TreasuryPostingJournal

DDL: C_TREASURYPOSTINGJOURNAL SQL: CTRLPOSTJOURNAL Type: view CONSUMPTION

Treasury Posting Journal

C_TreasuryPostingJournal is a Consumption CDS View that provides data about "Treasury Posting Journal" in SAP S/4HANA. It reads from 4 data sources (P_TrsyLdgrPosAccountingItem, P_PosIdfrTrsyLdgrTrsyAcctg, I_FinInstrProductGroup, P_PositionIdentifierCompCode) and exposes 203 fields with key fields TrsyAccountingDocumentUUID, AccountingDocumentItemRef, TrsyPositionContextUUID. It has 25 associations to related views.

Data Sources (4)

SourceAliasJoin Type
P_TrsyLdgrPosAccountingItem AccItem from
P_PosIdfrTrsyLdgrTrsyAcctg DifsDiff inner
I_FinInstrProductGroup I_FinInstrProductGroup inner
P_PositionIdentifierCompCode Position inner

Associations (25)

CardinalityTargetAliasCondition
[0..1] I_TrgtUserData _TrgtUserData AccItem.TreasuryUserStatisticsUUID = _TrgtUserData.TreasuryUserStatisticsUUID
[0..1] I_TreasuryPaymentRequest _TreasuryPaymentRequest AccItem.TreasuryBusinessTransaction = _TreasuryPaymentRequest.TreasuryBusinessTransaction and AccItem.TreasuryValuationArea = _TreasuryPaymentRequest.TreasuryValuationArea and $projection.TreasuryTransactionFlow = _TreasuryPaymentRequest.TreasuryTransactionFlow and $projection.GLAccount = _TreasuryPaymentRequest.GLAccount
[0..1] I_TrltPosattrib _TrltPosAttrib DifsDiff.TrsyLdgrTreasuryPosition = _TrltPosAttrib.TreasuryPosition
[0..1] I_GLAccountText _GLAccountText $projection.GLAccount = _GLAccountText.GLAccount and Position.ChartOfAccounts = _GLAccountText.ChartOfAccounts and _GLAccountText.Language = $session.system_language
[0..1] I_CostCenterText _CostCenterText AccItem.CostCenter = _CostCenterText.CostCenter and Position.ControllingArea = _CostCenterText.ControllingArea and AccItem.DocumentDate = _CostCenterText.ValidityEndDate and _CostCenterText.Language = $session.system_language
[0..1] I_FundText _FundText Position.Fund = _FundText.Fund and Position.FinancialManagementArea = _FundText.FinancialManagementArea and _FundText.Language = $session.system_language
[0..1] I_FinancialTransaction _FinancialTransaction Position.FinancialTransaction = _FinancialTransaction.FinancialTransaction and Position.CompanyCode = _FinancialTransaction.CompanyCode
[0..1] I_TreasuryValuationClass _TreasuryValuationClass $projection.TreasuryValuationClass = _TreasuryValuationClass.TreasuryValuationClass and $projection.TreasuryValuationArea = _TreasuryValuationClass.TreasuryValuationArea
[0..1] I_LoanContract _LoanContract $projection.LoanContract = _LoanContract.LoanContract and $projection.CompanyCode = _LoanContract.CompanyCode
[0..1] I_TreasuryPositionAccount _TreasuryPositionAccount $projection.TreasuryPositionAccount = _TreasuryPositionAccount.TreasuryPositionAccount and $projection.CompanyCode = _TreasuryPositionAccount.CompanyCode
[0..1] I_FinancialTransactionVH _FinancialTransactionVH $projection.FinancialTransaction = _FinancialTransactionVH.FinancialTransaction and $projection.CompanyCode = _FinancialTransactionVH.CompanyCode
[0..1] I_FinancialTransactionVH _ActivFinancialTransactionVH $projection.activityfinancialtransaction = _ActivFinancialTransactionVH.FinancialTransaction and $projection.CompanyCode = _ActivFinancialTransactionVH.CompanyCode
[0..1] I_Housebank _HouseBank $projection.CompanyCode = _HouseBank.CompanyCode and AccItem.HouseBank = _HouseBank.HouseBank
[0..1] I_HouseBankAccountText _HouseBankAccountText $projection.CompanyCode = _HouseBankAccountText.CompanyCode and AccItem.HouseBank = _HouseBankAccountText.HouseBank and AccItem.HouseBankAccount = _HouseBankAccountText.HouseBankAccount and _HouseBankAccountText.Language = $session.system_language
[0..1] I_Supplier _Supplier AccItem.Supplier = _Supplier.Supplier
[0..1] I_Customer _Customer AccItem.Customer = _Customer.Customer
[0..1] I_HouseBankAccountVH _HouseBankAccountVH $projection.CompanyCode = _HouseBankAccountVH.CompanyCode and $projection.HouseBank = _HouseBankAccountVH.HouseBank and $projection.HouseBankAccount = _HouseBankAccountVH.HouseBankAccount
[0..1] I_CentralClearingAccountVH _CentralClearingAccountVH $projection.CompanyCode = _CentralClearingAccountVH.CompanyCode and $projection.CentralClearingAccount = _CentralClearingAccountVH.CentralClearingAccount
[0..1] I_TrsyFinExpsrItmText _TrsyFinExpsrItmText Position.FinancialExposureItem = _TrsyFinExpsrItmText.FinancialExposureItem
[0..1] I_TrsyFinExpsrSubitemText _TrsyFinExpsrSubitemText DifsDiff.TrsyLdgrTreasuryPosition = _TrsyFinExpsrSubitemText.TreasuryPosition
[0..1] I_TrsyPosCustomDiffntnTerm1 _TrsyPosCustomDiffntnTerm1 Position.TrsyPosCustomDiffntnTerm1 = _TrsyPosCustomDiffntnTerm1.TrsyPosCustomDiffntnTerm1
[0..1] I_TrsyPosCustomDiffntnTerm2 _TrsyPosCustomDiffntnTerm2 Position.TrsyPosCustomDiffntnTerm2 = _TrsyPosCustomDiffntnTerm2.TrsyPosCustomDiffntnTerm2
[0..1] I_TrsyPosCustomDiffntnTerm3 _TrsyPosCustomDiffntnTerm3 Position.TrsyPosCustomDiffntnTerm3 = _TrsyPosCustomDiffntnTerm3.TrsyPosCustomDiffntnTerm3
[0..1] I_TrsyPosCustomDiffntnTerm4 _TrsyPosCustomDiffntnTerm4 Position.TrsyPosCustomDiffntnTerm4 = _TrsyPosCustomDiffntnTerm4.TrsyPosCustomDiffntnTerm4
[0..1] I_TrsyPosCustomDiffntnTerm5 _TrsyPosCustomDiffntnTerm5 Position.TrsyPosCustomDiffntnTerm5 = _TrsyPosCustomDiffntnTerm5.TrsyPosCustomDiffntnTerm5

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName CTRLPOSTJOURNAL view
AbapCatalog.compiler.compareFilter true view
AccessControl.personalData.blocking #NOT_REQUIRED view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #CONSUMPTION view
EndUserText.label Treasury Posting Journal view
Analytics.internalName #LOCAL view
Metadata.allowExtensions true view

Fields (203)

KeyFieldSource TableSource FieldDescription
KEY TrsyAccountingDocumentUUID P_TrsyLdgrPosAccountingItem TrsyAccountingDocumentUUID
KEY AccountingDocumentItemRef P_TrsyLdgrPosAccountingItem AccountingDocumentItemRef Position
KEY TrsyPositionContextUUID P_TrsyLdgrPosAccountingItem TrsyPositionContextUUID
FinInstrProductGroup I_FinInstrProductGroup FinInstrProductGroup
FinInstrProductGroupName
TreasuryPostingStatus
TreasuryPostingStatusName
TreasuryUpdateType P_TrsyLdgrPosAccountingItem TreasuryUpdateType
TreasuryUpdateTypeName
IsUsedInPaymentTransaction P_TrsyLdgrPosAccountingItem IsUsedInPaymentTransaction Is Used In Payment Transaction
TreasuryGLAccountAssignmentRef P_TrsyLdgrPosAccountingItem TreasuryGLAccountAssignmentRef
TreasuryGLAccountAssignRefName
TreasuryPostingCategory P_TrsyLdgrPosAccountingItem TreasuryPostingCategory
TreasuryPostingCategoryName
TreasuryGLAccountSymbol P_TrsyLdgrPosAccountingItem TreasuryGLAccountSymbol
TreasuryGLAccountSymbolName
PostingKey P_TrsyLdgrPosAccountingItem PostingKey Posting Key
PostingKeyName
GLAccount P_TrsyLdgrPosAccountingItem GLAccount General Ledger
GLAccountLongName
PositionCurrency P_TrsyLdgrPosAccountingItem PositionCurrency
AmountInPositionCurrency P_TrsyLdgrPosAccountingItem AmountInPositionCurrency
CompanyCodeCurrency P_TrsyLdgrPosAccountingItem CompanyCodeCurrency Local Currency
AmountInCompanyCodeCurrency P_TrsyLdgrPosAccountingItem AmountInCompanyCodeCurrency Local Crcy Amt
TreasuryTransactionFlow P_TrsyLdgrPosAccountingItem TreasuryTransactionFlow
AccountingDocument P_TrsyLdgrPosAccountingItem AccountingDocument Journal Entry
ReverseDocument P_TrsyLdgrPosAccountingItem ReverseDocument Reversed With
JournalEntryType P_TrsyLdgrPosAccountingItem JournalEntryType Journal Entry Type
AccountingDocumentTypeName
PaymentDate P_TrsyLdgrPosAccountingItem PaymentDate Payment Date
Customer P_TrsyLdgrPosAccountingItem Customer Sold-to Party
CustomerName
Supplier
SupplierName
PaymentTerms P_TrsyLdgrPosAccountingItem PaymentTerms Pyt Terms
PaymentMethod P_TrsyLdgrPosAccountingItem PaymentMethod Pymt Meth.
PaymentMethodName
PaymentMethodSupplement P_TrsyLdgrPosAccountingItem PaymentMethodSupplement Pmnt Meth. Sup.
PaymentMethodSupplementName
PaymentBlockingReason P_TrsyLdgrPosAccountingItem PaymentBlockingReason Pmnt block
PaymentBlockingReasonName
PayerPayee _TreasuryPaymentRequest PayerPayee
PayerPayeeFullName
BPBankAccountInternalID _TreasuryPaymentRequest BPBankAccountInternalID BP Bank Account
HouseBank P_TrsyLdgrPosAccountingItem HouseBank House Bank
HouseBankName
HouseBankAccount P_TrsyLdgrPosAccountingItem HouseBankAccount House Bank Account
HouseBankAccountDescription
TreasuryPaymentFlowDirection _TreasuryPaymentRequest TreasuryPaymentFlowDirection
StateCentralBankPaymentReason P_TrsyLdgrPosAccountingItem StateCentralBankPaymentReason SCB Ind.
SupplyingCountry P_TrsyLdgrPosAccountingItem SupplyingCountry Supplying Ctry/Reg.
Country
CountryName
AssignmentReference P_TrsyLdgrPosAccountingItem AssignmentReference Assignment Reference
JournalEntryItemText P_TrsyLdgrPosAccountingItem JournalEntryItemText
BusinessArea P_TrsyLdgrPosAccountingItem BusinessArea Business Area
BusinessAreaName
CostCenter P_TrsyLdgrPosAccountingItem CostCenter Cost Center
CostCenterName
FinancialTransactionType P_TrsyLdgrPosAccountingItem FinancialTransactionType Transact. Type
FinancialTransactionTypeName
PartnerCompany P_TrsyLdgrPosAccountingItem PartnerCompany Trading Partner
CompanyName
Counterparty P_TrsyLdgrPosAccountingItem Counterparty Supplier
CounterpartyFullName
Issuer P_TrsyLdgrPosAccountingItem Issuer User Name
IssuerFullName
SpecialGLCode P_TrsyLdgrPosAccountingItem SpecialGLCode Special G/L Ind
SpecialGLCodeName
TreasuryBusinessTransaction
TreasuryValuationArea P_PositionIdentifierCompCode TreasuryValuationArea
TreasuryValuationAreaName
ReferenceDocument
ReferenceDocumentContext
PostingDate
PostingFiscalPeriod
FiscalYear
ReversalReferenceDocument
ReversalReferenceDocumentCntxt
ReverseDocumentPostingDate
ReverseDocumentFiscalPeriod
ReverseDocumentFiscalYear
DocumentDate
AccountingPrinciple
TreasuryAcctgPostingCategory
TreasuryBusinessTransCategory
TreasuryBusTransCategoryName
DocumentHeaderText
AccountingDocExternalReference
FinancialInstrValuationClass P_PositionIdentifierCompCode FinancialInstrValuationClass
FinancialInstrValClassName
TreasuryValuationClass P_PositionIdentifierCompCode TreasuryValuationClass
TreasuryValuationClassName
CompanyCode P_PositionIdentifierCompCode CompanyCode Receiver Company Code
CompanyCodeName
ChartOfAccounts
FinancialInstrumentProductType P_PositionIdentifierCompCode FinancialInstrumentProductType Product Type
FinancialInstrProdTypeName
SecurityAccount P_PositionIdentifierCompCode SecurityAccount
SecurityAccountName
SecurityClass P_PositionIdentifierCompCode SecurityClass
SecurityClassName
SecurityClassDescription
DifferentiationPortfolio P_PositionIdentifierCompCode DifferentiationPortfolio
DifferentiationPortfolioName
SecurityAccountGroup P_PositionIdentifierCompCode SecurityAccountGroup
SecurityAccountGroupName
LoanContract P_PositionIdentifierCompCode LoanContract
LoanContractName
TreasuryPositionAccount P_PositionIdentifierCompCode TreasuryPositionAccount
TreasuryPositionAccountName
TreasuryPositionLongShortCode P_PositionIdentifierCompCode TreasuryPositionLongShortCode
Fund P_PositionIdentifierCompCode Fund Sender Fund
FundName
GrantID P_PositionIdentifierCompCode GrantID Sender Grant
WBSElementExternalID P_PositionIdentifierCompCode WBSElementExternalID WBS Element External ID
ProfitCenter P_PositionIdentifierCompCode ProfitCenter Profit Center
FunctionalArea P_PositionIdentifierCompCode FunctionalArea Sendr Fctl Area
TrsyPosCustomDiffntnTerm1 P_PositionIdentifierCompCode TrsyPosCustomDiffntnTerm1
TrsyPosCustomDiffntnTerm1Name
TrsyPosCustomDiffntnTerm2 P_PositionIdentifierCompCode TrsyPosCustomDiffntnTerm2
TrsyPosCustomDiffntnTerm2Name
TrsyPosCustomDiffntnTerm3 P_PositionIdentifierCompCode TrsyPosCustomDiffntnTerm3
TrsyPosCustomDiffntnTerm3Name
TrsyPosCustomDiffntnTerm4 P_PositionIdentifierCompCode TrsyPosCustomDiffntnTerm4
TrsyPosCustomDiffntnTerm4Name
TrsyPosCustomDiffntnTerm5 P_PositionIdentifierCompCode TrsyPosCustomDiffntnTerm5
TrsyPosCustomDiffntnTerm5Name
CentralClearingAccount P_PositionIdentifierCompCode CentralClearingAccount
CentralClearingAccountName
ActivityFinancialTransaction
FinancialTransaction P_PositionIdentifierCompCode FinancialTransaction Transaction
FinancialInstrTransactionType _FinancialTransaction FinancialInstrTransactionType
FinancialInstrTransTypeName
FinancialInstrCharacteristic _FinancialTransaction FinancialInstrCharacteristic Characteristics
FinancialInstrumentReference _FinancialTransaction FinancialInstrumentReference
FinancialInstrumentAssignment _FinancialTransaction FinancialInstrumentAssignment
Portfolio _FinancialTransaction Portfolio Portfolio
LetterOfCredit
HedgingClassification _FinancialTransaction HedgingClassification
HedgingClassificationName
CreatedByUser _TrgtUserData CreatedByUser User Name
CreationDate _TrgtUserData CreationDate Time Stamp
LastChangedByUser _TrgtUserData LastChangedByUser User Name
PaymentRequest _TreasuryPaymentRequest PaymentRequest
PaytReqOriglReferenceDocument _TreasuryPaymentRequest PaytReqOriglReferenceDocument
PaymentCurrency _TreasuryPaymentRequest PaymentCurrency Payment Currency
AmountInPaymentCurrency _TreasuryPaymentRequest AmountInPaymentCurrency Amount in Payment Currency
TreasuryIndividualPayment _TreasuryPaymentRequest TreasuryIndividualPayment
TrsyPaytGroupingSameDrctnIsRqd _TreasuryPaymentRequest TrsyPaytGroupingSameDrctnIsRqd
TreasuryPaymentRequestGrouping _TreasuryPaymentRequest TreasuryPaymentRequestGrouping
TrsyPaytRequestGroupingName _TreasuryPaymentRequest TrsyPaytRequestGroupingName
PaymentRequestPaymentGroup _TreasuryPaymentRequest PaymentRequestPaymentGroup
ConsideredPaymentMethods _TreasuryPaymentRequest ConsideredPaymentMethods
PaytReqAdditionalInstructions _TreasuryPaymentRequest PaytReqAdditionalInstructions
PaytReqAddlInstructionsName _TreasuryPaymentRequest PaytReqAddlInstructionsName
BankClearingGLAccount _TreasuryPaymentRequest BankClearingGLAccount
TrsyPaytRequestReleaseStatus _TreasuryPaymentRequest TrsyPaytRequestReleaseStatus
TrsyPaytRequestRelStatusName _TreasuryPaymentRequest TrsyPaytRequestRelStatusName
PaymentReason _TreasuryPaymentRequest PaymentReason Payment Reason
TrsyPosFreeDefinedAttribute1 _TrltPosAttrib TrsyPosFreeDefinedAttribute1
TrsyPosFreeDefinedAttribute2 _TrltPosAttrib TrsyPosFreeDefinedAttribute2
TrsyPosFreeDefinedAttribute3 _TrltPosAttrib TrsyPosFreeDefinedAttribute3
TrsyPosFreeDefinedAttribute4 _TrltPosAttrib TrsyPosFreeDefinedAttribute4
TrsyPosFreeDefinedAttribute5 _TrltPosAttrib TrsyPosFreeDefinedAttribute5
TrsyPosFreeDefinedAttribute6 _TrltPosAttrib TrsyPosFreeDefinedAttribute6
TrsyPosFreeDefinedAttribute7 _TrltPosAttrib TrsyPosFreeDefinedAttribute7
TrsyPosFreeDefinedAttribute8 _TrltPosAttrib TrsyPosFreeDefinedAttribute8
TrsyPosFreeDefinedAttribute9 _TrltPosAttrib TrsyPosFreeDefinedAttribute9
TrsyPosFreeDfndAttribute1Name _TrltPosAttrib TrsyPosFreeDfndAttribute1Name
TrsyPosFreeDfndAttribute2Name _TrltPosAttrib TrsyPosFreeDfndAttribute2Name
TrsyPosFreeDfndAttribute3Name _TrltPosAttrib TrsyPosFreeDfndAttribute3Name
TrsyPosFreeDfndAttribute4Name _TrltPosAttrib TrsyPosFreeDfndAttribute4Name
TrsyPosFreeDfndAttribute5Name _TrltPosAttrib TrsyPosFreeDfndAttribute5Name
TrsyPosFreeDfndAttribute6Name _TrltPosAttrib TrsyPosFreeDfndAttribute6Name
TreasuryAccountingCode P_PositionIdentifierCompCode TreasuryAccountingCode
FinancialExposureItem P_PositionIdentifierCompCode FinancialExposureItem
FinancialExposureItemName _TrsyFinExpsrItmText FinancialExposureItemName
FinancialExposureSubItem P_PositionIdentifierCompCode FinancialExposureSubItem
FinancialExposureSubItemName _TrsyFinExpsrSubitemText FinancialExposureSubItemName
_FinancialTransaction _FinancialTransaction
_TreasuryValuationClass _TreasuryValuationClass
_LoanContract _LoanContract
_TreasuryPositionAccount _TreasuryPositionAccount
_Country P_TrsyLdgrPosAccountingItem _Country
_PaymentBlockingReason P_TrsyLdgrPosAccountingItem _PaymentBlockingReason
_FinancialTransactionType P_TrsyLdgrPosAccountingItem _FinancialTransactionType
_PostingKey P_TrsyLdgrPosAccountingItem _PostingKey
_Paymentmethodsupplement P_TrsyLdgrPosAccountingItem _Paymentmethodsupplement
_CompanyCode P_PositionIdentifierCompCode _CompanyCode
_TreasuryValuationArea P_PositionIdentifierCompCode _TreasuryValuationArea
_AccountingPrinciple
_FinancialTransactionVH _FinancialTransactionVH
_ActivFinancialTransactionVH _ActivFinancialTransactionVH
_SecurityAccountGroup P_PositionIdentifierCompCode _SecurityAccountGroup
_CentralClearingAccountVH _CentralClearingAccountVH
_TrsyAcctItemDocument P_TrsyLdgrPosAccountingItem _TrsyAcctItemDocument
_TrsyAcctItemPosContext P_TrsyLdgrPosAccountingItem _TrsyAcctItemPosContext
_TrsyPosCustomDiffntnTerm1 _TrsyPosCustomDiffntnTerm1
_TrsyPosCustomDiffntnTerm2 _TrsyPosCustomDiffntnTerm2
_TrsyPosCustomDiffntnTerm3 _TrsyPosCustomDiffntnTerm3
_TrsyPosCustomDiffntnTerm4 _TrsyPosCustomDiffntnTerm4
_TrsyPosCustomDiffntnTerm5 _TrsyPosCustomDiffntnTerm5

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 C_TreasuryPostingJournal.
-- 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: CTRLPOSTJOURNAL

CREATE VIEW C_TreasuryPostingJournal AS
SELECT
  AccItem.TrsyAccountingDocumentUUID AS TrsyAccountingDocumentUUID,
  AccItem.AccountingDocumentItemRef AS AccountingDocumentItemRef,
  AccItem.TrsyPositionContextUUID AS TrsyPositionContextUUID,
  I_FinInstrProductGroup.FinInstrProductGroup AS FinInstrProductGroup,
  I_FinInstrProductGroup._FinInstrProductGroupText[1: Language=$session.system_language].FinInstrProductGroupName AS FinInstrProductGroupName,
  AccItem._TrsyAcctItemDocument.TreasuryPostingStatus AS TreasuryPostingStatus,
  AccItem._TrsyAcctItemDocument._TreasuryPostingStatus._Text[1: Language=$session.system_language].TreasuryPostingStatusName AS TreasuryPostingStatusName,
  AccItem.TreasuryUpdateType AS TreasuryUpdateType,
  AccItem._TreasuryUpdateType._Text[1: Language=$session.system_language].TreasuryUpdateTypeName AS TreasuryUpdateTypeName,
  AccItem.IsUsedInPaymentTransaction AS IsUsedInPaymentTransaction,
  AccItem.TreasuryGLAccountAssignmentRef AS TreasuryGLAccountAssignmentRef,
  AccItem._TreasuryGLAccountAssignRef._Text[1: Language=$session.system_language].TreasuryGLAccountAssignRefName AS TreasuryGLAccountAssignRefName,
  AccItem.TreasuryPostingCategory AS TreasuryPostingCategory,
  AccItem._TreasuryPostingCategory._Text[1: Language=$session.system_language].TreasuryPostingCategoryName AS TreasuryPostingCategoryName,
  AccItem.TreasuryGLAccountSymbol AS TreasuryGLAccountSymbol,
  AccItem._TreasuryGLAccountSymbol._Text[1: Language=$session.system_language].TreasuryGLAccountSymbolName AS TreasuryGLAccountSymbolName,
  AccItem.PostingKey AS PostingKey,
  AccItem._PostingKey._PostingKeyText[1: Language=$session.system_language].PostingKeyName AS PostingKeyName,
  AccItem.GLAccount AS GLAccount,
  cast(_GLAccountText[1: Language=$session.system_language].GLAccountLongName as ftr_gen_gl_account_description preserving type ) AS GLAccountLongName,
  AccItem.PositionCurrency AS PositionCurrency,
  AccItem.AmountInPositionCurrency AS AmountInPositionCurrency,
  AccItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  AccItem.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  AccItem.TreasuryTransactionFlow AS TreasuryTransactionFlow,
  AccItem.AccountingDocument AS AccountingDocument,
  AccItem.ReverseDocument AS ReverseDocument,
  AccItem.JournalEntryType AS JournalEntryType,
  AccItem._AccountingDocumentType._Text[1: Language=$session.system_language].AccountingDocumentTypeName AS AccountingDocumentTypeName,
  AccItem.PaymentDate AS PaymentDate,
  AccItem.Customer AS Customer,
  cast(_Customer.BusinessPartnerName1 as ftr_gen_customer_name) AS CustomerName,
  cast(AccItem.Supplier as ftr_gen_supplier) AS Supplier,
  cast(_Supplier._AddressDefaultRepresentation.AddresseeName1 as ftr_gen_supplier_name) AS SupplierName,
  AccItem.PaymentTerms AS PaymentTerms,
  AccItem.PaymentMethod AS PaymentMethod,
  AccItem._PaymentMethod.PaymentMethodName AS PaymentMethodName,
  AccItem.PaymentMethodSupplement AS PaymentMethodSupplement,
  AccItem._Paymentmethodsupplement._Text[1: Language=$session.system_language].PaymentMethodSupplementName AS PaymentMethodSupplementName,
  AccItem.PaymentBlockingReason AS PaymentBlockingReason,
  cast(AccItem._PaymentBlockingReason._Text[1: Language=$session.system_language].PaymentBlockingReasonName as ftr_gen_pay_block_reason_name preserving type ) AS PaymentBlockingReasonName,
  _TreasuryPaymentRequest.PayerPayee AS PayerPayee,
  AccItem._PayerPayee.PayerPayeeFullName AS PayerPayeeFullName,
  _TreasuryPaymentRequest.BPBankAccountInternalID AS BPBankAccountInternalID,
  AccItem.HouseBank AS HouseBank,
  cast(_HouseBank._Bank.BankName as ftr_gen_house_bank_name) AS HouseBankName,
  AccItem.HouseBankAccount AS HouseBankAccount,
  cast(_HouseBankAccountText.HouseBankAccountDescription as ftr_gen_house_bank_acc_descr) AS HouseBankAccountDescription,
  _TreasuryPaymentRequest.TreasuryPaymentFlowDirection AS TreasuryPaymentFlowDirection,
  AccItem.StateCentralBankPaymentReason AS StateCentralBankPaymentReason,
  AccItem.SupplyingCountry AS SupplyingCountry,
  AccItem._Country.Country AS Country,
  AccItem._Country._Text[1: Language=$session.system_language].CountryName AS CountryName,
  AccItem.AssignmentReference AS AssignmentReference,
  AccItem.JournalEntryItemText AS JournalEntryItemText,
  AccItem.BusinessArea AS BusinessArea,
  AccItem._BusinessArea._Text[1: Language=$session.system_language].BusinessAreaName AS BusinessAreaName,
  AccItem.CostCenter AS CostCenter,
  cast(_CostCenterText.CostCenterName as ftr_gen_cost_center_name preserving type ) AS CostCenterName,
  AccItem.FinancialTransactionType AS FinancialTransactionType,
  cast(AccItem._FinancialTransactionType._Text[1: Language=$session.system_language].FinancialTransactionTypeName as ftr_gen_trans_type_fi_name preserving type) AS FinancialTransactionTypeName,
  AccItem.PartnerCompany AS PartnerCompany,
  AccItem._PartnerCompany.CompanyName AS CompanyName,
  AccItem.Counterparty AS Counterparty,
  cast(AccItem._CounterpartyName.BusinessPartnerFullName as ftr_gen_counterparty_full_name) AS CounterpartyFullName,
  AccItem.Issuer AS Issuer,
  cast(AccItem._IssuerName.BusinessPartnerFullName as ftr_gen_issuer_full_name) AS IssuerFullName,
  AccItem.SpecialGLCode AS SpecialGLCode,
  cast(AccItem._SpecialGLCode._Text[1: Language=$session.system_language].SpecialGLCodeName as ftr_gen_special_gl_code_name) AS SpecialGLCodeName,
  AccItem._TrsyAcctItemDocument.TreasuryBusinessTransaction AS TreasuryBusinessTransaction,
  Position.TreasuryValuationArea AS TreasuryValuationArea,
  Position._TreasuryValuationArea.TreasuryValuationAreaName AS TreasuryValuationAreaName,
  AccItem._TrsyAcctItemDocument.ReferenceDocument AS ReferenceDocument,
  AccItem._TrsyAcctItemDocument.ReferenceDocumentContext AS ReferenceDocumentContext,
  AccItem._TrsyAcctItemDocument.PostingDate AS PostingDate,
  AccItem._TrsyAcctItemDocument.PostingFiscalPeriod AS PostingFiscalPeriod,
  AccItem._TrsyAcctItemDocument.FiscalYear AS FiscalYear,
  AccItem._TrsyAcctItemDocument.ReversalReferenceDocument AS ReversalReferenceDocument,
  AccItem._TrsyAcctItemDocument.ReversalReferenceDocumentCntxt AS ReversalReferenceDocumentCntxt,
  AccItem._TrsyAcctItemDocument.ReverseDocumentPostingDate AS ReverseDocumentPostingDate,
  AccItem._TrsyAcctItemDocument.ReverseDocumentFiscalPeriod AS ReverseDocumentFiscalPeriod,
  AccItem._TrsyAcctItemDocument.ReverseDocumentFiscalYear AS ReverseDocumentFiscalYear,
  AccItem._TrsyAcctItemDocument.DocumentDate AS DocumentDate,
  AccItem._TrsyAcctItemDocument.AccountingPrinciple AS AccountingPrinciple,
  AccItem._TrsyAcctItemDocument.TreasuryAcctgPostingCategory AS TreasuryAcctgPostingCategory,
  AccItem._TrsyAcctItemDocument.TreasuryBusinessTransCategory AS TreasuryBusinessTransCategory,
  AccItem._TrsyAcctItemDocument._TreasuryBusTransCategoryText.TreasuryBusTransCategoryName AS TreasuryBusTransCategoryName,
  AccItem._TrsyAcctItemDocument.DocumentHeaderText AS DocumentHeaderText,
  AccItem._TrsyAcctItemDocument.AccountingDocExternalReference AS AccountingDocExternalReference,
  Position.FinancialInstrValuationClass AS FinancialInstrValuationClass,
  Position._FinancialInstrValClassText.FinancialInstrValClassName AS FinancialInstrValClassName,
  Position.TreasuryValuationClass AS TreasuryValuationClass,
  Position._TreasuryValuationClassText.TreasuryValuationClassName AS TreasuryValuationClassName,
  Position.CompanyCode AS CompanyCode,
  cast(Position._CompanyCode.CompanyCodeName as fis_butxt preserving type) AS CompanyCodeName,
  Position._CompanyCode.ChartOfAccounts AS ChartOfAccounts,
  Position.FinancialInstrumentProductType AS FinancialInstrumentProductType,
  Position._FinancialInstrProdTypeText.FinancialInstrProdTypeName AS FinancialInstrProdTypeName,
  Position.SecurityAccount AS SecurityAccount,
  Position._SecurityAccount.SecurityAccountName AS SecurityAccountName,
  Position.SecurityClass AS SecurityClass,
  Position._SecurityClass.SecurityClassName AS SecurityClassName,
  Position._SecurityClass.SecurityClassDescription AS SecurityClassDescription,
  Position.DifferentiationPortfolio AS DifferentiationPortfolio,
  Position._DifferentiationPortfolioText.DifferentiationPortfolioName AS DifferentiationPortfolioName,
  Position.SecurityAccountGroup AS SecurityAccountGroup,
  Position._SecurityAccountGroup.SecurityAccountGroupName AS SecurityAccountGroupName,
  Position.LoanContract AS LoanContract,
  Position._LoanContract.LoanContractName AS LoanContractName,
  Position.TreasuryPositionAccount AS TreasuryPositionAccount,
  Position._TreasuryPositionAccount.TreasuryPositionAccountName AS TreasuryPositionAccountName,
  Position.TreasuryPositionLongShortCode AS TreasuryPositionLongShortCode,
  Position.Fund AS Fund,
  cast(_FundText[1: Language=$session.system_language].FundName as ftr_gen_funds_name preserving type) AS FundName,
  Position.GrantID AS GrantID,
  Position.WBSElementExternalID AS WBSElementExternalID,
  Position.ProfitCenter AS ProfitCenter,
  Position.FunctionalArea AS FunctionalArea,
  Position.TrsyPosCustomDiffntnTerm1 AS TrsyPosCustomDiffntnTerm1,
  _TrsyPosCustomDiffntnTerm1._Text[1:Language = $session.system_language].TrsyPosCustomDiffntnTerm1Name AS TrsyPosCustomDiffntnTerm1Name,
  Position.TrsyPosCustomDiffntnTerm2 AS TrsyPosCustomDiffntnTerm2,
  _TrsyPosCustomDiffntnTerm2._Text[1:Language = $session.system_language].TrsyPosCustomDiffntnTerm2Name AS TrsyPosCustomDiffntnTerm2Name,
  Position.TrsyPosCustomDiffntnTerm3 AS TrsyPosCustomDiffntnTerm3,
  _TrsyPosCustomDiffntnTerm3._Text[1:Language = $session.system_language].TrsyPosCustomDiffntnTerm3Name AS TrsyPosCustomDiffntnTerm3Name,
  Position.TrsyPosCustomDiffntnTerm4 AS TrsyPosCustomDiffntnTerm4,
  _TrsyPosCustomDiffntnTerm4._Text[1:Language = $session.system_language].TrsyPosCustomDiffntnTerm4Name AS TrsyPosCustomDiffntnTerm4Name,
  Position.TrsyPosCustomDiffntnTerm5 AS TrsyPosCustomDiffntnTerm5,
  _TrsyPosCustomDiffntnTerm5._Text[1:Language = $session.system_language].TrsyPosCustomDiffntnTerm5Name AS TrsyPosCustomDiffntnTerm5Name,
  Position.CentralClearingAccount AS CentralClearingAccount,
  Position._CentralClearingAccount.CentralClearingAccountName AS CentralClearingAccountName,
  AccItem._TrsyAcctItemDocument.ActivityFinancialTransaction AS ActivityFinancialTransaction,
  Position.FinancialTransaction AS FinancialTransaction,
  _FinancialTransaction.FinancialInstrTransactionType AS FinancialInstrTransactionType,
  cast(_FinancialTransaction._FinancialInstrTransType._Text[1: Language = $session.system_language].FinancialInstrTransTypeName as ftr_gen_transaction_type_name preserving type) AS FinancialInstrTransTypeName,
  _FinancialTransaction.FinancialInstrCharacteristic AS FinancialInstrCharacteristic,
  _FinancialTransaction.FinancialInstrumentReference AS FinancialInstrumentReference,
  _FinancialTransaction.FinancialInstrumentAssignment AS FinancialInstrumentAssignment,
  _FinancialTransaction.Portfolio AS Portfolio,
  _FinancialTransaction._LetterOfCredit.LetterOfCredit AS LetterOfCredit,
  _FinancialTransaction.HedgingClassification AS HedgingClassification,
  cast(_FinancialTransaction._TreasuryHedgingClassfctn._Text[1: Language = $session.system_language].HedgingClassificationName as ftr_gen_hedging_class_name preserving type) AS HedgingClassificationName,
  _TrgtUserData.CreatedByUser AS CreatedByUser,
  _TrgtUserData.CreationDate AS CreationDate,
  _TrgtUserData.LastChangedByUser AS LastChangedByUser,
  _TreasuryPaymentRequest.PaymentRequest AS PaymentRequest,
  _TreasuryPaymentRequest.PaytReqOriglReferenceDocument AS PaytReqOriglReferenceDocument,
  _TreasuryPaymentRequest.PaymentCurrency AS PaymentCurrency,
  _TreasuryPaymentRequest.AmountInPaymentCurrency AS AmountInPaymentCurrency,
  _TreasuryPaymentRequest.TreasuryIndividualPayment AS TreasuryIndividualPayment,
  _TreasuryPaymentRequest.TrsyPaytGroupingSameDrctnIsRqd AS TrsyPaytGroupingSameDrctnIsRqd,
  _TreasuryPaymentRequest.TreasuryPaymentRequestGrouping AS TreasuryPaymentRequestGrouping,
  _TreasuryPaymentRequest.TrsyPaytRequestGroupingName AS TrsyPaytRequestGroupingName,
  _TreasuryPaymentRequest.PaymentRequestPaymentGroup AS PaymentRequestPaymentGroup,
  _TreasuryPaymentRequest.ConsideredPaymentMethods AS ConsideredPaymentMethods,
  _TreasuryPaymentRequest.PaytReqAdditionalInstructions AS PaytReqAdditionalInstructions,
  _TreasuryPaymentRequest.PaytReqAddlInstructionsName AS PaytReqAddlInstructionsName,
  _TreasuryPaymentRequest.BankClearingGLAccount AS BankClearingGLAccount,
  _TreasuryPaymentRequest.TrsyPaytRequestReleaseStatus AS TrsyPaytRequestReleaseStatus,
  _TreasuryPaymentRequest.TrsyPaytRequestRelStatusName AS TrsyPaytRequestRelStatusName,
  _TreasuryPaymentRequest.PaymentReason AS PaymentReason,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute1 AS TrsyPosFreeDefinedAttribute1,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute2 AS TrsyPosFreeDefinedAttribute2,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute3 AS TrsyPosFreeDefinedAttribute3,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute4 AS TrsyPosFreeDefinedAttribute4,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute5 AS TrsyPosFreeDefinedAttribute5,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute6 AS TrsyPosFreeDefinedAttribute6,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute7 AS TrsyPosFreeDefinedAttribute7,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute8 AS TrsyPosFreeDefinedAttribute8,
  _TrltPosAttrib.TrsyPosFreeDefinedAttribute9 AS TrsyPosFreeDefinedAttribute9,
  _TrltPosAttrib.TrsyPosFreeDfndAttribute1Name AS TrsyPosFreeDfndAttribute1Name,
  _TrltPosAttrib.TrsyPosFreeDfndAttribute2Name AS TrsyPosFreeDfndAttribute2Name,
  _TrltPosAttrib.TrsyPosFreeDfndAttribute3Name AS TrsyPosFreeDfndAttribute3Name,
  _TrltPosAttrib.TrsyPosFreeDfndAttribute4Name AS TrsyPosFreeDfndAttribute4Name,
  _TrltPosAttrib.TrsyPosFreeDfndAttribute5Name AS TrsyPosFreeDfndAttribute5Name,
  _TrltPosAttrib.TrsyPosFreeDfndAttribute6Name AS TrsyPosFreeDfndAttribute6Name,
  Position.TreasuryAccountingCode AS TreasuryAccountingCode,
  Position.FinancialExposureItem AS FinancialExposureItem,
  _TrsyFinExpsrItmText.FinancialExposureItemName AS FinancialExposureItemName,
  Position.FinancialExposureSubItem AS FinancialExposureSubItem,
  _TrsyFinExpsrSubitemText.FinancialExposureSubItemName AS FinancialExposureSubItemName,
  AccItem._Country AS _Country,
  AccItem._PaymentBlockingReason AS _PaymentBlockingReason,
  AccItem._FinancialTransactionType AS _FinancialTransactionType,
  AccItem._PostingKey AS _PostingKey,
  AccItem._Paymentmethodsupplement AS _Paymentmethodsupplement,
  Position._CompanyCode AS _CompanyCode,
  Position._TreasuryValuationArea AS _TreasuryValuationArea,
  AccItem._TrsyAcctItemDocument._AccountingPrinciple AS _AccountingPrinciple,
  Position._SecurityAccountGroup AS _SecurityAccountGroup,
  AccItem._TrsyAcctItemDocument AS _TrsyAcctItemDocument,
  AccItem._TrsyAcctItemPosContext AS _TrsyAcctItemPosContext
FROM P_TrsyLdgrPosAccountingItem AS AccItem
INNER JOIN P_PositionIdentifierCompCode AS Position ON /* join condition not captured in parsed metadata */
INNER JOIN P_PosIdfrTrsyLdgrTrsyAcctg AS DifsDiff ON /* join condition not captured in parsed metadata */
INNER JOIN I_FinInstrProductGroup ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_TrgtUserData AS _TrgtUserData ON AccItem.TreasuryUserStatisticsUUID = _TrgtUserData.TreasuryUserStatisticsUUID  -- association [0..1]
LEFT OUTER JOIN I_TreasuryPaymentRequest AS _TreasuryPaymentRequest ON AccItem.TreasuryBusinessTransaction = _TreasuryPaymentRequest.TreasuryBusinessTransaction AND AccItem.TreasuryValuationArea = _TreasuryPaymentRequest.TreasuryValuationArea AND TreasuryTransactionFlow = _TreasuryPaymentRequest.TreasuryTransactionFlow AND GLAccount = _TreasuryPaymentRequest.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_TrltPosattrib AS _TrltPosAttrib ON DifsDiff.TrsyLdgrTreasuryPosition = _TrltPosAttrib.TreasuryPosition  -- association [0..1]
LEFT OUTER JOIN I_GLAccountText AS _GLAccountText ON GLAccount = _GLAccountText.GLAccount AND Position.ChartOfAccounts = _GLAccountText.ChartOfAccounts AND _GLAccountText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_CostCenterText AS _CostCenterText ON AccItem.CostCenter = _CostCenterText.CostCenter AND Position.ControllingArea = _CostCenterText.ControllingArea AND AccItem.DocumentDate = _CostCenterText.ValidityEndDate AND _CostCenterText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_FundText AS _FundText ON Position.Fund = _FundText.Fund AND Position.FinancialManagementArea = _FundText.FinancialManagementArea AND _FundText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_FinancialTransaction AS _FinancialTransaction ON Position.FinancialTransaction = _FinancialTransaction.FinancialTransaction AND Position.CompanyCode = _FinancialTransaction.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_TreasuryValuationClass AS _TreasuryValuationClass ON TreasuryValuationClass = _TreasuryValuationClass.TreasuryValuationClass AND TreasuryValuationArea = _TreasuryValuationClass.TreasuryValuationArea  -- association [0..1]
LEFT OUTER JOIN I_LoanContract AS _LoanContract ON LoanContract = _LoanContract.LoanContract AND CompanyCode = _LoanContract.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_TreasuryPositionAccount AS _TreasuryPositionAccount ON TreasuryPositionAccount = _TreasuryPositionAccount.TreasuryPositionAccount AND CompanyCode = _TreasuryPositionAccount.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_FinancialTransactionVH AS _FinancialTransactionVH ON FinancialTransaction = _FinancialTransactionVH.FinancialTransaction AND CompanyCode = _FinancialTransactionVH.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_FinancialTransactionVH AS _ActivFinancialTransactionVH ON activityfinancialtransaction = _ActivFinancialTransactionVH.FinancialTransaction AND CompanyCode = _ActivFinancialTransactionVH.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_Housebank AS _HouseBank ON CompanyCode = _HouseBank.CompanyCode AND AccItem.HouseBank = _HouseBank.HouseBank  -- association [0..1]
LEFT OUTER JOIN I_HouseBankAccountText AS _HouseBankAccountText ON CompanyCode = _HouseBankAccountText.CompanyCode AND AccItem.HouseBank = _HouseBankAccountText.HouseBank AND AccItem.HouseBankAccount = _HouseBankAccountText.HouseBankAccount AND _HouseBankAccountText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON AccItem.Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON AccItem.Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_HouseBankAccountVH AS _HouseBankAccountVH ON CompanyCode = _HouseBankAccountVH.CompanyCode AND HouseBank = _HouseBankAccountVH.HouseBank AND HouseBankAccount = _HouseBankAccountVH.HouseBankAccount  -- association [0..1]
LEFT OUTER JOIN I_CentralClearingAccountVH AS _CentralClearingAccountVH ON CompanyCode = _CentralClearingAccountVH.CompanyCode AND CentralClearingAccount = _CentralClearingAccountVH.CentralClearingAccount  -- association [0..1]
LEFT OUTER JOIN I_TrsyFinExpsrItmText AS _TrsyFinExpsrItmText ON Position.FinancialExposureItem = _TrsyFinExpsrItmText.FinancialExposureItem  -- association [0..1]
LEFT OUTER JOIN I_TrsyFinExpsrSubitemText AS _TrsyFinExpsrSubitemText ON DifsDiff.TrsyLdgrTreasuryPosition = _TrsyFinExpsrSubitemText.TreasuryPosition  -- association [0..1]
LEFT OUTER JOIN I_TrsyPosCustomDiffntnTerm1 AS _TrsyPosCustomDiffntnTerm1 ON Position.TrsyPosCustomDiffntnTerm1 = _TrsyPosCustomDiffntnTerm1.TrsyPosCustomDiffntnTerm1  -- association [0..1]
LEFT OUTER JOIN I_TrsyPosCustomDiffntnTerm2 AS _TrsyPosCustomDiffntnTerm2 ON Position.TrsyPosCustomDiffntnTerm2 = _TrsyPosCustomDiffntnTerm2.TrsyPosCustomDiffntnTerm2  -- association [0..1]
LEFT OUTER JOIN I_TrsyPosCustomDiffntnTerm3 AS _TrsyPosCustomDiffntnTerm3 ON Position.TrsyPosCustomDiffntnTerm3 = _TrsyPosCustomDiffntnTerm3.TrsyPosCustomDiffntnTerm3  -- association [0..1]
LEFT OUTER JOIN I_TrsyPosCustomDiffntnTerm4 AS _TrsyPosCustomDiffntnTerm4 ON Position.TrsyPosCustomDiffntnTerm4 = _TrsyPosCustomDiffntnTerm4.TrsyPosCustomDiffntnTerm4  -- association [0..1]
LEFT OUTER JOIN I_TrsyPosCustomDiffntnTerm5 AS _TrsyPosCustomDiffntnTerm5 ON Position.TrsyPosCustomDiffntnTerm5 = _TrsyPosCustomDiffntnTerm5.TrsyPosCustomDiffntnTerm5  -- association [0..1]
;