01-11-2006 10:12 PM
hi,
Is there any standard function module to do the conversion of VOLUME.
for example : if i have source volume in one unit & i want it in another unit.
regards,
srikanth,Intelligroup.
01-11-2006 10:41 PM
Is this what you want?
FCO_CONVERT_FROM_BASE_UNIT
FCO_CONVERT_TO_BASE_UNIT
01-11-2006 11:10 PM
Hi Srikanth,
Please use Function : MATERIAL_UNIT_CONVERSION( Thru material)
Otherwise :UNIT_CONVERSION_SIMPLE
Need any help , please let me know.
Lanka
Intelligroup.
Message was edited by: Lanka Murthy
01-11-2006 11:19 PM
If it is a straight conversion and you do not need to use the conversion factors tied to a material then you can do something like this.
report zrich_0001.
parameters: p_qtyi type p decimals 2,
p_uomi type t006a-msehi,
p_uomo type t006a-msehi,
p_qtyo type p decimals 2.
at selection-screen.
call function 'UNIT_CONVERSION_SIMPLE'
exporting
input = p_qtyi
* NO_TYPE_CHECK = 'X'
* ROUND_SIGN = ' '
unit_in = p_uomi
unit_out = p_uomo
importing
* ADD_CONST =
* DECIMALS =
* DENOMINATOR =
* NUMERATOR =
output = p_qtyo
* EXCEPTIONS
* CONVERSION_NOT_FOUND = 1
* DIVISION_BY_ZERO = 2
* INPUT_INVALID = 3
* OUTPUT_INVALID = 4
* OVERFLOW = 5
* TYPE_INVALID = 6
* UNITS_MISSING = 7
* UNIT_IN_NOT_FOUND = 8
* UNIT_OUT_NOT_FOUND = 9
* OTHERS = 10
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Regards,
Rich Heilman
01-11-2006 11:37 PM
use fm
POPUP_UNIT_CONVERSION,
value in , give the number,
unit_in - ccm,
unit_out-L.
u can find the various uom from t006 table. for cm cube, u have to use CCM. check the table
01-12-2006 11:05 AM
HI Murthy,
Thanks a lot for your timely response.
yes, the Function module given by you is working for my requirement.
Hi Rich,
thanks for putting total code,how to call the Function module.
Hi chandrasekhar
the function module you mentioned is correct,but that one we cant use in
program as its giving in POPUp. this function module intern calling "UNIT_CONVERSION_SIMPLE"
only.
<b>here i noticed one point to share with you all, when i execute the function module in se37 its giving exception. the same if i call from a program its working.</b>
This is littile bit surprized by this.
Thanks guys, for your help.
regards,
srikanth.
Message was edited by: Srikanth Kidambi Maruthi
Message was edited by: Srikanth Kidambi Maruthi