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: 

zero padding

Former Member
0 Kudos

Hi,

may i know how to do the zero padding to a field

example: one field contains the value 4445 , for this value i want to add zero's before 4445 value.

for fixed length we have to add zero's (how many digits need that much zero's we will add)

thank you

Moderator message - basic question locked.

Message was edited by: Rob Burbank

5 REPLIES 5

Kartik2
Contributor
0 Kudos

Hi,

Use the conversion exit

'CONVERSION_EXIT_ALPHA_INPUT'. Make sure that your variable is of suitable length, upto which you want to add zeros. It will add leading zeros to the given value.

Hope it helps. Thank you.

Regards,

kartik

Former Member
0 Kudos

Thank u i will try this

Former Member
0 Kudos

Hi,

Usually SAP has those handled internally using Conversion exits.

For many fields u would find conversion exits( like for sales order VBELN), SAP adds additional zero's as and when required.

U can use FM CONVERSION_EXIT_ALPHA_INPUT for achieving the same.

0 Kudos

Thank u, i will try this

SyambabuAllu
Contributor
0 Kudos

Dear vrse,

Here you need to convert the whatever filed contains the conversion exit you can use the directly do through Conversion Exit and if u want programmatic padding the Zero's based on ur requirement u can added that many zero's.

Thanks,

Syam.