cancel
Showing results for 
Search instead for 
Did you mean: 

How to create document Number without leading zeros

Former Member
0 Kudos

Hi All,

In DMS Customizing, we have maintianed " 5"external number range range without numbe range check.

We are creating external "NUMERIC" numbers, system is creating NUMERIC numbers with leading zeros.

For example, desied document number is 11

System creates 000000000000000000000011

How to control this., we want to create numnbers like 11

Regards,

Aby

Accepted Solutions (1)

Accepted Solutions (1)

MangeshP
Active Contributor
0 Kudos

Hi aby,

I think, the numbers which you is is the method SAP is displaying the number. Actually the system has created the document with number 11. All the characters are other than 11 are showing zero. This the way SAP Stores a number in the table.

means let say you have created document with number 11, it will stored in DRAW as

Document Number 00000000000000000011,

Doc Part 000

Doc Ver 00

Just try to put number 11 in document number field in CV02N/CV03n and check. if it display a document then your issue is resolved. if it requires all the zeros with 11 numbers then there is issue.

With Regards

Mangesh Pande

Former Member
0 Kudos

Hi Mangesh,

But the requirement is no leading zero in DRAW table

Regards,

Aby

MangeshP
Active Contributor
0 Kudos

Hi Aby,

What does it matter if there are leading Zeros in DRAW table.

Its SAP Way to store the document Number.

With Regards

Mangesh Pande

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Thanks for all of your replies..

We are using DIR for a different purpose, and limiting the no: of characters as 7, in some screens, so leading zeros was causing issues for numeric numbers.

We will solve the issue with conversion routines, and I am closing this thread.

Regards,

Aby

Former Member
0 Kudos

Dear Aby,

Please check with your abap and basis team they will restrict the leading Zeros through Program.

And other thins is system will take default leading zeros depends on the length of the filed.

But making the changes in DRAW table is not a good way.

Could you please elaborate what exactly you are facing the problem with Leading Zero's.

If you create any report report Abaper's will remove those Zero's by using statement

( gs_fieldcat-no_zero = 'X').

Regards,

Harsha.

peter_kamenik
Active Participant
0 Kudos

Hello,

do you get the number with the leading zeroes after you create the document? I mean is the gui saying "doc no. 0000000000000000011 000 00 created"? Or you see "Doc no. 11 000 00 created"?

In first case: you have to assing another external number range for that document type (transaction DC10). For example, number range A0000000000000000000 to ZZZZZZZZZZZZZZZZZZZZ worked. I dont have any leading zeroes for that in CV03n, CV04N etc. for document 11, 123 and so on. However I can still see leading zeroes in the draw table. Handle those with a proper function module (conversion exit) in programs. Maybe someone else will know how to avoid leading zeroes directly in table.

Former Member
0 Kudos

Hi Peter,

Thanks,

My requirement is to store the document number without zeros in DRAW table..

The best is conersion routines as you said.. Will check this..

Regards,

Aby

Former Member
0 Kudos

Wanted to confim if your ABAPer did explore using the function module

CONVERSION_EXIT_ALPHA_OUTPUT to delete the leading zeros in the Document No field?

Warm regards,

Pradeepkumar Haragoldavar