Skip to Content

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

need a function module can get rid of the "0" before a "char" or "NUM"

Hi,

Do someone know a function module can get rid of the meaningless "0" before a "char" or "NUM"?

like:

if the char or num is like "000000hello"

i need it change into "hello"

Please help me out.

thanks in advance.

Message was edited by:

ke tang

Former Member
Former Member replied

Hi Tang,

Try this.

DATA : CHAR(10) VALUE '000000123'.

TRANSLATE CHAR USING '0 '.

CONDENSE CHAR.

WRITE : CHAR.

or

data:num(5) type n,char(5) type c.

num = 120.

write num to char no-zero.

write: num,char.

Reward if Useful.,

Regards,

Chitra

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