‎2007 Aug 17 12:30 PM
Hi,
I have one varible which having 13th in length and type is char. I am using this varible to store amount.Now i am storing this amount in right justifield.Now i have to replace my space before amount with '0'.
Ex.
Input : ________15000,00
output: 000000001500.00
Please help me it's argent.
‎2007 Aug 17 12:32 PM
kya guru bhai...simple hai na
just take it as a text it will get converted man...
no problem ok
‎2007 Aug 17 12:31 PM
Hi,
Use 'REPLACE ' statement to replace all the spaces with ZERO.
Cheers,
Simha.
‎2007 Aug 17 12:32 PM
kya guru bhai...simple hai na
just take it as a text it will get converted man...
no problem ok
‎2007 Aug 17 12:33 PM
Hi
Use the conversion exit CONVERSION_EXIT_ALHPA_INPUT.
it will append the zeroes.
Regards
Preeti
‎2007 Aug 17 12:36 PM
for this take the type as any currency field instead of char and also while outputting with write statement use currency addition.
<b>Rewards points if help full</b>
‎2007 Aug 17 12:38 PM
Hi,
Try the follwoing:
use replace statement.
OR do the follwoing
e.g.:
DATA: var1(12) type c,
var2(2) type c,
var3(15) type c,
amount type netwr.
constants: dot(1) type c value '.'.
Split amount at ',' into var1 var2.
Now use the conversion exit:
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = var1
IMPORTING
OUTPUT =var1.
Now concatenate the variables var1 & var2.
concatenate var1 dot var2 into var3.
Now the var3 will be having the value like 000000015000.00.
Reward points if helpful answer.
Ashvender.