Application Development and Automation 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: 
Read only

PROBLEM WITH CURRENCY CONVERSION IN ALV

Former Member
0 Likes
880

HI..

When iam trying to convert currency field from one currency to

another (eg: usd to inr) iam getting error.

iam using the fm 'convert_to_local_currency'.

i want to display both the coloumns i.e usd,inr in the same grid.

help me....

thanks.

HI..

When iam trying to convert currency field from one currency to

another (eg: usd to inr) iam getting error.

iam using the fm 'convert_to_local_currency'.

i want to display both the coloumns i.e usd,inr in the same grid.

help me....

thanks.

5 REPLIES 5
Read only

Former Member
0 Likes
726

Rk,

Pass all these parameters.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
      EXPORTING
*    CLIENT                  = SY-MANDT
        date                    = p_ekko_bedat
        foreign_amount          = p_i_po_info_ntval
        foreign_currency        = p_ekko_waers
        local_currency          = r_buk-waers
*    RATE                    = 0
        type_of_rate            = 'M'
*    READ_TCURR              = 'X'
      IMPORTING
*    EXCHANGE_RATE           =
*    FOREIGN_FACTOR          =
        local_amount            = p_i_po_info_ntval
*    LOCAL_FACTOR            =
*    EXCHANGE_RATEX          =
*    FIXED_RATE              =
*    DERIVED_RATE_TYPE       =
  EXCEPTIONS
    no_rate_found           = 1
    overflow                = 2
    no_factors_found        = 3
    no_spread_found         = 4
    derived_2_times         = 5
    OTHERS                  = 6
              .
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

Read only

0 Likes
726

Thank u for fast reply,

can u explain what are:

p_ekko_bedat,

p_i_po_info_ntval,

p_ekko_waers,

r_buk-waers.

thanks.

Read only

0 Likes
726

HI.

Iam able to convert to other currencies except 'INR'

is there any method to convert to 'INR'.

thank u.

Read only

Former Member
0 Likes
726

Hi,

convert it and move both values into single variable using concadinate

and append itab.

Read only

Former Member
0 Likes
726
p_ekko_bedat,"Currency translation date
p_i_po_info_ntval,"Amount in foreign currency
p_ekko_waers,"Currency key for foreign currency
r_buk-waers."Currency key for local currency