Application Development and Automation 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: 
Read only

adding commas in quan variable of smartforms

Former Member
0 Likes
1,900

hi experts,

In my smartforms,i have a variable temp_menge which is having value 1000000 but i want to get it displayed as 1,000,000.How to write the same.?????

Thanks,

Gaurav

Edited by: Gaurav Kumar on Feb 26, 2008 2:30 PM

hi experts,

In my smartforms,i have a variable temp_menge which is having value 1000000 but i want to get it displayed as 1,000,000.How to write the same.?????

Thanks,

Gaurav

Edited by: Gaurav Kumar on Feb 26, 2008 2:30 PM

7 REPLIES 7
Read only

Former Member
0 Likes
1,402

Hi,

might be the variable temp_menge has been declared as charater field in your smartform/program. check it and declare the variable temp_menge as menge_d. then your problem will be get solved.

Read only

0 Likes
1,402

hi,

that variable is of type menge_d.

I'll explan:

data : temp1(50).

temp1 is having 1000000.

now when i assign it to variable temp_menge it does not take it in with commas rather it takes as it is from char variable, i want it to displayed like 1,000,000 .

Thanks,

Gaurav

Read only

Former Member
0 Likes
1,402

Hi,

There might be 2 possibilities. One is data type. Symbols of the DEC, CURR, INT, and QUAN data types are normally formatted with the a ‘thousands’ separator character. The T option allows you to omit this separator character.

Syntax:

&symbol(T)&

The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

&EKPO-MENGE& -> 1,234.560

&EKPO-MENGE(T)& -> 1234.560

So one thing is change your data type to TYPE P or remove the (T) from your code. This should work.

Reward points if helps.

Regards,

JLN

Read only

Former Member
0 Likes
1,402

Hi,

check in your smartforms....

&temp_menge(t)& -> 1000000

&temp_menge& -> 1,000,000

Read only

Former Member
0 Likes
1,402

hi all,

actually it is sapscript not smartforms.

Gaurav

Read only

0 Likes
1,402

Gentlemen,

It will work for both scripts & smartforms.

Regards,

JLN

Read only

0 Likes
1,402

Gentleman,

Its not working...

Thanks,

Gaurav