cancel
Showing results for 
Search instead for 
Did you mean: 

Arabic SubTotals in Adobe Form Page.

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

lol.. ddnt know getting a foreign language was so easy. Thanks.

i jus got english values and changed the locale to arabic.

works like a charm.

Full marks to you!

Adobe forms are way better than smart forms, which are ironically not so smart for foreign lang in EN logon.

Answers (0)