2007 Jul 10 10:56 AM
hi i need the<b> fm name</b> which will add leading zeroes to anu non numeric input
say
input is <b>ABC</b>
SO MY OUTPUT SHOULD BE
<b>000000000000ABC</b>
URGENT
NEED A FUNCTIOJN MODULE NAME
2007 Jul 10 10:59 AM
Hi,
try this,
data : temp(15) value 'ABC'.
CONCATENATE ' 000000000000' INTO temp.
Write : temp.
thanks.
2007 Jul 10 11:00 AM
check....
data:c1 type c,
c2 type n,
c3 type c.
c2 = c1.
c3 = c2.
write: c3
2007 Jul 10 11:01 AM
Hi,
I think you have to take it into Numeric Field -> Convert it using CONVERSION_EXIT_ALPHA_OUTPUT/INPUT -> Convert to Char.
Reward if useful!
2007 Jul 10 11:01 AM
Hi,
use the FM CONVERSION_EXIT_ALPHA_INPUT to get leading zeroes for the variable..
<b>Reward points</b>
Regards
2007 Jul 10 11:01 AM
2007 Jul 10 11:21 AM
Hi,
Try using FM CONVERSION_EXIT_ALPHA_INPUT
call function CONVERSION_EXIT_ALPHA_INPUT
exporting
<your variable>
importing
<your variable>.
2007 Jul 10 11:02 AM
i think no fn module is there for non numeric values to add zero do like this..
data : text(20) value 'ABC',
len type i.
compute len = strlen( text ).
len = 20 - len.
do len times.
concatenate '0' text into text.
enddo.
write : / text.
regards
shiba dutta
2007 Jul 10 11:03 AM
data: str type n.
data: val type n.
str = 'ABC'.
val = strlen( str )
while val < 10.
concatenate '0' 'str' into str.
val = val + 1.
endwhile.
write: str.
i guess this may help u
2007 Jul 10 11:28 AM
shift txt right deleting trailing space.
overlay txt with '000000000000000000'.