Skip to Content

Cannot make entry to TCURR table using Function module BAPI_EXCHANGERATE_CREATE

Hi Team,

We need to make entry of exchange rates into TCURR table using a program.

I have created one, where I want to insert a single record in TCURR using BAPI : BAPI_EXCHANGERATE_CREATE. But Somehow, the update into TCURR table is not happening. Below is the code that I wrote:

DATA: lt_exrate TYPE TABLE OF BAPI1093_0,

RETURN LIKE BAPIRET2,

COMMIT_RETURN LIKE BAPIRET2,

ls_exrate like bapi1093_0.

ls_exrate-rate_type = '1001'.

ls_exrate-from_curr = 'AED'.

ls_exrate-to_currncy = 'SAR'.

ls_exrate-valid_from = '20160101'.

ls_exrate-exch_rate = '1.1'.

ls_exrate-from_factor = 1.

ls_exrate-to_factor = 1.

ls_exrate-exch_rate_v = '0.9090'.

APPEND ls_exrate to lt_exrate.

CLEAR ls_exrate.

LOOP AT lt_exrate INTO ls_exrate.

call function 'BAPI_EXCHANGERATE_CREATE'

exporting

exch_rate = ls_exrate

UPD_ALLOW = 'X'

CHG_FIXED = 'X'

* DEV_ALLOW = '000'

IMPORTING

RETURN = RETURN

* RATE_TYPE =

* FROM_CURR =

* TO_CURRNCY = .

.

IF RETURN-TYPE <> 'E' OR RETURN-TYPE <> 'A'.

call function 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

IMPORTING

RETURN = COMMIT_RETURN .

ENDIF.

ENDLOOP.

Where am I going wrong here. Please suggest.

Regards,
SHUBHAM

Add comment
10|10000 characters needed characters exceeded

  • Found a simple reason. Because ratios between the currencies were not maintained in TCURF table, BAPI was not updating in TCURR table.

    And now no more use of custom program as transaction code TBDM helps to upload the Exchange rates.

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 22 at 12:56 PM

    Found a simple reason. Because ratios between the currencies were not maintained in TCURF table, BAPI was not updating in TCURR table.

    And now no more use of custom program as transaction code TBDM helps to upload the Exchange rates.

    Add comment
    10|10000 characters needed characters exceeded