Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

In Script calculating Total.

Former Member
0 Kudos

Hi

In scripts, when i am counting the total.

i need to print total as below

ex: if the total is 1234567, it should have print like 1,23,4567.00.

can anybody tell, how to do this.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I am not sure how you have declared this variable inside the SMART Form, declare that in reference to a database amount field. Once you do that, it will take care of the formatting, by itself.

I am guess this is related to your old post.

Regards,

Ravi

Note :Please mark the helpful answers and close the post if resolved.

8 REPLIES 8

Former Member
0 Kudos

Hi chinna,

1. Declare your variable for total

as

data : tot type p decimals 2.

2. then automatically it will print as u want.

regards,

amit m.

0 Kudos

hi Chinna,

Declare the field as type p

i.e, data: <b>p_var type p decimals 2.</b>

Regards,

Santosh

0 Kudos

Hi,

If it is total amount field,

then you can display it according to the currency.

Write <field> to <field type c> currency <currency>.

Thanks,

Rashmi.

Former Member
0 Kudos

Hi,

you can declare the Variable as P then it will print as you want or else you see your User profile, if you have the parameter without comas then change it to 9,99,999,9999 .. then it will print the comas

Thanks

Sudheer

Former Member
0 Kudos

Hi Chinna,

try changing the settings in

menu system->user profile->own data

In that in the defaults tab you can specify the decimal Notation..

regards

satesh

Former Member
0 Kudos

Hi Chinna,

In Menu Bar,

(a) Click, System->User Profile->Own Data

(Now 2nd screen will be opened Automically)

(b) Click, "Default" TabStrip

(c) Select the Decimal Notation of Whichever u need to display purpose.

(ii) Declare the field type as p.

Eg:- data: var1 type p decimals 2

Regards,

S. Manikanda.

Former Member
0 Kudos

Hi,

I am not sure how you have declared this variable inside the SMART Form, declare that in reference to a database amount field. Once you do that, it will take care of the formatting, by itself.

I am guess this is related to your old post.

Regards,

Ravi

Note :Please mark the helpful answers and close the post if resolved.

Former Member
0 Kudos

hi ravi,

first in the global declarations declare a variable say

wa_total like numc.

then go to tables in the calculation area

total the field name target field name and specify after loop.

this will print the total in each page and grandtotal in the last page.

try this out .

regards

rocky