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

Function module to remove leading zeros

Former Member
0 Likes
14,848

hi,

is der any functional module to remove leading zeros

thanks and regards

Nikesh kumar

7 REPLIES 7
Read only

Former Member
0 Likes
3,923

<b>CONVERSION_EXIT_ALPHA_OUTPUT</b>

Regards

Aneesh.

Read only

Former Member
0 Likes
3,923

Shift field left deleting leading '0'

Read only

0 Likes
3,923

can u show wid an example

Read only

0 Likes
3,923
REPORT  ZTEST_TEST.

DATA : v_num(5) TYPE n VALUE '0002'.


CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    input  = v_num
  IMPORTING
    output = v_num.



WRITE : v_num.

Regards

Aneesh.

Read only

0 Likes
3,923

data: num type i value 000012345 .

SHIFT num LEFT DELETING LEADING 0.

Hope dis helps..

Reward if it does

Read only

Former Member
0 Likes
3,923

Hi

No need of Fm..

Check this...


DATA : var type char10 value '00010'.
var = abs( var ).
write : var.
DATA : var1 type p value '00010'.
var1 = abs( var1 ).
write : var1.


Read only

Former Member
0 Likes
3,923

Hi,

You can use the <b>FM CONVERSION_EXIT_ALPHA_OUTPUT</b> and if you want to do in program do as below :

shift <fieldname> left deleting leading '0'.

Thanks,

Sriram Ponna.