‎2007 Feb 22 7:30 AM
Hi Experts,
in MBEW there is field STPRS type CURR size is 11 and decimals is 2 whose value is suppose 10.00
Now i want to populate this value into a data object D1 which is of type C and size is 10.
My question i want the output as 0000010.00 i.e. spaces shld be added with leading zero's. how this can b achieved. I tried like this.
DATA: lv_stprs(10) type p decimals 2,
D1(10) type c.
lv_stprs = w_mbew-stprs. "where gs_mbew-stprs contains value 10.00
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_stprs
IMPORTING
OUTPUT = D1
.
its giving some runtime error.
plz help me
Thanks in advance.
‎2007 Feb 22 7:51 AM
DATA: lv_stprs(10) type n,
D1(10) type c.
lv_stprs = w_mbew-stprs. "where gs_mbew-stprs contains value 10.00
‎2007 Feb 22 7:51 AM
DATA: lv_stprs(10) type n,
D1(10) type c.
lv_stprs = w_mbew-stprs. "where gs_mbew-stprs contains value 10.00
‎2007 Feb 22 8:23 AM
‎2007 Feb 22 8:32 AM
DATA: lv_stprs(10) type n,
D1(10) type c.
lv_stprs = w_mbew-stprs.
concatenate lv_stprs+3(10) '.' '00' into D1.
‎2007 Feb 22 8:54 AM
Hi
DATA: X TYPE P DECIMALS 3 VALUE '1.267',
Y TYPE F VALUE '125.456E2'.
WRITE: /X DECIMALS 0, "output: 1
/X DECIMALS 2, "output: 1.27
Similarly
DATA: v_waers LIKE tcurr-waers VALUE 'USD'.
USD for three decimals.
WRITE x currency v_waers.
‎2007 Feb 22 8:13 AM
Hi,
declare DATA: lv_stprs type STPRS.
sometimes if the length is exceeded then it will give the error.
Regards
Shiva
‎2007 Feb 22 8:19 AM
Abdul,
DATA: lv_stprs(10),
d1(10) .
lv_stprs = 10.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_stprs
IMPORTING
OUTPUT = D1.
concatenate d1+3(7) '.00' into D1.
Now it will work .
Pls. mark if useful