Skip to Content

KRW Currency is updating wrong in the C_INV_PR

Hi All,

in our project IP Functionality is handled through a webdynpro tool in the enterprise portal ,so now the issue is when the currency is KRW then the system is updating wrongly in the database, here my question is what is the use of the class


I believe it is for updating the data to info object ,so if I pass the value as 1234 then in the database it is updating as 123400 the value is multiplied by 100 I also got similar requirement so we used 2 FM's in routines while doing transformation in BW but here updating through the above class then how can we handle this situation is there any enhancement to handle the KRW & JPY currency in the standard class mentioned above ? please help

Will TCURF help ?

fxtyt.png (105.5 kB)
Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Jan 20, 2017 at 04:01 PM

    Hi Vamshikrishna,

    key figures of type amount always are referencing a currency characteristic and the key figure values on DB have to be interpreted with respect to decimals of the used currency; the exceptional decimals of currencies can be found in table TCURX. By default a currency has 2 decimals (not contained in TCURX), i.e. 1 EUR is 1.00 on DB but e.g JPY has 0 decimals, i.e. 1 JPY on DB is 0.01. All official BW interfaces have to consider this 'currency shift'. To my knowledge this also applies to master data attributes.

    You can check this easily using the official master data maintenance transaction in BW.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Gregor,

      thank you for your reply & sorry for the late response.

      you are right kindly please understand my concern here if it is a BW transformation i can do this but in my case /BIC/K_NPV having 2 decimals so example 1234.56 if i divide it by 100 then system is making it as 12.35 ( rounding 12.3456 ) which is saving in DB as 1235 ( not 1234.56 ).i can use some variable which is having more decimals but when i pass it to the class CL_RSDMD_UPDATE_MASTER_DATA=>UPDATE_ATTRIBUTES_STATIC then i have to pass only /BIC/K_NPV which is one of the attribute of C_INV_PR so as it is not giving the desired value i don't know what to do .

      Currently i provided the work around code by reading TCURX for number decimals & then multiply by 10, 100,1000 based on the currency then saving into the database as with scaling 1000 the code now went to production but the client is not satisfied with this solution so i am thinking to raise an incident to sap, please suggest me is it good to raise incident or not i have no choice i want to provide the best solution to my client.

  • Posted on Jan 23, 2017 at 04:18 AM

    Hi Vamshi,

    This is known issue in BW system as few of the currencies doesn't have decimals, as Gregor mentioned you can check TCURX for the currencies which doesn't have the 2 decimals.

    We have exactly opposite scenario as of yours so we were doing the multiplication of 100. Check below code:

     IF SY-SUBRC EQ 0.

    In your case you need to divide it by 100.

    Add comment
    10|10000 characters needed characters exceeded