on 06-05-2007 9:41 AM
Hi,
I facing a formatting problem in total fields.
if the value is100000.25 it is printing this as <b>10.000,25</b>
I want to print this as 10,000.25.
Plz Note: any default setting of decimal in SU01 does not help this.
Points guaranteed.
Regd,.
Anid
Hi Anid,
Call a routine in the smartform passing the field name and value.
EG:
PERFORM GET_UNIT_PRICE IN PROGRAM ZSROINVOICE
USING &KOMVD-KWERT(T)&
USING &FKLMG(T)&
CHANGING &PRICE_P_U&
ENDPERFORM
FORM get_unit_price TABLES i_intpar STRUCTURE itcsy
i_outpar STRUCTURE itcsy.
DATA : ws_price TYPE p DECIMALS 2,
ws_fkimg TYPE p DECIMALS 2,
ws_netwr TYPE p DECIMALS 2,
ws_c_netwr(20) ,
ws_c_fkimg(20) ,
ws_c_price(15) .
REFRESH i_outpar.
CLEAR i_outpar.
READ TABLE i_intpar WITH KEY name = 'KOMVD-KWERT'.
CHECK sy-subrc EQ 0.
ws_c_netwr = i_intpar-value.
READ TABLE i_intpar WITH KEY name = 'FKLMG'.
CHECK sy-subrc EQ 0.
ws_c_fkimg = i_intpar-value.
TRANSLATE ws_c_netwr USING '. '.
TRANSLATE ws_c_netwr USING ',.'.
TRANSLATE ws_c_fkimg USING '. '.
TRANSLATE ws_c_fkimg USING ',.'.
CONDENSE ws_c_netwr NO-GAPS.
CONDENSE ws_c_fkimg NO-GAPS.
MOVE: ws_c_fkimg TO ws_fkimg,
ws_c_netwr TO ws_netwr.
IF NOT ws_fkimg IS INITIAL.
ws_price = ( ws_netwr / ws_fkimg ).
ENDIF.
WRITE ws_price TO ws_c_price.
i_outpar-name = 'PRICE_P_U'.
i_outpar-value = ws_c_price.
APPEND i_outpar.
CLEAR i_outpar.
ENDFORM.
This routine is used calculate the unit price based on totla amount and no of delivered pieces.
This will surely help u.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this,
variable type c.
Move your value into variable.
*SPLIT variable at DECIMAL.
REPLACE '.' WITH ',' INTO variable
CONCATENATE var1 '.' var2 into var3.
Reward points if useful.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
ry this.
parameters : val(30) type c.
data : final(30) type c,
cnt type i,
v type c,
n type i.
cnt = strlen( val ).
do cnt times.
move val+n(1) to v.
if v ca '.0123456789'. "Bring in the values
move v to final+n(1).
endif.
n = n + 1.
enddo.
condense final no-gaps.
write:/ final
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi anid,
just go to T.code <b>su3</b> ,
there u can find <b>Defaults</b> tab,
under the decimal Notation u can change the format,
save.
regards,
seshu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The decimal format can also be set by the SET COUNTRY command which uses the values stored in table T005X for the country.
Check to see what the settings are for the country of the Customer/Vendor you are processing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
You need to change this the Type to P so it will print the correct value, if this is not printing the correct value then Multiply the result value with 1000 then you will get the correct value
Regards
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.