cancel
Showing results for 
Search instead for 
Did you mean: 

KRW Currency is updating wrong in the C_INV_PR

0 Kudos

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

CL_RSDMD_UPDATE_MASTER_DATA=>UPDATE_ATTRIBUTES_STATIC

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 ?

Accepted Solutions (0)

Answers (2)

Answers (2)

shanthi_bhaskar
Active Contributor
0 Kudos

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:

CALL FUNCTION 'RSW_CUR_DECIMALS_GET'
 EXPORTING
 I_CUR = <RESULT_FIELDS>-CURRENCY
 IMPORTING
 E_DECIMALS = L_CURRDEC.
 IF SY-SUBRC EQ 0.
 IF L_CURRDEC EQ 0.<RESULT_FIELDS>-STOCK_VAL = <RESULT_FIELDS>-STOCK_VAL * 100.
 ENDIF.
 ENDIF.

In your case you need to divide it by 100.

0 Kudos

Thank you baskar,

appreciations for your code but this is not in my case.

0 Kudos

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.

Regards,

Gregor

0 Kudos

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.