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: 

How to display -ve sign before amount in ALV grid

Former Member
0 Kudos

Hi,

I want to display -ve numbers in an ALV grid. But the sign always appear at the end of the number. Is there any option with which I can display -ve sign before the number.

Regards,

Deepti

6 REPLIES 6

Former Member
0 Kudos

Hi,

There is no option to print the -ve sign before the amount field. In order to have this you can do this in the program itself by doing concatentaion.

Concatenate '-' amt into var1.

And display this Var in the output.

This is how you can place the -ve sign before the amount.By default the -ve will be after the amount.

Pls mark helpful answers.

Regards,

Ram Mohan

Former Member
0 Kudos

Hi,

Use FM CLOI_PUT_SIGN_IN_FRONT for this.

U need to change all the numbers using this FM and then pass it for display in ALV grid.

Rgds,

Prakashsingh

Former Member
0 Kudos

Hi,

<b>You can refer to below threads:</b>

Or

USe Function Module <b>CLOI_PUT_SIGN_IN_FRONT</b>, may be this works in your case.

<b>Reward if helpful</b>

Rgds

Former Member
0 Kudos

Make the numeric to character string after concatenating it infont.? I feel there wo'nt be any reason for summing the total also there.

CHeers,

TM

hymavathi_oruganti
Active Contributor
0 Kudos

first convert it to char type and then call the fn module.

ex:

REPORT ZTESTH .

data: k type i, p(2) ."type i.

k = -2.

p = k.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

CHANGING

VALUE = p

.

instaed of p above pass the field in the fieldcat.

Former Member
0 Kudos

you can use the no_sign option in the Fieldcat, or multiply the value by negative 1 and in the fieldcat, declare the fieldname as character