06-14-2006 6:10 AM
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
06-14-2006 6:16 AM
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
06-14-2006 6:17 AM
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
06-14-2006 6:18 AM
06-14-2006 6:19 AM
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
06-14-2006 6:19 AM
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.
06-14-2006 6:24 AM
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