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

pad a string with zeros ?

Former Member
0 Likes
550

Hello ABAP Experts,

How to pad a string with zeros.. is there a direct method i can use.

eg:

string length is 8

string is custnumb

value is 588

but i would like to see 00000588

please suggest.

Hello ABAP Experts,

How to pad a string with zeros.. is there a direct method i can use.

eg:

string length is 8

string is custnumb

value is 588

but i would like to see 00000588

please suggest.

2 REPLIES 2
Read only

Former Member
0 Likes
499

Hi,

Use FM CONVERSION_EXIT_ALPHA_INPUT.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
499

You can simply move it to a TYPE n field also.

data: n(8) type n.
data: custnumb(8) type c value '588'.

n = custnumb.

custnumb = n.

Regards,

Rich Heilman