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: 

Removing Commas and after zeros

former_member198064
Participant
0 Kudos

Hi Experts,<br />

<br />

If user enters the values like 56.879.809,00 for me it should take 56.879.809 if user enters the value as 56.879.809,00 use error message.I want to delete the data including comma as well as zeros ",00" in value.This is in Module pool program designing.How to build the logic for this help me for this solution.<br />

<br />

<span style="color:red">Moderator Message: Please continue with the previous post .</span>

Edited by: Suhas Saha on Sep 29, 2011 1:02 PM

4 REPLIES 4

koolspy_ultimate
Active Contributor
0 Kudos

hi, just use


decimals o.

so that it wil display without ,00

also use own data to change user settings for default decimal notation (from app toolbar-> system->user prof-> own data).

regards,

koolspy.

Former Member
0 Kudos

Hi,

you can set the user settings for proper decimal notation from SU01.

Former Member
0 Kudos

Hi,

Say your screen variable is LV1 and it contains 56.879.809,00.

Declare another variable LV2 of type integer and assign the value of the screen field to this new variable.


DATA: lv2 TYPE i.

lv2 = lv1.

LV2 contains data without decimal places.

Regards,

Danish.

Former Member
0 Kudos

assign ur value to a variable (lv_gross1)

lenght = strlen( lv_gross1 ).

search lv_gross1 for ','.

if sy-subrc eq 0.

if sy-fdpos > 0.

move lv_gross1+0(sy-fdpos) to lv_gross.

endif.

endif.

it will remove ,00 from ur number.

Thanks,

Giridhar