Beyond ABAPdesigned by@Tejoram97
Beyond ABAP / TRM ABAP / Master Data & Data Model

Master Data & Data Model

TRM ABAP · Finance ·

Open the interactive lesson →
  1. Overview of treasury data objects
  2. Banks, house banks and Bank Account Management
  3. Business partners in treasury
  4. Product types, transaction types, flow types and update types
  5. Financial transaction tables
  6. Positions, valuation and securities
  7. Market data
  8. Cash management data: One Exposure and memo records
  9. Released CDS views
  10. Interview questions

Treasury data falls into four groups: bank data (banks, house banks, bank accounts in Bank Account Management), business partners (counterparties, issuers, banks), the financial transaction model (product types, transaction types, flows, positions) and market and cash data (rates, prices, One Exposure). This page lists the objects with their tables, number logic and released CDS views, so that you can read and report on treasury data correctly. Organization units: page 01; processes and customizing: page 03; APIs and BAdIs: page 05.

Part 1 – Overview of treasury data objects

Object

Main tables

Maintained with

Released CDS view (examples)

Bank (bank directory)

BNKA

FI01 – FI03, Manage Banks

I_Bank_2

House bank

T012

S/4HANA: FI12_HBANK, Manage Banks (ECC: FI12)

I_HouseBank

Bank account / house bank account

FCLM_BAM_AMD, FCLM_BAM_ACLINK2 (T012K → view V_T012K_BAM)

Manage Bank Accounts (BAM)

I_HouseBankAccountLinkage

Business partner (treasury roles)

BUT000, BUT100 (roles)

BP

I_FTR_Counterparty

Financial transaction

VTBFHA, VTBFHAZU, VTBFHAPO, VTBFINKO

FTR_CREATE / FTR_EDIT

I_FinancialTransaction, I_FinTransFlow

Position (treasury ledger)

TRLT_POSITION, TRLT_FLOW

Generated by TRM

I_TreasuryLedgerPosition

Security class / security account

Class data and account master tables

Securities master data transactions

I_SecurityClass, I_SecurityAccount

Market data

TCURR (FX rates) and TRM market data tables

OB08, FW17, datafeed TBD4

I_ExchangeRateRawData, I_SecurityPriceCube

Cash flows (One Exposure)

FQM_FLOW

Written by source applications

I_CashFlowDeltaData

Memo record

FDES

Manage Memo Records (FF63 classic) – ECC: FDES · S/4HANA 1809+: stored in FQM_FLOW

I_MemoRecord_2

Cash pool

BAM cash pool tables

Manage Cash Pools

I_CashPool_2

  • Treasury tables keep their ECC names in S/4HANA – the Transaction Manager tables (VTB*) and the treasury ledger (TRL*) did not get a new data model like MATDOC or ACDOCA. What changed is the posting target (Universal Journal), bank accounts (BAM) and cash management (One Exposure).

Part 2 – Banks, house banks and Bank Account Management

Bank data model: bank directory BNKA, house bank T012, house bank account in FCLM_BAM_ACLINK2 (old T012K read through view V_T012K_BAM), BAM bank account FCLM_BAM_AMD with signatories, limits, cash pools and change requests; G/L account and released CDS views

Table / view

Content

Remarks

BNKA

Bank master (bank directory): bank country + bank key, name, SWIFT / BIC, address

Shared with vendors and customers (BP bank details)

T012

House banks: company code + house bank ID (HBKID, 5 characters) → bank key

Unchanged in S/4HANA

FCLM_BAM_AMD

BAM bank account master data: bank, account number, IBAN, currencies, status, company code, account type

S/4HANA – the leading bank account record

FCLM_BAM_ACLINK2

Link between a BAM bank account and the house bank account (house bank + account ID, G/L account)

S/4HANA; the older FCLM_BAM_AC_LINK is no longer updated

T012K

House bank accounts in ECC

S/4HANA: reads are redirected to the compatibility view V_T012K_BAM, data comes from BAM

  • Conversion from ECC: program FCLM_BAM_MIGRATION (Generate Bank Account Master Data from House Bank Accounts) creates BAM accounts from the existing house bank accounts; run it before using bank accounts in S/4HANA. Transaction FCLM_BAM_ACCLINK maintains the link between house bank account and bank account.
  • Full BAM adds data around the account: signatories and power of attorney, payment approval rules, overdraft limits, bank hierarchy and groups, cash pool assignments, and change requests that run through a workflow for opening, changing and closing accounts (page 01 Part 3).
  • Developer rule: create or change bank accounts with the BAM apps or APIs (page 05), never by writing FCLM_BAM_* tables – BAM keeps history, change requests and the house bank link consistent.

