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

DATA TYPE CHANGE

former_member605939
Participant
0 Likes
1,731

One of our object having Z table with more than 5000 records . One of the fields having data type NUMC with length 4 ( Like 0001 is 1 , 0020 is 20 ) . Now the requirement is to to 5 digit number and with alphabets ( Like 2002A).

New entries will be of length 5 and main concern is if we create field value 00001, it will take 00001 not 1 and but what about old entries how they will behave.

How can i do that the previous data is also accommodate with new data type.

Thanks,

4 REPLIES 4
Read only

ArthurParisius
Contributor
1,426

Your correct that in the new situation 1 wil not automatically be changed to 00001, you will need to take care of that yourself. Concerning the existing values, if you want them to have an extra leading 0, I think you should do your data type change in 2 steps. First change it to NUMC length 5 and activate the table (probably with transaction SE14), and than change it the the CHAR 5 data type.

Read only

former_member605939
Participant
0 Likes
1,426

I tried as u suggested but for old data it is taking as 4 places for new it is taking 5.

and for old data ( say it was 3 and now taking as 0003 to display the data) and for new data 00003.

Thanks

Read only

1,426

Please use the COMMENT button. ANSWER is only to propose a solution. If it's too late, you still have an option to convert your answer into a comment.

Read only

matt
Active Contributor
1,426

Create a copy the Z table. Put some sample data into the copy. Change the data type. See what happens.