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

ALV Grid - Negative values printing

Former Member
0 Likes
1,877

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
Read only

Former Member
0 Likes
807

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.

Read only

Former Member
0 Likes
807

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