Part 3 – Business partners in treasury

Treasury uses the same business partner as FI, MM and SD (tables BUT000 general data, BUT100 roles, bank details BUT0BK). A treasury partner gets treasury roles and treasury-specific data. In old R/3 Treasury there was a separate treasury partner; it was converted to the SAP business partner long before S/4HANA (role 1000 Treasury Partner became role TR0151 Counterparty).

Role / data

Meaning

TR0151 Counterparty

Contract partner of a financial transaction – mandatory for every deal

Other treasury roles

Issuer (of securities), depository bank, payment bank and similar roles; one partner can have several roles

Authorizations

Which product types / transaction types may be traded with the partner – checked at deal entry

Standing instructions

Default payment details (house bank, partner bank, payment method), correspondence settings (confirmations) and other defaults copied into each deal

Credit standing and ratings, LEI

Used by the Credit Risk Analyzer and for regulatory reporting

Relationships / group partners

A group partner (parent) collects ratings and limits for all group entities; no deals are booked on it

Internal partners

Subsidiaries as partners for intercompany loans and In-House Banking – ideally with an ID that matches the company code

  • A bank that is a counterparty is one business partner (counterparty role, bank details) – it is not the same object as the bank directory entry in BNKA or the house bank in T012.
  • Data governance: treasury partners are usually released by a second person (four-eyes principle) or governed in SAP Master Data Governance, because payment details on them drive outgoing payments.

Part 4 – Product types, transaction types, flow types and update types

Every financial transaction is classified by four configuration objects. You will meet them as key fields in every table and every BAdI, so learn the chain.

Financial transaction data model: product category and product type, transaction type with number range, flow types and update types; deal header VTBFHA, activities VTBFHAZU, conditions VTBFINKO, flows VTBFHAPO; positions and flows in the treasury ledger TRLT_POSITION and TRLT_FLOW

Object

What it is

Examples

Product category (SANLF)

SAP-defined class of instrument – fixes the screens and the functions available

510 fixed-term deposit, 600 foreign exchange

Product type (SGSART)

Customer-defined instrument within a category; carries valuation, position and accounting settings

51A fixed-term deposit / borrowing, 52A deposit at notice, 53A commercial paper, 60A FX spot / forward, 60B non-deliverable forward, 62A interest rate swap, 62B cross-currency swap, 04A bond, 01A stock

Transaction type (SFHAART)

Variant of a product type: direction and business meaning (e.g. investment vs borrowing); controls the allowed activities, release procedure and the number range

100 investment (asset) for product type 51A

Flow type (SFHAZBA)

Meaning of one cash flow of the deal: nominal inflow / outflow, interest, charges, FX buy / sell side; flow types are assigned to transaction types

Nominal increase, interest flow, final repayment

Update type

Meaning of a position change or valuation result in position management (e.g. valuation gain / loss, accrual); drives the G/L accounts

Key date valuation, accrual / deferral, derived business transactions

  • Two different "flow types": the TRM flow type above belongs to a financial transaction. Cash Management also has flow types in One Exposure (e.g. per G/L account: cash vs accrual) – a different object (Part 8).
  • Number ranges: financial transaction numbers (RFHA) come from number ranges defined per company code in Transaction Manager customizing and assigned through the transaction type – one deal number is unique only together with the company code.

Part 5 – Financial transaction tables

A financial transaction (deal) consists of a header, its activities (contract, settlement, rollover, termination …), the conditions (interest, fees) and the generated flows. All tables are keyed by company code BUKRS and transaction number RFHA.

Table

Content

Key fields / important fields

VTBFHA

Financial transaction header

BUKRS, RFHA · SANLF product category, SGSART product type, SFHAART transaction type, KONTRH counterparty, RPORTB portfolio, WGSCHFT currency, DBLFZ term start, DELFZ term end, SAKTIV active status, SFRGZUST release status, RFHAZUL last active activity, RLDEPO security account, RCOMVALCL general valuation class

