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: 

Ignoring the dot and Minus Symbol

Former Member
0 Kudos
239

Hello ABAPpers,

I have a field WRBTR(Amount in document currency) whose value contains the dot as well as minus symbol.

I have to ignore this value.

Is their any function module or the standard method to ignore this value.

Please reply.

Regards,

Rahul

1 ACCEPTED SOLUTION

jayanthi_jayaraman
Active Contributor
0 Kudos
95

Hi,

Just assign it to character and then use replace statement to replace '.' by ''.

For removing negative, use abs function.

5 REPLIES 5

Former Member
0 Kudos
95

Dear Rehul,

There should not to be any dots in database table .

Even you can remove it from database table.

meanwhile in your program when selected records from database table simply delete records from internal table containing these type of characters by putting where condition.

Regards,

Vijay

Former Member
0 Kudos
95

hi,

just declare another integer variable and use this code...

data w_temp type i.

if WRBTR < 0.
w_temp = 0 - WRBTR.
else.
w_temp = WRBTR.
endif.

write w_temp.  " this will ignore - as well as dot.

Regards,

Siddarth

Former Member
0 Kudos
95

Hi,

Try to split the amount where there is a dot and minus. Then concatenate the rest in to a new variable. Yu will get the amount with out decimals and minus.

Regards

jayanthi_jayaraman
Active Contributor
0 Kudos
96

Hi,

Just assign it to character and then use replace statement to replace '.' by ''.

For removing negative, use abs function.

Former Member
0 Kudos
95

Thanks