on 11-15-2010 8:19 AM
Hello,
X is defined as type QUAN with 3 decimals. I don't want show the decimal part . How to do it ?
Tks.
Hi
It's valid the same formatting rules of sapscript:
&NUM(.Z)&
Z indicates the decimal places, so if you don't need it: &NUM(.0)&
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes
I did that , but still it is same. 1,000 is printed as 1,000 instead of 1.
GS_FKIMG is of type BDMNG
GS_ITEM-FKIMG is of type FKIMG of type QUAN (13,3)
In %CODE program lines for Element I am using
GS_FKIMG = GS_ITEM-FKIMG.
I am printing &GS_FKIMG(.0)& but not working
I also tried using &GS_FKIMG(C.0)& but in vain.
could you guide if I am writing program lines wrong or at wrong place.
Hi,
Try like this
V_INT = TRUNC(V_VALUE).
V_DEC = FRAC(V_VALUE).
IF V_DEC = 0.
CLEAR V_VALUE
V_VALUE = V_INT.
ENDIF.
WRITE: V_VALUE.
Regards
GK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Change the Data Element to CHAR.. it will not have any decimal places.. so your output will be without Decimal places.
In SMARTFORM, under "Global Definitions" under "Global Data" tab Against the Variable name main any CHAR data Type (ex. MATNR... thiis will have lenth of 18 without decimal) in the field Associated Type.
Regards
GK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check these options while displaying the data in smartform.
&field(.<nat.number>)& Limits output of decimal places to <nat.number>
X(3.0) which will display as 123 instead of 123,500/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.