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

NUMC type with ZEROS

Former Member
0 Likes
3,788

Hi, everybody

I've got a question.

It is very simple. I have a database table with a numc4 type field.

I want the field to store data with zeros, so if a go to SM30 and type: 1 for that field,

the stored value should be 0001, not 1.

Is there any way???

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,181

Hi,

Try this..

In the attributes of that input field...Set the flag "Leading zeroes"

Activate..

Thanks,

Naren

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,181

That is what will happen if the field is defined as a NUMC data type. It will always be zero filled left.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
2,182

Hi,

Try this..

In the attributes of that input field...Set the flag "Leading zeroes"

Activate..

Thanks,

Naren

Read only

Former Member
0 Likes
2,181

Yes, but i meant, in sm30 transaction, if i enter 1 the value is not set to 0001.

Why?

Read only

0 Likes
2,181

It should be in the database, but it will appear as 1 in the SM30. Check in the db using SE16, you will see it with leading zeros.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
2,181

Hi,

If it is custom table..

Then go to SE51

Give the program name -> SAPL + "Function group used to generate the screen".

Give the screen number..

Press change..

Go to the layout..

In the input field attributes for that NUMC field...Set the flag "LEADING ZEROES".

Activate the screen..

Then go to SM30..

Give 1 in the numc field and then press enter..You will see 0001

Thanks,

Naren