Hello ABAPers.
I'm getting started with Adobe forms and I have encountered an issue with locale settings.
I support multilingual and international system. This means I have to respect both formats of figures. One thousand may look as follow:
1,000.00 or 1000.00 (English formatting used by Japan, UK, USA, etc.)
1.000,00 or 1000,00 (European formatting used by rest of the world)
When printing Adobe form, I pass structure of type sfpdocparams. In thi structure I have 2 important fields:
- LANGU -> it impacts on texts language
- COUNTRY -> it should impact on locale, which means formatting of figures and dates.
If I pass LANGU='E' and COUNTRY='EN' it behaves properly
If I pass LANGU='D' and COUNTRY='DE' it behaves properly (I get European formatting)
If I pass LANGU='L' and COUNTRY='PL' it behaves properly (I get European formatting)
If I pass LANGU='E' and COUNTRY='PL' I get a problem. I have then English language (correct) and English formatting (error!)
If I pass LANGU='L' and COUNTRY='DE' I also have a problem. Language is determined correctly (Polish), but formatting is English even though both Germany and Poland use European formatting.
I have tested all possible combinations of langu/country. Above are just examples. The conclusion is as follow:
If language is not in line with country, Adobe takes locale en_US or en_GB. I've checked file trace.txt from PDF generation. I've found something like this: "System locale: en_GB".
I have saved my XFD.xml file from printout with settings LANGU='E' and COUNTRY='PL'. Printout was broken, but when using this XFD for preview in designer, I get correct formatting.
Originally form's locale was English (it's a copy from standard form SD_SDOC_FORM01), but I have changed it to Polish (European formatting) - it didn't help.
I have checked also that print program uses a statement SET COUNTRY.
Only Idea I have now is to control formatting using scripting in FormCalc or JavaScript. FormCalc delivers function to control locale of date fields:
$.format.picture = DateFmt(1, $.locale);
but I couldn't find any of such functions to control figure's formatting.
Or maybe it's some server setting? If so, then how to manage it?
Please advise,
Michał