08-01-2007 9:42 AM
hi all,
i am using subroutine where V_UNITPRICE = 4.67 (of type BSEG-WRBTR). Now when i assign it to a char say OUTTAB-VALUE = V_UNITPRICE where OUTTAB-VALUE is of type char255.
the value is not assing to OUTTAB-VALUE .
kindly do the needful.
is there any function module?
points will be rewarded
thank in advance
08-01-2007 9:48 AM
Hi jaysree,
1. use <b>CONDENSE OUTTAB-VALUE</b> .
2. The value is there, but it is on the RIGHT most side,
and since it is 255 in length, it does not show on screen.
3. just copy paste.
REPORT YAM_TEMP04.
data : v_unitprice type bseg-wrbtr.
V_UNITPRICE = '4.67' .
data : s type char255.
s = v_unitprice.
condense s.
break-point.
regards,
amit m.
08-01-2007 9:45 AM
HI..,
It will definitely work..
Can u post ur actual code here !!!!
regrads,
sai ramesh
08-01-2007 9:48 AM
Hi jaysree,
1. use <b>CONDENSE OUTTAB-VALUE</b> .
2. The value is there, but it is on the RIGHT most side,
and since it is 255 in length, it does not show on screen.
3. just copy paste.
REPORT YAM_TEMP04.
data : v_unitprice type bseg-wrbtr.
V_UNITPRICE = '4.67' .
data : s type char255.
s = v_unitprice.
condense s.
break-point.
regards,
amit m.
08-01-2007 9:50 AM
Hi..
Try this ...
<b>Write V_UNITPRICE TO OUTTAB-VALUE left-justified.</b>
This will work..
<b>Reward if Helpful</b>
08-01-2007 9:52 AM
Hi,
You can use the FM HRCM_AMOUNT_TO_STRING_CONVERT to convert it from amount to string format.
Regards
08-01-2007 10:18 AM
Hi,
Your code will work fine, but the only thing is the value 4.67 will be stored at the extreme right of the variable OUTTAB-VALUE and the value of the vaiable will get printed only if the LINE-SIZE of the report is GE 255.
You can verify this by placing break point after the value assigment statement, and checking the variable using offset : OUTTAB-VALUE+230(25).
If you want to remove the leading BLANK spaces, you can use the following statement.
CONDENSE : OUTTAB-VALUE(removes the leading BLANK spaces).
Regards,
Dilli