Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Need zeros infront of a number

HI Experts,

I have a 2 Infoobjects

1. EMPNumber Nchar (8)

2. PNumber Char (20)

now my question is i need to include zeros if there is less than 8 characters for the no.1 and 9 characters for No.2

1. 987656 should be 00987656

2. i.e; 98765 should be 000098765

I am getting No.2 from R/3 so i cant even chgange the length of it to 9 characters

Any ideas Please.



Former Member
Former Member replied


imagine you create a routine in the update rules to a object called zperson. In the routine you need to enter the following code:


exporting input = comm_structure-zperson

importing output = result.

Hope this helps!



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question