VTBFHAZU

Transaction activities: each change in the life of the deal is a new activity (contract, settlement, rollover, termination, expiry)

BUKRS, RFHA, RFHAZU activity number

VTBFINKO

Conditions: interest rate, interest calculation method, fees, frequency

BUKRS, RFHA, RFHAZU, condition

VTBFHAPO

Flows of the deal (cash flow)

BUKRS, RFHA, RFHAZU, RFHAZB flow number · SFHAZBA flow type, SSIGN direction, DZTERM payment date, BZBETR / WZBETR amount and currency, BHWBETR local amount, DBERVON / DBERBIS calculation period, RAHABKI / RAHKTID house bank and account ID, ZLSCH payment method, SPAYRQ payment request, SBEWEBE posting status, BELNR / GJAHR FI document

  • The active status and release status matter in every report: a deal can be entered but not yet released (four-eyes principle), and reversed activities stay in the tables. SAKTIV is initial for active, 2 replaced (e.g. by a rollover), 3 reversed, 4 offer, 5 simulation; SFRGZUST 2 = release required, 3 = release granted.
  • Display tool: transaction FTR_SHOW (Display Treasury Tables) shows the tables of one deal – useful when you debug a custom report.

Example – open fixed-term deposits and their future flows

SELECT FROM vtbfha AS h
INNER JOIN vtbfhapo AS f ON  f~bukrs = h~bukrs
AND f~rfha  = h~rfha
FIELDS h~rfha, h~sgsart, h~sfhaart, h~kontrh, h~rportb,
f~rfhazb, f~sfhazba, f~dzterm, f~bzbetr, f~wzbetr,
f~sbewebe, f~belnr
WHERE h~bukrs  =  @p_bukrs
AND h~sanlf  =  '510'                         " product category fixed-term deposit
AND h~delfz  >= @sy-datum                     " term not yet ended
AND f~dzterm >= @sy-datum                     " future payment dates only
ORDER BY h~rfha, f~dzterm
INTO TABLE @DATA(lt_flows).

In real reports also filter on the active status and on the flows of the active activity, and use the released CDS views (Part 9) in new and cloud-ready code. To create or change deals use the treasury BAPIs and APIs (page 05) – never update VTB* tables.

Part 6 – Positions, valuation and securities

Accounting in TRM works on positions, not directly on deals. The position management (treasury ledger, TRL) keeps per valuation area the position of each deal or security, its flows and its valuation results; from there the postings to FI are created.

Table / view

Content

TRLT_POSITION

Treasury ledger positions per valuation area (position identifier, valuation class, amounts)

TRLT_FLOW

Treasury ledger flows that change positions (from distributor flows of the deal, valuations, accruals)

TRLT_DERIVFLOWS

Flows from derived business transactions (e.g. valuations created by TPM1)

TRLV_FLOW

View joining positions and flows

  • Position management procedure – the ordered steps run for a position (valuation, amortization, accrual, impairment); assigned per valuation area and product type / valuation class.
  • Valuation class – each position has one per valuation area (general valuation class in the deal, VTBFHA-RCOMVALCL, mapped to valuation classes per area).
  • Reports: TPM12 position list (Treasury Position Values) and TPM13 flow list (position flows) – the first places to check when a posting or valuation is wrong.
  • Securities: a security class (master data of the bond / stock / fund: issuer, nominal, interest conditions, quotation) and a security account (where the securities are held, depository bank) form the position for securities. Released views I_SecurityClass, I_SecurityClassBond, I_SecurityAccount.

Part 7 – Market data

Market data

Where

Maintained with

Exchange rates

TCURR (rate type KURST, from / to currency, inverted date GDATU, rate UKURS); factors TCURF

OB08 manually, datafeed, file upload, SAP Market Rates Management

Security prices

TRM market data tables per security class, exchange and price type

FW17 manually, datafeed TBD4

Reference interest rates

Definition of the reference rate (e.g. an interbank or overnight rate) and its values over time

Datafeed, manual entry

Yield curves, volatilities, indexes

Market data for valuation and risk analysis

