on 12-22-2010 2:08 PM
Hi Everyone,
I have a requirement of printing Subtotals of a table in Arabic as well as English on the same page for all pages in the form.
FYI i have made a function module to convert english digits into arabic, which i use in my code to convert english amounts to arabic amounts.
Like -
CALL FUNCTION 'ZJP_M_ARABIC_NUMERALS'
EXPORTING ENGLISH = V_AMOUNT
IMPORTING ARABIC = V_AMOUNT_AR.
This gives me the arabic amount.
Now i am printing english subtotals using the javascript code :
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
if (fields.item(i).name == "AMOUNT") {
total = total + fields.item(i).rawValue;
}
}
this.rawValue = total;
Through this code i am able to get the english subtotal in my offline adobe form.
My PROBLEM is - how do i use this english subtotal generated via javascript to convert it into arabic subtotal (using the FM)
for each page.
Any help is highly appreciated..!!
Thanks,
Piyush.
Hi Piyush,
Check this below link set locales for a field using java script this might help if you are looking for @ scripting
/people/raghavendra.prabhu/blog/2010/12/17/currencynumber-formatting-in-hcm-forms
I have 2 approaches (hopefully both of them will work).
1) Have a hidden field with arabic locale, in your loop keep adding values to this field.
2) have the required field on the form set the locale to arabic, just assign the english value to this field. (if both english and arabic totals are from same records and same values mathematically then only the presentation locale is different but the value sud be the same right).
If I am wrong understanding your requirement, please explain what is the difference ...?
Cheers,
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.