cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal Issue while posting annual salary using HCM P&F

Former Member
0 Kudos

Hello All

We are facing a strange problem while updating the Annual Salary of Infotype 0008 using HCM P&F. User in the form can enter a wage type amount, based on this wage type amount the annual salary is getting calculated by the std. way.

Now the problem here is, say we are passing Hourly wages as 55.000 USD3, the annual salary should have been updated as 114400.00 USD (i.e. 55 * 2080 Hours Annually). But after the posting when we see the annual salary amount it is displayed as 11440.00 USD (Strange!! It is divided by 10 ). But the wage type amount is properly displayed as 55.000 USD3 in PA20. All the other infotypes are updated correctly with the new pay structure and work schedule details correctly.

Appreciate your help, if any of you have come across this issue before.

Thank you.

Regards

Ranganath

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Took quite a bit of debugging to get to the solution :). In our system Annual Salary is held with curreny key USD and wage type are held with curreny key USD3.

In the SAP_PA service, when we were deriving the WAERS field, it was from the line item structure of IT0008. But the infotype 0008 framework is designed such that, that currency it reads to calculate the annual salary is from the Main structure of IT0008. Changing the reference of currency key to main structure currency key from Line structure resolved the issue.

ChrisSolomon
Active Contributor
0 Kudos

hahahahahahaha

Been down this road before.

Pretty much it is exactly as said....decimal for currency issue. Some currencies use 2 decimal places...some use 4...and better yet, SAP allows you to even configure your own if needed.

Now, how did WE solve this. We tore apart (debugging) the actual code SAP uses in PA30 when showing/editting/updating Basic Pay. You will see in there how they work the "magic". Oddly.....the look at the decimal setting, multiply it out in the background to store correctly but pull a "switch-a-roo" on the front end to display it correctly as the user would expect (ie 4 decimals for example). It's pretty crazy stuff.

But we got it working....via code in our own generic service......and it worked like a charm.

Former Member
0 Kudos

Thanks Soloman. Yes we are also doing that "magic" to store the amount for Wage type in backend for different currency format :). But our problem is with the Annual Salary, for which we are not doing anything from the Form. It will be calculated based on Wage Type amounts. Yes, one thing we are passing is the Currency field of Annual Salary, which is always USD :).

- Ranganath

Former Member
0 Kudos

This is the issue which is coming from using 2 different currencies ( i.e. USD3 ( with 3 decimals) and USD( with 2 decimals).

In your calculations (SAP side), write your results to a string using curreny addition.

for example

write l_amt to l_amt_ch currency l_curr

Former Member
0 Kudos

Thanks Sharad. But there are no calculations done from ourside in SAP backend. We are just passing the wage type amounts, everything others will be done by std. SAP backend programs based on configurations.

- Ranganath

OttoGold
Active Contributor
0 Kudos

Is there any display/ edit pattern used on the problematic field? Regards Otto

Former Member
0 Kudos

No Otto. Annual Salary field is not defined on the form. It is getting calculated in backend based on configurations related to Employee Group of the Employee.