SAP Program RFTBFF00 - File interface: Import market data

Description
Report RFTBFF00 allows you to transfer external market data into the SAPsystem in file form.


As part of the SAP R/3 Treasury application, the file interface supportsthe following transfer functions:
Category 01: Transfer of exchange rates
Category 02: Transfer of security price information (stocks, bonds)
Category 03: Transfer of reference interest rates (e.g. LIBOR, FIBOR)
Category 04: Transfer of indexes
Category 07: Transfer of commodity forward prices

Category 21: Transfer of forwards
Report program RFTBFF00 requires the input file to be in a specific fileformat and inserts the data into the operative SAP market data tables.
IMPORTANT:
This format must be adhered to, since incorrect entries can only becorrected by making time-consuming manual amendments (correctingindividual entries in customer-specific ABAP report programs). Beforeyou import your market data to the SAP system using report programRFTBFF00, you must therefore check that it is in the file formatdescribed below. You can do this in a test run by choosing Test run onthe program selection screen.
NOTE: You can use report program RFTBFF01 to obtain an overview of themarket data defined in the system.
Note: An alternative method of transferring market data to the SAPsystem is the datafeed interface, which uses Remote Function Call (RFC)to create a direct link between the external partner system and the SAPsystem. The datafeed interface allows you to transfer the market datareal-time.

Requirements

Input file
Before you call up the report program, make sure that the directory pathof the input file you have specified is valid. Flag the checkbox'UPLOAD' to indicate whether the input file is on the local presentationserver (X), or on the application server.

Error file
You can output any data records that have not been read correctly to anerror file by specifying an output file and flagging the generate errorfile checkbox. You can then correct the error file manually and use itas an input file for the next import.
Check that the directory path of the error file you have specified isvalid before your call up the report program. If no file with thespecified file name exists, the report program creates one. If a filealready exists, the report deletes it, creates a new file under the samename, and fills it with the incorrect data records.
Via the Download checkbox, you specify whether the output file is to bedownloaded to the local presentation server or to the applicationserver. You must make sure that you use the correct notation for thevarious operating systems when you enter the path names. If you downloadthe output file to the presentation server, you can use the F4 possibleentries function to select the file.

Data provider
You can determine the data provider automatically via the file header ofthe input file. If you do not wish to use this function, or if the fileheader does not contain any information on the data provider, you canalso fill the data provider field manually. If you do not specify a
data provider, the names are then not converted.

Technical description of transfer structures
A generic data structure is used to transfer the market data. Differentattributes of this structure are necessary for the different datacategories.

General structure of the file for transferring market data:
Record structure:
Fld no.,,Meaning,,Cat.,,Length,,R/E,,Description
1,,Data class,,CHAR,,2,,R,,Category of data class
,, ,, ,, ,, ,,('01', '02', '03'...)
2,,Key 1,,CHAR,,20,, ,,Data description
3 ,,Key 2 ,,CHAR,,20 ,,R (Cat. 01),,Additional data
,, ,, ,, ,,R (Cat. 02),,description or stock
,, ,, ,, ,,E (Cat. 03),,exchange
,, ,, ,, ,,E (Cat. 04),, 4 ,,
4 ,,Market ,,CHAR,,15 ,,R (Cat. 01),,Rate type
,,data type ,, ,, ,,R (Cat. 02),,Volatility type
,, ,, ,, ,,E (Cat. 03)
,, ,, ,, ,,R (Cat. 04)
5 ,,Date ,,CHAR,,08 ,,R ,,Contribution date
,, ,, ,, ,, ,,(format: DDMMYYYY)
6 ,,Time ,,CHAR,,06 ,,E ,,Contribution time
,, ,, ,, ,, ,,(format: HHMMSS)
7 ,,Value ,,CHAR,,20 ,,R ,,value for data
,, ,, ,, ,, ,,description
8 ,,Currency ,,CHAR,,20 ,,E (Cat. 01),,Currency D
,, ,, ,, ,,R (Cat. 02),,data description
,, ,, ,, ,,E (Cat. 03)
,, ,, ,, ,,E (Cat. 04)
9 ,,FROM curr.,,CHAR,,07 ,,R (Cat. 01),,Factor for units of
,,factor ,, ,, ,,E (Cat. 02),,FROM currency
,, ,, ,, ,,E (Cat. 03)
,, ,, ,, ,,E (Cat. 04)
10 ,,TO curr. ,,CHAR,,07 ,,R (Cat. 01),,Factor for units of
,,factor ,, ,, ,,E (Cat. 02),,TO currency
,, ,, ,, ,,E (Cat. 03)
,, ,, ,, ,,E (Cat. 04)
11 ,,Price ,,CHAR,,05 ,,E ,,Price notation
,,notation ,, ,, ,, ,,for securities
12 ,,Status ,,CHAR,,02 ,,E ,,Error status
,, ,, ,, ,, ,,(values 50..99)
13 ,,Error ,,CHAR,,80 ,,E ,,Error message
,,message

