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: 

Truncating Numeric Field

Former Member
0 Kudos
144

Hi all,

i want to truncate extra spaces from salary field...can anyone help me with the code?

i can do it if it is a string.but how i will do with integers???

Merlin

1 ACCEPTED SOLUTION

Former Member
0 Kudos
125

do this way ...


data : v_inte type i value '100 01',
         v_char(10),
         v_final type i.

 v_char = v_inte.
condense v_char no-gaps.
v_final = v_char.
write v_final.  

Regards,

Santosh

Edited by: Santosh Kumar Patha on Mar 17, 2008 4:56 PM

3 REPLIES 3

Former Member
0 Kudos
125

Your solution will likely be to move the field to a string field for display and/or manipulation.

Former Member
0 Kudos
125

Hi,

Better move it to a char/string type field and condense.

reward if helpful.

Regards,

ramya

Former Member
0 Kudos
126

do this way ...


data : v_inte type i value '100 01',
         v_char(10),
         v_final type i.

 v_char = v_inte.
condense v_char no-gaps.
v_final = v_char.
write v_final.  

Regards,

Santosh

Edited by: Santosh Kumar Patha on Mar 17, 2008 4:56 PM