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 remove negative sign from a particular field

Former Member
0 Kudos

hi gurus,,

i m using wrbtr field from ppdit table in ,database table it contains negative sign but in output i dont want to show negative sign cud u plz tell me how to remove negative sign...

thnx in advance

1 ACCEPTED SOLUTION

Simha_
Employee
Employee
0 Kudos

Hi,

Use <b>'NO-SIGN'</b> when moving to the output...

Cheers,

Simha.

6 REPLIES 6

Former Member
0 Kudos

loop at itab.

if itab-wrbtr lt 0.

itab-wrbtr = itab-wrbtr * ( -1 ).

endif.

write : / itab-wrbtr .

endloop.

regards

shiba dutta

Former Member
0 Kudos

Ravi,

You can use ABS arithmatic operation.

e.g. p_wrntr = ABS( wrbtr ).

in the o/p write p_wrbtr.

The ABS operation always returns the absolute (positive) value of a number.

Former Member
0 Kudos

Ravi,

You can use ABS arithmatic operation.

e.g. p_wrntr = ABS( wrbtr ).

in the o/p write p_wrbtr.

The ABS operation always returns the absolute (positive) value of a number.

Simha_
Employee
Employee
0 Kudos

Hi,

Use <b>'NO-SIGN'</b> when moving to the output...

Cheers,

Simha.

Former Member
0 Kudos

Hi Ravi ,

Jut loop on your internal table and check if the value is negetive , if the value is negetive multiply with -1 else keep it as it is.

and if you are using the write command use 'NO-SIGN' , it does not display the sign .

Regards

Arun

Former Member
0 Kudos

Hi,

Use it as:

IT_BSEG-WRBTR = -1 * IT_BSEG-WRBTR.

I myself have used it in my program.

Hope this helps.

Reward if helpful.

Regards,

Sipra