cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a number with commas in gid

Former Member
0 Kudos

Hi EveryOne,

This is Ram Prasad.I want to display a number with commas in the grid (eg:1,000).In the grid it is shown as 1000.I wan to add commas for this number to be shown in the grid display template.Can any one help on this.

Accepted Solutions (0)

Answers (3)

Answers (3)

jcgood25
Active Contributor
0 Kudos

Number formatting will only work if the column datatype is understood to be numeric (check the SQLDataType in your XML query results).

Have you seen this thread?

Former Member
0 Kudos

Hi Ram

You try like this:

In your BLS you use like this:

stringpart( "10000" , 1,1 )&","&stringright( "10000" , stringlength( "10000" ) +(-1))

Then check in the execute query how you are getting?

same query you map to display template.

Former Member
0 Kudos

Thanks for givng the answer and it works only for the value 1000.the values will be changed dynamically.So, can u give the format of number

Thanks,

Prasad

Former Member
0 Kudos

Hi,

Can you provide us the range of values and the expected format?( 1000000 can be represneted in 1,000,000 / 10,00,000).

Former Member
0 Kudos

Range of the values will be 100000 and the expected format is 1,00,000

jcgood25
Active Contributor
0 Kudos

That's an odd format, so I assume you mean 1 million to be displayed as: 1,000,000 ?

http://help.sap.com/saphelp_xmii115/helpdata/en/Applet_Reference_Details/ParameterReference.htm#Numb... Formatting

#,##0 should provide you with a comma as the thousands separator for all numbers in this column of your iGrid.

Former Member
0 Kudos

You can use format() function of BLS.

Eg: format(1000,"0,000")

It gives 1,000