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: 

Need to add leading zeros to the field if field length is less than 6

0 Kudos

Actually the field length is 16.

But for some manual entries it is comming as 4 chars.

so if field length is less than 6 then it should be replaced by leading zeros.

Moderator message: very basic, please (re)search yourself before asking, @all: please do not reply to basic questions, points removed.

locked by: Thomas Zloch on Sep 9, 2010 11:43 AM

3 REPLIES 3

awin_prabhu
Active Contributor
0 Kudos

Hi Ravi,

Use FM CONVERSION_EXIT_ALPHA_INPUT for adding leading zeros.

Thanks

Former Member
0 Kudos

Hi Ravi,

Do it in 2 steps.

1. check the length of your entry by strlen function and get the length.

2. If the output is less than 6 call the FM CONVERSION_EXIT_ALPHA_INPUT to get leading zero

Regards,

anirban

former_member404244
Active Contributor
0 Kudos

Hi,

Take a variable and then once you get the field length less than 6 char then pass the value to the varibale and then use "CONVERSION_EXIT_ALPHA_INPUT" and then once the leading zero's are prefixed then pass this value back to the main field.

Regards,

Nagaraj