File interface is similar to Datafeed, but here we will use files instead of connection to internet.

All cutomizing will be done following this path:

SAP Customizing Implementation Guide -> Financial Supply Chain Management -> Treasury and Risk Management -> Basic Functions -> Market Data Management -> File Interface -> …


All Data Processing will be done following this path:

SAP Menu -> Accounting -> Financial Supply Chain Management -> Treasury and Risk Management -> Basic Functions -> Market Data Management -> File Interfaces -> …

Configuration.

But now let’s make some configuration in order file interface to work.

Define Source of Market Data and Conversion Codes

SAP Customizing Implementation Guide -> Financial Supply Chain Management -> Treasury and Risk Management -> Basic Functions -> Market Data Management -> File Interface -> Define Source of Market Data and Conversion Codes (tr. SM30 -> V_VTBFFFT)

First of all we create Data Provider ID for the file interface.

/wp-content/uploads/2016/08/01_1017354.jpg

TIP: if you use the same data provider for File Interface and for Datafeed – then you have to configure both of them similar to each other, otherwise you can get error like this “No data source defined for datafeed name”. In our case we have the same 4 fields: Data Provider, Description, Quotation source/Comm(05), Quotation Source/Comm(06).

Create Tables for Code Conversion

SAP Customizing Implementation Guide -> Financial Supply Chain Management -> Treasury and Risk Management -> Basic Functions -> Market Data Management -> File Interface -> Create Tables for Code Conversion (tr. SM30 -> V_MDUCV)

Creation of Tables for code conversion is similar to the same operation in Datafeed configuration TRM Market Data Management: Datafeed: Configuration.

Before creating tables for Code Conversion, the tables are empty. After creating tables – it will be filled with SAP data. All you need is to map SAP Data with External Providers’ data.


Start transaction. Select required conversions. Execute operation.

/wp-content/uploads/2016/08/02_1016457.jpg

Press “Yes” button.

/wp-content/uploads/2016/08/04_1016464.jpg

The information dialog appears.

/wp-content/uploads/2016/08/05_1016468.jpg

Convert Codes for Exchange Rate Types

SAP Customizing Implementation Guide -> Financial Supply Chain Management -> Treasury and Risk Management -> Basic Functions -> Market Data Management -> File Interface -> Currencies -> Convert Codes for Exchange Rate Types (tr. SM30 -> V_MDUCV)


Now we can check conversion table and map SAP data with external data.

/wp-content/uploads/2016/08/03_1016462.jpg

If you need you create conversion table for other data, do it!

That’s all with configuration.

Processing market data

SAP Menu -> Accounting -> Financial Supply Chain Management -> Treasury and Risk Management -> Basic Functions -> Market Data Management -> File Interfaces -> …

TBDN – Generate Request List

Befor entering market data we need to prepare files. In this case tr. TBDN can help us.

Indicate file name where structure of file will be created.

Put a checkmark in checkbox field “PC download”.

Indicate data provide name.

Select Instrument class to fill our file.

If you use Selection fields, you can limit SAP data to be passed into file.

In our case i want to create file for entering Refinance rate only.

Execute transaction.

/wp-content/uploads/2016/08/10_1016475.jpg

Select is done.

Select data and press “Save” button.

/wp-content/uploads/2016/08/11_1016476.jpg

Press “Yes” button.

/wp-content/uploads/2016/08/12_1016483.jpg

If you didn’t create Converstion tables you’ll get this information dialog.

/wp-content/uploads/2016/08/13_1016484.jpg

File is created

/wp-content/uploads/2016/08/14_1016485.jpg

The structure is the following:

## – comments.

90 tag – is for data provider id.

01 tag – line for currencies’ data.

02 tag – line for securities’ data.

03 tag – line for interest rates’ data.

04 tag – line for indices’ data.

05 tag – line for commodities’ data.

06 tag – line for CPE commodities’ data.

07 tag – line for Commodity Forward Rate data.

08 tag – line for Derivative Contract Specification data.

09 tag – line for basis spreads’ data.

10 tag – line for credit spreads’ data.

