on 06-24-2010 1:42 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any display/ edit pattern used on the problematic field? Regards Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.