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: 

ALV Grid - Negative values printing

Former Member
0 Kudos

Hi,

I'm trying to print negative values in ALV (Grid display). In output i'm getting value first and after that '-' symbol. like,

Total Amount

-


340.00 -

24.00 -

....

How to print the minus symbol infront of the value in ALV display? Please help me.

Thanks in Advance.

2 REPLIES 2

Former Member
0 Kudos

Hi,

Use the FM

<b>CLOI_PUT_SIGN_IN_FRONT</b>

Sample Program for this FM,

data : val1 like vbap-netpr.

val1 = '12345.21'.

val1 = val1 * -1. "ur value

write:/ val1. " negative at the end

data : val(13) type c. " declare a char variable

move val1 to val.

write:/'Still', val.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

CHANGING

value = val. "sign is put ot front.

write:/'Now', val.

Regards,

Padmam.

Former Member
0 Kudos

hi,

use the fun mod -- <b>CLOI_PUT_SIGN_IN_FRONT</b>

before appending the value into the itab.....

then append and print

With Rgds,

S.Barani