General notes:
Required fields (R) must be filled with values. There are some fieldsfor which you are not required to make an entry (E). These empty fieldsmust be filled up with spaces. Tabulators are not permitted. Thedecision on whether a field is required or optional depends partly uponthe category of the data class (field no. 1). Whole numbers and decimalplaces must be separated with a period.
The following data class categories are permitted:
Value ,,Meaning
01 ,,Transfer of exchange rates
02 ,,Transfer of security price information
03 ,,Transfer of reference interest rates
04 ,,Transfer of index values
21 ,,Transfer of forwards

Structure for transferring exchange rates (data class 01)
Record structure:
Fld no.,,Meaning ,,Cat.,,Length,,R/E ,,Description
1 ,,Data class,,CHAR,,2 ,,R ,,Fixed value '01'
2 ,,Key 1 ,,CHAR,,20 ,,R ,,FROM currency
3 ,,Key 2 ,,CHAR,,20 ,,R ,,TO currency
4 ,,Market ,,CHAR,,15 ,,R ,,Rate type
,,data type ,, ,, ,, ,,(bid, ask, middle)
5 ,,Date ,,CHAR,,08 ,,R ,,Contribution date
,, ,, ,, ,, ,,(format: DDMMYYYY)
6 ,,Time ,,CHAR,,06 ,,E ,,Contribution time
,, ,, ,, ,, ,,(format: HHMMSS)
7 ,,Value ,,CHAR,,20 ,,R ,,Value for data
,, ,, ,, ,, ,,
8 ,,Currency ,,CHAR,,20 ,,E ,,not relevant
9 ,,FROM curr.,,CHAR,,07 ,,R ,,Factor for units of
,,factor ,, ,, ,, ,,FROM currency
10 ,,TO curr. ,,CHAR,,07 ,, ,,Factor for units of
,,factor ,, ,, ,, ,,TO currency
11 ,,Price ,,CHAR,,05 ,,E ,,not relevant
,,notation ,, ,, ,, ,,
12 ,,Status ,,CHAR,,02 ,,E ,,Error status
,, ,, ,, ,, ,,(Values 50..99)
13 ,,Error ,,CHAR,,80 ,,E ,,Error message
,,message
Note:
The program converts the currency codes from each data provideraccording to the conversion table and transfers them to the SAP R/3 TRSystem. If there is no entry for a particular currency code in theconversion table, the code for that currency is not converted.

Structure for transferring security prices (data class 02)
Record structure:
Fld no.,,Meaning ,,Cat.,,Length,,R/E ,,Description
1 ,,Data class,,CHAR,,2 ,,R ,,Fixed value '02'
2 ,,Key 1 ,,CHAR,,20 ,,R ,,Security name
,, ,, ,, ,, ,,(Sec. ID number)
3 ,,Key 2 ,,CHAR,,20 ,,R ,,Stock exchange
4 ,,Market ,,CHAR,,15 ,,R ,,Rate type
,,data type ,, ,, ,, ,,(bid, ask, closing)
5 ,,Date ,,CHAR,,08 ,,R ,,Contribution date
,, ,, ,, ,, ,,(format: DDMMYYYY)
6 ,,Time ,,CHAR,,06 ,,E ,,Contribution time
,, ,, ,, ,, ,,(format: HHMMSS)
7 ,,Value ,,CHAR,,20 ,,R ,,Security price
8 ,,Currency ,,CHAR,,20 ,,R ,,Currency of security
,, ,, ,, ,, ,,price (ISO code)
9 ,,FROM curr. ,,CHAR,,07 ,,E ,,Not relevant
,,factor
10 ,,TO curr. ,,CHAR,,07 ,,E ,,Not relevant
,,factor
11 ,,Price ,,CHAR,,05 ,,E ,,Price notation
,,notation ,, ,, ,, ,,(optional)
12 ,,Status ,,CHAR,,02 ,,E ,,Error status
,, ,, ,, ,, ,,(Values 50..99)
13 ,,Error ,,CHAR,,80 ,,E ,,Error message
,,message
Note on security name:
You can define the security name in the SAP system freely. For example,this may be the security ID number for a specific country or the ISINnumber. Before security prices are imported, you need to define whichsecurity names are used by which data providers in the conversion table.You must make sure that the security code you enter in the conversiontable is also defined in the master data. If the security name has notbeen defined, the program reads the security names as security IDnumbers.
Note on stock exchange:
You can define the name of the stock exchange freely in the SAP system.The code used by the data provider to denote the stock exchange can alsobe converted via the conversion table. If no name is entered in theconversion table, no conversion takes place.
Note on rate type:
You can define the rate type freely in the SAP system. The names for thesecurity price types used by the data provider can be converted via theconversion table.
Note on currency:
You must specify the currency for unit-quoted securities. If you fail todo so, the security price cannot be imported into the SAP system.

Structure for transferring reference interest rates (data class 03)
Record structure:
Fld no.,,Meaning ,,Cat.,,Length,,R/E ,,Description
1 ,,Data class,,CHAR,,2 ,,R ,,Fixed value '03'
2 ,,Key 1 ,,CHAR,,20 ,,R ,,Reference interest rate
,, ,, ,, ,, ,,description
3 ,,Key 2 ,,CHAR,,20 ,,E ,,Not relevant
4 ,,Market ,,CHAR,,15 ,,E ,,Not relevant
,,data type
5 ,,Date ,,CHAR,,08 ,,R ,,Contribution date
,, ,, ,, ,, ,,(format: DDMMYYYY)
6 ,,Time ,,CHAR,,06 ,,E ,,Contribution time
,, ,, ,, ,, ,,(format: HHMMSS)
7 ,,Value ,,CHAR,,20 ,,R ,,Interest rate
8 ,,Currency ,,CHAR,,20 ,,E ,,Not relevant
9 ,,FROM curr.,,CHAR,,07 ,,E ,,Not relevant
,,factor
10 ,,TO curr. ,,CHAR,,07 ,,E ,,Not relevant
,,factor
11 ,,Price ,,CHAR,,05 ,,E ,,Not relevant
,,notation
12 ,,Status ,,CHAR,,02 ,,E ,,Error status
,, ,, ,, ,, ,,(Values 50..99)
13 ,,Error ,,CHAR,,80 ,,E ,,Error message ,,
message
Note on reference interest rate name:
You can define the reference interest rate name freely in the SAPsystem. The reference interest rate name used by the data provider canbe converted via the conversion table. If no reference interest ratename is entered in the conversion table, the name used by the datasupplier is transferred to the SAP system.

Structure for transferring index values (data class 04)
Record structure:
Fld no.,,Meaning ,,Cat.,,Length,,R/E ,,Description
1 ,,Data class,,CHAR,,2 ,,R ,,Fixed value '04'
2 ,,Key 1 ,,CHAR,,20 ,,R ,,Index name
3 ,,Key 2 ,,CHAR,,20 ,,E ,,Not relevant
4 ,,Market ,,CHAR,,15 ,,R ,,Index type
,,data type
5 ,,Date ,,CHAR,,08 ,,R ,,Contribution date
,, ,, ,, ,, ,,(format: DDMMYYYY)
6 ,,Time ,,CHAR,,06 ,,E ,,Contribution time
,, ,, ,, ,, ,,(format: HHMMSS)
7 ,,Value ,,CHAR,,20 ,,R ,,Index value
8 ,,Currency ,,CHAR,,20 ,,E ,,Not relevant
9 ,,FROM curr.,,CHAR,,07 ,,E ,,Not relevant
,,factor
10 ,,TO curr. ,,CHAR,,07 ,,E ,,Not relevant
,,factor
11 ,,Price ,,CHAR,,05 ,,E ,,Not relevant
,,notation
12 ,,Status ,,CHAR,,02 ,,E ,,Error status
,, ,, ,, ,, ,,(Values 50..99)
13 ,,Error ,,CHAR,,80 ,,E ,,Error message
,,message
Note on name of index (type)
You can define the index (type) name freely in the SAP system. Theindex (type) name used by the data provider can be converted via theconversion table. If no index (type) name is entered in the conversiontable, the name used by the data supplier is transferred to the system.You must make sure that the index (type) name you enter in theconversion table is also defined in the master data.

Structure for transferring commodity forward prices (data class 07)
Record structure:
Fld no.,,Meaning,,Cat.,,Length,,R/E,,Description
1,,Data class,,CHAR ,,2 ,,M,,Fixed value '07'
2,,Key 1,,CHAR,,20,,M,,Commodity name
3,,Key 2,,CHAR ,,20,,L,,Period name
4,,Market data type,,CHAR,,15,,M,,Commodity quotation type
5,,Date,,CHAR,,08,,M ,,Quotation date (format: DDMMYYYY)
6,,Time,,CHAR,,06,,L,,Time value setting (format: HHMMSS)
7,,Value,,CHAR,,20,,M,,Forward price
8,,Currency,,CHAR,,20,,L,,Quotation currency unit
9,,Currency factor,,CHAR,,07,,L,,No meaning
10,,Currency factor,,CHAR,,07,,L,,No meaning
11,,Price notation,,CHAR,,05,,L,,Unit of measure for notation
12,,Status,,CHAR,,02,,L,,Error status (values 50..99)
13,,Error message,,CHAR,,80,,L,,Error message
Note on period name:
The period name can be used for months, quarters, and years. The namemust follow a fixed format. The formats are as follows: For monthsMM/YYYY, for quarters Q#/YYYY (whereby Q# stands for Q1 through Q4 andYYYY stands for the year).
Note on the provider:
Specification of the market data provider has not been included in thedata structure. For the transfer of commodity forward prices, it istherefore necessary to enter the market data provider manually or toread this data from the header. See also the section "Data Provider".

Structure for transfer of forwards (data class 21)
Record structure:
FieldNr ,,Meaning ,,Cat. ,,Length ,,Req./Empty ,,Explanation
1 ,,Data class ,,CHAR ,,2 ,,R ,,Fixed value '21'
2 ,,Key 1 ,,CHAR ,,20 ,,R ,,To currency
3 ,,Key 2 ,,CHAR ,,20 ,,R ,,From currency
4 ,,Mkt data type,,CHAR ,,15 ,,R ,,Rate type(e.g. bid,
''ask, middle rate
5 ,,Date ,,CHAR ,,08 ,,R ,,Date - value date
,, ,, ,, ,, ,,(format: MMDDYYYY)
6 ,,Time ,,CHAR ,,06 ,,R ,,Time value date
,, ,, ,, ,, ,,(format: HHMMSS)
7 ,,Value ,,CHAR ,,20 ,,R ,,Value Data name
8 ,,Currency ,,CHAR ,,20 ,,E ,,No meaning
9 ,,Currency ,,CHAR ,,07 ,,R ,,Factor for units of
,,factor from ,, ,, ,, ,,to currency
,, ,, ,, ,, ,,
,, ,, ,, ,, ,,
11 ,,Price not. ,,CHAR ,,05 ,,E ,,Term in days
,, ,, ,, ,, ,,
12 ,,Status ,,CHAR ,,02 ,,E ,,Error status
,, ,, ,, ,, ,,(Values 50..99)
13 ,,Error ,,CHAR ,,80 ,,E ,,Error message
message
Note: The names of the currencies are converted according to the codeconversion table and the data provider, and transferred to the SAP TRSystem. If there is no entry for a currency in the code conversiontable, no conversion is carried out for this currency.

Authorization required
Before you start the report program, you must ensure that you haveauthorization for transaction TBDM. To import the market data via theapplication server (data is not uploaded to a PC), you needauthorization to access files from ABAP programs. To maintain the ratesand prices in the operative SAP tables, you need authorization groupsFC32 (currencies), FC16 (interest rates), TRZ (indexes), FC00 (currencyvolatilities) and TRMK (interest rate volatilities).

Other report programs for the market data file interface
RFTBFF01: Output requirement list
RFTBFF03: Fill conversion tables automatically
RFTBFF20: Import statistics data Customizingactivities of the market data file interface Define origin of market data and codeconversion Structure conversion tables
Convert currency namesConvert currency typesDefine meaning of security IDsConvert exchangesConvert security price typesConvert interest rate definitionsConvert index defintionsIndexarten umschlüsseln