Datafeed, manual entry

  • Datafeed: transaction TBD4 requests current market data from a provider through the datafeed interface; translation tables map the provider's instrument codes to SAP keys. SAP Market Rates Management is SAP's cloud service that delivers rates (e.g. Refinitiv, or bring your own rates) into the same tables. Connectivity details: page 04.
  • Released views: I_ExchangeRateRawData, I_MktDataFXRateCube, I_SecurityPriceCube, I_ReferenceInterestRate / I_ReferenceInterestRateVal, I_VolatilityType.
  • Developer rule: convert amounts with the standard currency services (e.g. function CONVERT_TO_LOCAL_CURRENCY, or the released class CL_EXCHANGE_RATES in ABAP Cloud), not with your own SELECT on TCURR – inverted dates, factors and rate types are easy to get wrong.

Part 8 – Cash management data: One Exposure and memo records

One Exposure from Operations is the single store of cash flows for S/4HANA Cash Management: table FQM_FLOW. Source applications write their expected and actual cash flows there in real time; the cash position, liquidity forecast and Cash Flow Analyzer read only this table.

One Exposure from Operations: FI open items and G/L, MM purchase orders and requisitions, SD orders, TRM financial transactions, bank statements, memo records FDES, remote systems and imported forecasts write flows into FQM_FLOW with company code, bank account, liquidity item, flow type, certainty level and planning level; Cash Flow Analyzer, cash position, liquidity forecast and SAC read it

Attribute of a flow

Meaning

Source application / origin document

Which application created it (FI, MM, SD, TRM, bank statement, memo record, remote classic cash management CMDSR …) and the document behind it

Company code, bank account / house bank account

Where the cash will move

Date, amount, currency

Expected or actual value date and amount

Flow type

Cash Management flow type: e.g. cash flow vs accrual; G/L account flow types are set with FQM_MANAGE_FLOW_TYPE

Certainty level

How sure the flow is – actual (bank), memo record, purchase order, forecast …

Liquidity item

Economic reason (customer receipts, supplier payments, interest …), derived from G/L account, document or treasury flow (page 03)

Planning level / planning group

Classic cash management keys still used for memo records and grouping

  • Memo records – manual expected flows (e.g. a tax payment next week) are stored in FQM_FLOW since S/4HANA 1809 (ECC / older releases: FDES; FCLM_MIGR_FDES2FQM migrates old records) and shown in One Exposure; app Manage Memo Records (classic FF63 / FF65).
  • Initial load / activation: source applications are activated in customizing (activity Activate Individual Source Applications); existing data is loaded into FQM_FLOW with FQM_INITIALIZE.
  • Legacy: the classic totals tables FDSB and FDSR (filled by FF7A / FF7B) are not used by the new Cash Management. Old custom reports on them must be rewritten on FQM_FLOW or the released views.
  • Released views: I_CashFlowDeltaData (One Exposure cash flows), I_MemoRecord_2, I_CertaintyLevel_2, I_PlanningLevel, I_CashPlanningGroup, I_GLAccountFlowType.

Part 9 – Released CDS views

The views below are released in the SAP Cloudification Repository for ABAP Cloud and key-user use; on-premise they exist from the release that introduced them, and ADT shows the API state of each view. Read them instead of the tables in new code; ABAP on HANA › 05 explains CDS, Clean Core › 01 the clean core rules.

Area

Released views

Banks and BAM

I_Bank_2, I_HouseBank, I_HouseBankBasic, I_HouseBankAccountLinkage, I_HouseBankAccountText, I_BankAcctChangeRequest, I_BankPowerOfAttorneyTP_2

Cash management

I_CashFlowDeltaData, I_MemoRecord_2, I_CashPool_2, I_CertaintyLevel_2, I_PlanningLevel, I_CashPlanningGroup, I_GLAccountFlowType

Financial transactions

I_FinancialTransaction, I_FinTransActivity, I_FinTransCondition, I_FinTransFlow, I_FinTransFlowType, I_FTR_Counterparty

Configuration keys

I_FinancialInstrProdCat, I_FinancialInstrProductType, I_FinancialInstrTransType, I_TreasuryUpdateType, I_TreasuryValuationArea, I_TreasuryValuationClass, I_TreasuryPortfolio

Positions and valuation

I_TreasuryLedgerPosition, I_TrsyLdgrPositionWithValues, I_TrsyLedgerTransactionFlow, I_TrsyPosManagementProcedure, I_FinancialTransactionNPV

Securities and market data

