Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Use BAPI_EXCHRATE_CREATEMULTIPLE ??

Former Member
0 Kudos

Hi all,

I have an excel file Containg the currency exchange rates which i will be getting from a bank on a daily basis..Now i will read these file and update the table TCURR ..

Now the file is located at some file server..What i have thought is that i will read these file from the file server using FTP function modules of SAP and then use the BAPI_EXCHRATE_CREATEMULTIPLE to update the table..

The excel file i have has the same structure as the structure of these BAPI..

Can any one of you please help me out as to how i should proceed with the help of a code or a similar program like these..

Itz an urgent issue..

Useful points will be rewarded..

Thanks in advance..

Arun

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Arun

If enter the following record to TABLES parameter EXCHRATE_LIST

RATE_TYPE = '001'
FROM_CURR = 'GBP'
TO_CURRNCY = 'EUR'
VALID_FROM = '20070901' 
EXCH_RATE = '1.55000' 
FROM_FACTOR = 1 
TO_FACTOR = 1

and set UPD_ALLOW = 'X' (in case of already existing exchange rate) then the BAPI will create or update the exchange rate.

Check this using the following coding:


" Messages are collected into lt_return:
  LOOP AT lt_return TRANSPORTING NO FIELDS
                 WHERE ( type CA 'AEX' ).  " abort, error, dump
    EXIT.
  ENDLOOP.
  IF ( syst-subrc = 0 ).
    ROLLBACK WORK.
  ELSE.
    COMMIT WORK.
  ENDIF.

Regards

Uwe

2 REPLIES 2

uwe_schieferstein
Active Contributor
0 Kudos

Hello Arun

If enter the following record to TABLES parameter EXCHRATE_LIST

RATE_TYPE = '001'
FROM_CURR = 'GBP'
TO_CURRNCY = 'EUR'
VALID_FROM = '20070901' 
EXCH_RATE = '1.55000' 
FROM_FACTOR = 1 
TO_FACTOR = 1

and set UPD_ALLOW = 'X' (in case of already existing exchange rate) then the BAPI will create or update the exchange rate.

Check this using the following coding:


" Messages are collected into lt_return:
  LOOP AT lt_return TRANSPORTING NO FIELDS
                 WHERE ( type CA 'AEX' ).  " abort, error, dump
    EXIT.
  ENDLOOP.
  IF ( syst-subrc = 0 ).
    ROLLBACK WORK.
  ELSE.
    COMMIT WORK.
  ENDIF.

Regards

Uwe

Former Member
0 Kudos

thanks