21 tag – line for swap forwards’ data.

30 tag – line for universal volatility item’s data.

31 tag – line for currency volatilities’ data.

32 tag – line for security volatilities’ data.

33 tag – line for interest volatilities’ data.

But actually the file is not full.

The full structure is the following:

For tags starting from 01 to 33 the line consists of the following data. Data is represented like a strings without any separators. The seprarotr is the length of field.

FIeld num. Field name Size in chars Structure and field Description Required field (R) / Empty (E)
1 SCLASS 2 VTB_MARKET-SCLASS Datafeed: Instrument Class (tag id) R
2 RKEY1 20 VTB_DFANS-RKEY1 Datafeed: Key 1 R
3 RKEY2 20 VTB_DFANS-RKEY2 Datafeed: Key 2

R (Cat. 01)

R (Cat. 02)

E (Cat. 03)

E (Cat. 04)

E (Cat. 07)

4 SINSTRUMNT 15 VTB_DFANS-SPRPTY Datafeed: Market data: Instrument property

R (Cat. 01) Rate Type

R (Cat. 02) Volatility Type

E (Cat. 03)

R (Cat. 04)

R (Cat. 05) Commodity Quotation Type

R (Cat. 06) Commodity quotation type

R (Cat. 07) Commodity Quotation Type

5 DDATE 8 VTB_DFANS-DDATE Datafeed: Value date in SAP format

R Value Date (Format: DDMMYYYY)

R (Cat. 05 – 07) Quotation Date (Format: DDMMYYYY)

6 TTIME 6 VTB_DFANS-TTIME Datafeed: Time of value (SAP format) E Time of Value Data (Format: HHMMSS)
7 VALUE 20 VTB_DFANS-VALUE Datafeed: Value of requested property R
8 CURRENCY 20 VTB_DFANS-CURRENCY Datafeed: Currency key

E (Cat. 01) Currency D

R (Cat. 02)  Data description

E (Cat. 03)

E (Cat. 04)

E (Cat. 05)  Notation Currency Unit

E (Cat. 06) Notation Currency Unit

E (Cat. 07) Notation Currency Unit

9 FFACT 7 VTB_DFANS-CFFACT Datafeed: Factor for units of from-currency

R (Cat. 01) Ratio for Units of

E (Cat. 02) FROM currency

E (Cat. 03)

E (Cat. 04)

10 TFACT 7 VTB_DFANS-CTFACT Datafeed: Factor for units of to-currency

R (Cat. 01) Ratio for Units of

E (Cat. 02) FROM currency

E (Cat. 03)

E (Cat. 04)

11 MKIND 5 VTB_DFANS-MKIND Datafeed: Price notation for security prices E
12 SSTATS 2 VTB_MARKET-SSTATS Datafeed: Status of market date E
13 ERROR 80 VTB_MARKET-ERROR Datafeed: Error message E

Example of complete file with information. You can also find this file in attachment to this article.

/wp-content/uploads/2016/08/15_1016501.jpg

TBDM – Import

Now we can import market data.

/wp-content/uploads/2016/08/17_1016521.jpg

  • Input:
    • Upload: Tell transaction you want to upload file from PC, or from server.
    • File name: file with market data. For PC you can use search help to enter file name. For server you can use transaction AL11 to copy path of file. File path is similar to /usr/sap/trans/log/log.txt
    • Exchange rates: indicate whether you will upload direct or indirect quatation.
  • Data provider:
    • Manual entry:
      • Data provider: Indicate data provider if you use manual entry.
    • Generate automatically from file: if you use this option then data provider is take from file using 90 tag.
  • Error file
    • Download: Tell transaction you want to download error file to PC, or to the Server.
    • Generate error file
      • File name: indication file where errors will be saved.
  • Output control:
    • Test run
    • Output list of results: save all data, only errors, only correct results.
    • Layout: layout of data.

Fill selection screen and execute transaction.

/wp-content/uploads/2016/08/16_1016520.jpg

That’s how you can upload market data into SAP using FIle interface.

More information about Market data management – Index.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply