‎2007 Jun 06 2:15 PM
Hi,
I am looking for conversion exit to convert menge (Quantity) from 80.000 to
0000000080.000.
regards
arun
‎2007 Jun 06 2:21 PM
Hello,
Chekc this sample.
PARAMETERS: P_MENGE LIKE EKPO-MENGE.
DATA: LV_MENGE(20).
WRITE P_MENGE TO LV_MENGE.
SHIFT LV_MENGE RIGHT.
TRANSLATE LV_MENGE USING ' 0'.
WRITE: LV_MENGE.
Regards,
Vasanth
‎2007 Jun 06 2:21 PM
Hello,
Chekc this sample.
PARAMETERS: P_MENGE LIKE EKPO-MENGE.
DATA: LV_MENGE(20).
WRITE P_MENGE TO LV_MENGE.
SHIFT LV_MENGE RIGHT.
TRANSLATE LV_MENGE USING ' 0'.
WRITE: LV_MENGE.
Regards,
Vasanth
‎2007 Jun 06 2:29 PM
Check this as well.
In my opinion there is no conversion exit on menge .
We need to deal with this explicitly .
Execute the code .
DATA : brgew LIKE mara-brgew.
brgew = '12.063'.
DATA:val(18) TYPE c,
in(13) TYPE n , " u can set ur desired length here
dec(6) TYPE c,
a TYPE i.
a = trunc( brgew ).
in = a.
dec = frac( brgew ).
CONCATENATE in dec+1(4) INTO val .
WRITE:/ val.@vasanth
After longtime nice to see you back .
Regards,
Vijay
‎2007 Jun 06 2:34 PM
Hi arun,
split lv_qty at '.' into lv_qty13
lv_qty3.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = lV_qty13
IMPORTING
OUTPUT = lV_qty13.
concatenate lv_qty13 lv_qty3 into lv_qty
separated by '.'.Finally lv_qty will have your required value. plz use the above code. If your problem is solved reward points. don't forget.
Thanks,
Suma.
‎2007 Jun 06 2:45 PM
I think we cannot move the decimal to this .
DATA : brgew LIKE mara-brgew. " std reference
concatenate '000123' '000' into brgew separated by '.'.vijay.