Quantity Conversion Function Module

Hi,
I am using BW7.0's feature - Quantity Conversion (TCode: RSUOM).
I could use it for converting quantity for different unit on the fly during report time.
Now, I would like to do convert during data upload. Is there any function module that can help?
Please note that the quantity conversion factor is "Material dependent".
Thanks in advance.
Best Regards,
Chris

Hi,.
1) In the BEx Tab page of
Characteristic 0MATERIAL, maintained the field "Base Unit of Measure" as 0BASE_UOM .
2) In the BEx Tab page of
Characteristic 0MATERIAL, maintained the field "Unit of Measure for Char." by click on the New button, it will generate a DataStore Object, which will store information for calculating the conversion factor.
3) Fill in the DataStore generated with data, using the DataSource 0MAT_UNIT_ATTR.
Note that we must NOT use the the former infosource technique and update rules for loading data to it. Use transformation and DTP, else the SID could not be loaded to it.
(I stuck with this problem before..:))
4) Create a Quantity Conversion Type through TCode RSUOM, the Conversion factor can choose 1,3 or 4, with reference to 0MATERIAL InfoObject.
5) Then in any query of cube with 0MATERIAL in it, the quantity conversion type defined in step 4 could be use for displaying data in other UOM~
Hareesh

Similar Messages

  • Conversion function module

    Hello Friends,
              When ever i down load into excel file the filed 'WERKS' is becoming from '0780' to 780 and when i try to upload i am getting as 780 which is creating  some problems. Is there any conversion function module to convert the the field WERKS from 780 to 0780.
    Thanks in advance.
    Siva Kumar.

    Hi
    When you are using FM 'GUI_DOWNLOAD' to download to excel file, you need to populate the parameter FILE TYPE with DBF.
    call function 'GUI_DOWNLOAD'
    exporting
    filename = p_file
    <b>filetype = 'DBF'</b>
    Thanks
    Vijay
    PLZ reward points if helpful

  • Date Conversion Function Modules YYYYMMDD to MM/DD/YYYY

    Hi,
    I have a requirement to Conver the Dats from format: YYYYMMDD into the Format : MM/DD/YYYY. Can you  please suggest me a suitabble Standard Function Module if exists? If not please suggest me a solution for this data conversion.
    Thanks,
    Rajan.SA

    Hi,
    You can use WRITE FORMATING.
    Here the sample code:
    DATA: BEGDA       TYPE TEXT10,
          ENDDA       TYPE SY-DATUM.
      WRITE SY-DATUM TO BEGDA MM/DD/YYYY.
      WRITE SY-DATUM TO ENDDA MM/DD/YYYY.
    And of course you can use other format, like:
    ... DD/MM/YY
    ... MM/DD/YY
    ... DD/MM/YYYY
    ... MM/DD/YYYY
    ... DDMMYY
    ... MMDDYY
    ... YYMMDD
    Or you can use concatenate statement:
        concatenate SY-DATUM+4(2) SY-DATUM+6(2)
        SY-DATUM(4) INTO BEGDA separated by '/'.
    Regards,

  • Conversion Function module for Volume

    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.

    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

  • Unit conversion  function module

    Hi,
    Can anyone give me the details of this function module
    Function Module name: MENGE_UMRECHNEN.
    its urgent.
    Thanks in advance.
    vaibhav

    Hi Vaibhav,
    This function module gives you the provision of conversion of quantities from Base Unit of Measure to any of the Alternative Unit of Measures or vice-versa.
    But this function would be done only for the materials and its limitation would be determined by the data maintained for a material in T006 table.
    Using this FM you can convert a material quantitity of unit 'X' to unit 'Y' only if 'X' and 'Y' are of the same dimension.
    <b>Reward points if this helps,
    Kiran</b>

  • Currency conversion function module

    hi all,
    i want to change the currency to GBP so i need help regarding which standard sap function module will support for my solution.
    can any one help me out, thanks in advance.

    You can use
    <b>CONVERT_TO_LOCAL_CURRENCY</b>
    <b>SAP Documentation for the same is as follow :-</b>
    Translate foreign currency amount to local currency
    An amount in local currency is calculated from a specified foreign currency amount. For this, you may either specify the translation rate manually (Parameter RATE) or have the system determine it from table TCURR on the basis of the rate type, date and currency key. Because the ratios for the units of the currencies involved in the translation are significant for this translation, table TCURF is always read by the program, and there must be a valid entry there for the data specified. IF exchange rate fixing is defined for the exchange rate type TYPE_OF_RATE or an alternative exchange rate is defined for the currency pair, this information is transferred to the calling program.
    When table TCURR is read, the foreign currency key is always taken as the first part of the key and the local currency as the second part.
    Sample call-up:
      CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
        EXPORTING   DATE             = BKPF-WWERT
                    FOREIGN_CURRENCY = BKPF-WAERS
                    LOCAL_CURRENCY   = T001-WAERS
                    FOREIGN_AMOUNT   = BSEG-WRBTR
                     RATE             = BKPF-KURSF
                    TYPE_OF_RATE     = 'M'
        IMPORTING   EXCHANGE_RATE    = KURS
                     LOCAL_AMOUNT     = BSEG-DMBTR
                    FOREIGN_FACTOR   = FAKTOR-F
                     LOCAL_FACTOR     = FAKTOR-L
                     FIXED_RATE       = FIXKURS
        EXCEPTIONS  NO_RATE_FOUND    = 4
                    NO_FACTORS_FOUND = 8.
    Hope this helps you..
    Enjoy SAP.
    Pankaj Singh

  • Timestamp Conversion Function Module

    Hi all,
    >>We are bringing time stamp value (like 20072404161312) from CRM ,we need to convert into date & time. I need function module which one does this...
    >>We are are storing the time duration in min format (its key figure). I need to populate in reports as HR:MN:SS , How we can do this? Is there any function module is available for this?
    Thanks in Advance

    Hello Arun,
    The timestamp is in the format <date><time>. In your example (20072404161312), the date is 20072404 and time is 161312. You can transfer the timestamp into a string and then split the data. You can use the following ABAP code to separate the date from the time:
    * w_ts is your timestamp, w_s is the temporary string
    *w_date and w_time will be your final date and time.
    data: w_ts type timestamp.
    data: w_s type string.
    data: w_date type sy-datum,
          w_time type sy-uzeit.
    w_ts = '20072404161312'.
    * Here is the code you need:
    w_s = w_ts.
    w_date = w_s(8).
    w_time = w_s+8(6).
    Hope this helps.
    Hope this helps.

  • Profit center conversion Function Module

    Hi,
    Is there Any Function Module to  Convert Profit Center from 4 digit into 10 digit.
    Regards,
    Dhanush.S.T

    Try using FM CONVERSION_EXIT_ALPHA_INPUT.
    data: lv_prctr type prctr value '1234'.
    CALL 'CONVERSION_EXIT_ALPHA_INPUT'
      exporting input = lv_prctr
      importing output = lv_prctr.
    "After this call lv_prctr will have values '0000001234'.
    Hope this helps.
    Thanks,
    Balaji

  • Quantity conversion error

    Hi,
    In me21n transaction , I am trying to create an purchase order for a specific material. But I get an error saying ''Quantity conversion error in net price calculation'' . I have checked the quantity conversion for that material but it seem to be right. Do anybody have any solution for this?
    Regards,
    Bhagyashree

    Hi Andy,
    Check the below document which helps u...
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/g-i/how%20to%20report%20data%20in%20alternate%20units%20of%20measure
    Also check these threads:
    /thread/366900 [original link is broken]
    Quantity Conversion Function Module
    Unit of measure
    Hope these helps u...
    Regards,
    KK.

  • Quantity Conversion

    Hi!
    I would like to use the Quantity Conversion function (RSUOM) to convert Sales Quantity in base unit (0QUANT_B) from datasource 2LIS_11_VAITM, to a quantity in other Unit of measure with reference to the material?
    I just know that the infoobject 0MAT_UNIT can help, but I have no idea in how to do so.
    Here is some sample data:
    Sales: Material A 10PC
    Conversion: 100PC = 160 M2 (Square meter)
    Expect to show in report: Material A 16 M2.
    Could anyone here please kindly told me the detail steps in doing it?
    Thank You very much!!
    Best Regards,
    Chris

    Dear Chris,
    I need some help from you, I have gone through your Link in SDN.
    I want to convert all the material in to MT ( Metric Tons ) , I try to convert in BEx ( Report Level ) I have followed all the Steps what you have mentioned I this LINK.
    Quantity Conversion
    This is My Thread , I have posted in SDN but …
    /thread/529862 [original link is broken]
    I think you have solved this Quantity Conversion Issue ….
    I highly appreciate , if you could send any screen shorts to me.
    My Id: [email protected]  or  [email protected]
    Pls go through my link I have wrote step-by-step what I have done.
    Thanks & Regards,
    SHAIK

  • Function Module using Quantity conversion type

    Hi,
    I need to know the function module which uses the quantity conversion type created in RSUOM and should provide the converted value as the result.
    I know the function module which convert the units based on the input. But need to know the FM which uses conversion type.
    I tried conversion type available in the transformation rules. But it is not working for a particular case. So thought of doing the same inside a routine.
    Awaiting for your reply
    Thanks!

    Try this and check
    select vbakvbeln vbapposnr vbakvkorg vbakvtweg vbak~spart
    vbakvkgrp vbakvkbur vbapmatnr vbapmatkl vbap~zieme
    into CORRESPONDING FIELDS OF table it_data
    from vbak
    inner join vbap on vbapvbeln eq vbakvbeln
    where vbak-vbeln eq vbeln.
    Regards,
    Atish

  • Function modules for unit conversion

    hai gurus.
    what is the function module to make one qty to the same unit as other qty.
    if one is in kg and other in pounds
    i want to make both in pounds.
    pls help me with this

    Hi
    chk UNIT_CONVERSION_SAMPLE
    also chk this
    CF_UT_UNIT_CONVERSION
    Some Insights-
    Unit conversions
    with NW2004s the HOW-TO GUIDE for qty conversion is obsolete.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/27/b65c42b4e05542e10000000a1550b0/content.htm
    As of SAP NetWeaver 2004s you can create quantity conversion types using transaction RSUOM.
    The business transaction rules of the conversion are established in the quantity conversion type. The conversion type is a combination of different parameters (conversion factors, source and target units of measure) that determine how the
    conversion is performed.
    In terms of functionality, quantity conversion is structured similarly to currency translation.
    Quantity conversion allows you to convert key figures with units that have different units of measure in the source system into a uniform unit of measure in the BI system when you update them into InfoCubes
    http://help.sap.com/saphelp_nw04s/helpdata/en/27/b38c4284a8c353e10000000a1550b0/content.htm
    It is entered in ODS table linked to info object (0material)
    What you need to do basically is-
    1 ) Goto your infoobject for eg- 0material
    2 ) In Info object Maintenance- Tab page- Bex Explorer
    3 ) Enter 0BASE_UOM in Base unit of measure
    4 ) Generate UOM ODS (System generates it with prefix UOM)
    It is made of 4 fields (1 more in case of compounding) with SID for them. This is the place where you enter numerator and
    denominator to calculate conversion factor
    5 ) Load the UOM ODS with conversion from 0MAT_UNIT_ATTR or flat file
    6 ) Define conversion type
    7 ) In the conversion type, then you can select 0Material in the dynamic determination of conversion factor
    8 ) Select source unit and target unit
    For more help refer SAP help file on NW2004s. It is comprehensive and even explain - How to do unit conversion in
    transformation rule?
    http://help.sap.com/saphelp_nw04s/helpdata/en/4f/707242df019c60e10000000a1550b0/content.htm
    Check this sample code,
      CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
        EXPORTING
    *     CLIENT                  = SY-MANDT
          DATE                    = pdate
          FOREIGN_AMOUNT          = p_amt1
          FOREIGN_CURRENCY        = p_curr1
          LOCAL_CURRENCY          = p_curr2
    *     RATE                    = 0
    *     TYPE_OF_RATE            = 'M'
    *     READ_TCURR              = 'X'
        IMPORTING
          EXCHANGE_RATE           = w_rate
          FOREIGN_FACTOR          = w_fact1
          LOCAL_AMOUNT            = w_amt
          LOCAL_FACTOR            = w_fact2
    *     EXCHANGE_RATEX          =
    *     FIXED_RATE              =
    *     DERIVED_RATE_TYPE       =
        EXCEPTIONS
          NO_RATE_FOUND           = 1
          OVERFLOW                = 2
          NO_FACTORS_FOUND        = 3
          NO_SPREAD_FOUND         = 4
          DERIVED_2_TIMES         = 5
          OTHERS                  = 6.
      IF SY-SUBRC <> 0.
        write: / 'Conversion to loc.curr. failed:',
                 p_curr1, '->', p_curr2, 'err.code=', sy-subrc.
      ELSE.
        write: / 'to Loc.curr:', p_amt1 currency p_curr1, p_curr1, '->',
               w_amt currency p_curr2, p_curr2,
               '(', w_rate, ')', w_fact1, w_fact2.
      ENDIF.
    http://www.geocities.com/victorav15/sapr3/examples/currconv.txt
    Check this
    CONVERSION_FACTOR_GET
    Measurement unit conversion: Get measurement unit conversion factor Not for Dimensionless Units of Measure
    UNIT_CONVERSION_SIMPLE Measurement unit conversion by table T006, with rounding
    UNIT_OF_MEASURE_SAP_TO_ISO 
    UNIT_OF_MEASURE_ISO_TO_SAP
    MATERIAL_UNIT_CONVERSION Material quantity conversion from Base Unit of Measure to Alternative Unit of Measure and vice versa. For Dimensionless Units of Measure (Each, Piece, Box etc.) conversion depends on the given Material (see table MARM). For other Units of Measure (Length, Weigth etc.) conversion can be calculated from the T006 table or via CONVERSION_FACTOR_GET.
    CONVERSION_EXIT_CUNIT_INPUT Conversion exit for commercial (3-char) measurement unit INPUT
    CONVERSION_EXIT_CUNIT_OUTPUT Conversion exit for commercial (3-char) measurement unit OUTPUT
    CONVERSION_EXIT_LUNIT_INPUT Conversion exit for technical (6-char) measurement unit INPUT
    CONVERSION_EXIT_LUNIT_OUTPUT Conversion exit for technical (6-char) measurement unit OUTPUT
    UNIT_OF_MEASUREMENT_HELP Input help for measurement units of a predefined dimension
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Reward all helpfull answers
    Regards
    Pavan

  • Function Module for conversion from one UOM to any other UOM

    Hi All,
    I need to convert a quantity value that user inputs in any UOM and want to convert this Quantity to 'KG'  in CRM
    Can any one please tell me any Function Module to do so? 
    NOTE: I need this in CRM
    Thanks and Regards
    Shekhar
    Edited by: shekhar tagra on Jul 26, 2010 4:54 PM
    Edited by: shekhar tagra on Jul 26, 2010 4:55 PM

    Hi ,
    i'm using the conversion function UPX_CRM_CONVERSION_FACTOR in planning layout where there is in column the calendar week.
    So when select one week, the function return 0 instead if i select more than one week, only on the last week, the conversion factor is 0.
    Why this function have this behavior? I would that the conversion factor is the same for all week.
    Thanks.
    Andrea

  • Error with quantity field:Datasource Creation Using Function Module method

    Problem with DATASOURCE Creation using Function Module method :
    I have created a datasource ZSTANDARD_COST_PRICE using Function Module method . The datasource creation is successfull when I remove the quantity field from the Z table . If I dont remove the quantity field from my Z table it gives an error as "Units Field WAERS for field STPRS of datasource ZSTANDARD_COST_PRICE is hidden". I am not able to remove this error . Please someone guide.
    Let me know if my explanation is not clear enough.
    Thanks in advance,
    Neha.
    Z table definition is as below :
    MATNR MATNR CHAR 18 0 Material Number
    BWKEY BWKEY CHAR 4 0 Valuation area
    LFGJA LFGJA NUMC 4 0 Fiscal Year of Current Period
    STPRS STPRS CURR 11 2 Standard Price   " Here the currency field is WAERS and table T001
    PEINH PEINH DEC 5 0 Price Unit
    VJSTP VJSTP CURR 11 2 Standard price in previous year
    VJPEI VJPEI DEC 5 0 Price unit of previous year.
    Edited by: Neha Rathi on Jan 30, 2009 3:03 PM

    Hi,
    You should add it as one of the main fields as you have added other fields and not as the currency fields...that is..it should be part of the data source and you should be able to see it in RSO2...
    Also if added as i said then it will come as new field in the data source...you can either let it be there...or hide it..
    also if you want to populate it then you will have to write the code for this fields as well.
    Thanks
    Ajeet

  • Function Module to calculate Open Contract Quantity

    Hi All,
    Is there a function module to calculate Open Contract Quantity?
    Thanks.

    Hi Ravi,
    Thanks for the reply.
    For this FM, i need to pass the Sales Doc Number. Is there an FM where i can pass the contract number?
    Best regards,
    Sindy

Maybe you are looking for

  • Color Books in Illustrator CS6 (Creative Cloud)

    I have recently purchased a MacBook Pro and I am using Creative Cloud to download my programs. I have downloaded Illustrator CS6, and I am trying to replace the new Pantone + color books with the older versions. I have done this in the past on Window

  • Need help for thread synchronization

    Hi guys, i got some problem with the thread synchronization. actually my code is like, class myClass public static void main() PvsIdentify identifyThread = new PvsIdentify(this); //Child trd 1 PvsPolling pollingThread = new PvsPolling(this); //Child

  • Transferring from my old mac book pro to my new macbook pro

    So I want to transfer my itunes account with my library and playlists from my old macbook pro to my new one. Help??? thanks in advance.

  • Has adobe adopted the compound math feature like quark has in its interface.

    I am currently working with CS3. Has adobe adopted the compound math feature like quark has in its interface. For instance If I want to duplicate an item 29/6" vertically but I know that that step should be 1/8" short, in quark I can type 29/6-.125,

  • Report on ROP in MM

    Hi All, Do we have a report in SAP were in i can see the minimum/maximum control of any Item specifies the point at which an item should be reordered (minimum stocking level) and a reorder quantity ceiling (maximum stocking level)?