Hi Team,
I am working on exchange rate upload through abap proxy & using BAPI BAPI_EXCHRATE_CREATEMULTIPLE.
We have come across an issue, suppose HUF TO CHF is maintained as 100:1 in TCURF.
But i am getting a file which has 1:1 ratio (0.00345) so while uploading the rate system is adding additional trailing zeroes i.e. 0.34500.
basically it is multiplying the the with 100.
I have debugged & found below code which does the same.
IF prot-exch_rate_v IS INITIAL.
IF system-from_factor NE prot-from_factor
OR system-to_factor NE prot-to_factor.
crate = 100000 * system-from_factor * prot-to_factor
* prot-exch_rate.
crate = crate / system-to_factor / prot-from_factor.
IF crate EQ 0
OR crate GE 1000000000.
prot-message = 'E016'.
prot-msgv1 = prot-from_curr.
prot-msgv2 = prot-to_currncy.
MODIFY prot.
CONTINUE.
ENDIF.
prot-exch_rate = crate / 100000.
prot-from_factor = system-from_factor.
prot-to_factor = system-to_factor.
prot-message = 'I017'.
MODIFY prot.
ENDIF.
ELSE.
IF system-from_factor NE prot-from_factor_v
OR system-to_factor NE prot-to_factor_v.
crate = - 100000 * system-to_factor * prot-from_factor_v
* prot-exch_rate_v.
crate = crate / system-from_factor / prot-to_factor_v.
IF crate EQ 0
OR crate LE -1000000000.
prot-message = 'E016'.
prot-msgv1 = prot-from_curr.
prot-msgv2 = prot-to_currncy.
MODIFY prot.
CONTINUE.
ENDIF.
prot-exch_rate_v = - crate / 100000.
prot-from_factor_v = system-from_factor.
prot-to_factor_v = system-to_factor.
prot-message = 'I017'.
MODIFY prot.
ENDIF.
ENDIF.
please help me how can i eliminate trailing zeroes or rounding off of the value??
Thanks,
darshan.