I_SecurityClass, I_SecurityAccount, I_SecurityPriceCube, I_MktDataFXRateCube, I_ReferenceInterestRateVal

Hedging and risk

I_HedgingRelationship, I_HedgedItem, I_HedgingInstrument, I_FXExposureVersion, I_TrsyCtptyLimitType

Part 10 – Interview questions

Q1. Which tables store a financial transaction?

VTBFHA (header), VTBFHAZU (activities), VTBFINKO (conditions) and VTBFHAPO (flows), all keyed by company code and transaction number RFHA. Positions and their flows are in the treasury ledger (TRLT_POSITION, TRLT_FLOW).

Q2. What is the difference between product type, transaction type and flow type?

The product type is the instrument (e.g. 51A fixed-term deposit, 60A FX) within an SAP product category; the transaction type is its variant with direction, allowed activities and number range (e.g. 100 investment); the flow type gives the meaning of each cash flow (nominal, interest, fees).

Q3. What is an update type?

The meaning of a position change or valuation result in position management, such as a valuation gain or an accrual. Posting specifications map update types to account symbols and so to G/L accounts (page 03).

Q4. Where are house bank accounts stored in S/4HANA?

In Bank Account Management: the bank account in FCLM_BAM_AMD and the link to house bank and account ID in FCLM_BAM_ACLINK2. Reads on T012K are redirected to the compatibility view V_T012K_BAM. Conversion from ECC uses FCLM_BAM_MIGRATION.

Q5. Which business partner role is required for a deal?

TR0151 Counterparty. The partner also needs authorizations for the product / transaction types and standing instructions for payment details and correspondence.

Q6. What is One Exposure from Operations?

The table FQM_FLOW in which all source applications (FI, MM, SD, TRM, bank statements, memo records, remote systems) store cash flows with bank account, liquidity item, flow type and certainty level. All S/4HANA cash management apps read it.

Q7. Will my old report on FDSB / FDSR work in S/4HANA?

No meaningful data: these classic cash management totals tables are not updated by the new Cash Management. Rewrite the report on FQM_FLOW or I_CashFlowDeltaData.

Q8. Where are exchange rates stored and how should code convert currencies?

In TCURR (with factors in TCURF), maintained by OB08, datafeed or Market Rates Management. Code uses standard conversion functions or classes, not its own TCURR logic (inverted date, factors, rate types).

Q9. What is a position in TRM and why does it matter for accounting?

The holding of a deal or security per valuation area and valuation class in the treasury ledger. Valuations, accruals and amortizations are calculated on positions and posted from there, so wrong postings are analysed with TPM12 / TPM13.

Q10. Which released CDS views would you use for a treasury report in ABAP Cloud?

I_FinancialTransaction and I_FinTransFlow for deals and flows, I_TreasuryLedgerPosition for positions, I_FinancialTransactionNPV for market values, I_HouseBankAccountLinkage for bank accounts and I_CashFlowDeltaData for cash flows.

Q11. What is a memo record?

A manually entered expected cash flow (FQM_FLOW since S/4HANA 1809; classic table FDES) that appears in the cash position and liquidity forecast, e.g. a tax payment; maintained in Manage Memo Records (classic FF63).

Q12. How do you find all tables of one deal quickly when debugging?

Transaction FTR_SHOW displays the treasury tables of a financial transaction; then check the position with TPM12 and the FI document number in VTBFHAPO-BELNR.

🏠 Start Here · ◀ 01 · Overview & Org · 03 · Processes & Config ▶ · Sections: CORE ABAP | OOPS ABAP | ABAP on HANA | Clean Core | RAP | ABAP Points | SAP Fiori | SAPUI5 | Mobile Development (MDK) | BTP Foundations | BTP Development | CAP | SAP Build | ABAP on BTP | Integration Suite | SAP Business AI | SAP BASIS | Security | SAP SDLC

Functional: FICO ABAP | TRM ABAP | VIM | SAP BIS | SD ABAP | MM ABAP | PP ABAP | QM ABAP | PM ABAP | PS ABAP | EWM | TM ABAP | GTM ABAP | EHS ABAP | HR ABAP | BW | SAP Datasphere | SAP Business Data Cloud | SAP MDG | SAP Analytics Cloud | SAP Ariba | SAP CX | SAP IBP