cancel
Showing results for 
Search instead for 
Did you mean: 

Numbers Returned from ECC not formatted based on country

Former Member
0 Kudos

We have created 2 custom Java web dynpro services for ESS/MSS using ABAP

custom built function modules. Each return a salary (ANSAL field) and

it is always formatted in a US format -- ##,###.## no matter what the

user's profile in TCODE SU3 is set to in ECC. We are using ABAP user

store for EP users. The standard delivered ESS/MSS services seem to

format the numbers correctly based on country code.

The only info I have found on this is:

/people/bharathwaj.ragothaman/blog/2007/03/10/formatting-in-webdynpro-java

which does not make a whole lot of sense, esp since we are using a model which cannot be modified. Also it is unclear where and how the method:

void setR3NormalizingFormattingService (boolean formatting)

is called.

Edited by: David Keiser on Apr 23, 2009 8:53 PM

We have also investigated and applied configurations using SAP note 947081, but nothing was resolved.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi David,

Normally a salary field is encoded as BigDecimal going to the java-stack. No formatting is done in ABAP.

  • Is this the same in your code?

Maybe the are the BigDecimal is changed to a String in the java code somewhere, and the standard java code is using the format of the Server it is running on.

Just my 2 cents......I would need a bit more information to help you any further....

Jeschael

Former Member
0 Kudos

Hi JV,

Understood on your response, but no, we are not making any formatting changes to the returned numbers on the Java side. The function module is imported into the w/d model and we are simply binding the returned data directly to the screen in the layout.

Does that help?

Regards,

DaveK

Former Member
0 Kudos

Hi David,

I´m confused too....sorry

Jeschael

Former Member
0 Kudos

Sorry for the confusion... i'll go into more detail:

We have 2 situations:

1. We have built a custom function module for HR that returns an employee's salary for a manager in the MSS team viewer. The function module returns to web dynpro the salary in an ABAP decimal type field w/ 4 decimal places. I import the function module into webdynpro and bind the field to a design time web dynpro screen for salary. When the web dynpro application program is run (either stand alone or in EP) the number is ALWAYS displayed formatted on the web dynpro screen in US format, i.e. ##,###.##. We are using this for multiple countries, some of which need to use the ##.###,## format, UK/Norway for example. We are using the ECC backend to control our authentication of the user, plus using SSO for our ESS/MSS. We have various users from multiple countries that share the same web dynpro application.

2. We have another SAP delivered function module that we copied and modified that is used in the ESS Employment Verification application (which is a US only delivered SAP app). We created additional ESS Employment Verification web dynpro applications for Canada, UK, and Norway. The last screen of this web dynpro application displays the employees salary ALWAYS formatted in US format, i.e. ##,###.##, where we need it displayed in the ##.###,## format, UK/Norway format. Again, we have various users from multiple countries that share the same web dynpro application.

My question is why is the number always being returned in US format when we are expecting it to be displayed in country specific formats? We have set all country settings on the web dynpro side as well as on the ECC side (in SU3). There are other standard delivered SAP apps that display numbers in the correct format, but the custom ones we have built always display in US format.

We also did all of the steps in SAP note 947081.

Is there anything else we need to do either on the Java or ABAP side to format the number. If we cannot figure this out, we'll be forced to write custom code on one side to display the number formatted correctly.

Hope this helps.