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

Similar Messages

  • 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>

  • 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

  • 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

  • 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

  • Date conversion logic using function modules

    Hi there,
    I have been researching in the forum how data conversion is done in ABAP and I found out about the function modules
    CONVERSION_EXIT_LDATE_OUTPUT
    and
    MONTH_NAMES_GET
    It seems that the first function module can convert the date format 06/08/2011 to MONTH DD,YYYY and the second function can easily translate the month names once language SPRAS has been specified.
    Problem is I am not sure how I can convert my VBRK-FKDAT with format MM/DD/YYYY into the format DD MONTH YYYY format with the MONTH still dependent on the specified language.
    I tried to look at how to MONTH_NAMES_GET FM works and made this code:
    DATA: d_return like sy-subrc,
          itab_T247 like T247 occurs 0 with header line,
          gs_spras type spras.
    gs_spras = 'RU'.
    CALL FUNCTION 'MONTH_NAMES_GET'
    EXPORTING
       LANGUAGE                    = gs_spras
    IMPORTING
       RETURN_CODE                 = d_return
      TABLES
        MONTH_NAMES                 = itab_T247
    EXCEPTIONS
       MONTH_NAMES_NOT_FOUND       = 1
       OTHERS                      = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Loop at itab_t247.
    Write:/ itab_t247-LTX.
    endloop.
    The code just lists the months in Russian (which is the language I need). I am just new to ABAP so I am an avid reader of the forum. I hope someone can help.
    Thanks,
    dgrachee

    Hi Dgrachee ;
    You can change it as follows.
    Best Regards.
    gs_spras = sy-langu. "'RU'.
    CALL FUNCTION 'MONTH_NAMES_GET'

  • 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 module for conversion in basic unit of measure....

    Hi,
    Can someone give me a function module, which will convert the Unit of measure into basic unit of measure
    Say a a material has 3 CA (Cases) in a PO and the conversion factor(UMREZ in table MARAM) for CA for that material is 4 and converison for MP (Master pack) is 12,then
    3CA =  9 PC = (9/12) MP
    But I want a function module which will do this conversions ?

    Hi,
      Use MD_CONVERT_MATERIAL_UNIT
    Thanks,
    Naren

  • Function Module to retrive conversion exit function module names based on conversion routine

    Hi All,
    Can you people help me out in finding a function module, which takes conversion routine name as input and gives all the conversion exit function modules as output.
    Thanks and Regards,
    Shivaraj Naik.

    Curious, I looked for the way SAP do the job in SE11, and they also use the CONCATENATE option...
    From Include LSD11F01 Form OBJ_GOTO
    *       Objektspezifische Navigationsziele
    *      --> GOTOID   Kennung für Navigationsziele
    *      --> DDNAME   Dictonary-Name
    form obj_goto using  gotoid type gotoid
                         ddname.
      case gotoid.
        when 'CNVE'.   "Konvertierungsexit zu Domäne
          data: wb_request type ref to cl_wb_request.
          data: fb_name like tfdir-funcname
                            value 'CONVERSION_EXIT_'.
          concatenate fb_name ddname '*' into fb_name.
          condense fb_name.
    * Request für Infosystem erzeugen
          class cl_wb_infosystem definition load.
          call method cl_wb_infosystem=>create_request
            exporting
              p_object_type        = 'FF'
              p_object_name        = fb_name
              p_operation          = swbm_c_op_search
              p_suppress_selection = 'X'
              p_show_as_popup      = 'X'
            importing
              p_wb_request         = wb_request
            exceptions
              action_cancelled     = 1
              execute_in_batch     = 2
              error_occured        = 3.
    Regards,
    Raymond

  • Conversion of unit of measure function module.

    Hi All,
    Can you let me know the function module that convert the unit of measure from EACH(EA)to cases(CS). I have the material that unit of measure is in EACH(EA). And i have to dispaly in cases(CS).
    Regards,
    Rakesh Singh

    Hi Rakesh,
    Try this Function Module:
    MD_CONVERT_MATERIAL_UNIT
    Im sending you a sample code also.
    *& Form  f2121_convert_price
    Convert price to Base UoM
         -->P_LV_MEINS  Conversion UoM
         -->P_LV_KBETR  Converted Rate
         -->P_LV_KMEIN  Condition unit
         -->P_LV_MATNR  Material Number
         -->P_LV_KSCHL  Condition Type
    FORM f2121_convert_price USING    p_lv_meins
                                      p_lv_kbetr
                                      p_lv_kmein
                                      p_lv_matnr
                                      p_lv_kschl.
      DATA: lv_imenge LIKE ekpo-menge,
            lv_emenge LIKE ekpo-menge.
      lv_imenge = p_lv_kbetr.
      CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
           EXPORTING
                i_matnr              = p_lv_matnr
                i_in_me              = p_lv_kmein
                i_out_me             = p_lv_meins
                i_menge              = lv_imenge
           IMPORTING
                e_menge              = lv_emenge
           EXCEPTIONS
                error_in_application = 1
                error                = 2
                OTHERS               = 3.
      IF sy-subrc = 0.
        p_lv_kbetr = lv_emenge.
      ELSE.
        CONCATENATE text-009 p_lv_kschl INTO v_err_msg.
      ENDIF.
    ENDFORM.                    " f2121_convert_price
    Hope this helps you.
    Regards,
    Anjali.

  • Delivered Function Module to perform UOM conversions??

    Hi Gurus,
    Is there any SAP delivered function module that I can use to perform any UOM conversions at all. For eg, Gallons to liters etc.
    Appreciate your inputs.
    Thanks,
    Reddy

    Dinesh and Anil,
    Thanks for your inputs. I ended up using UNIT_CONVERSION_SIMPLE. It met my requirement.
    Regards,
    Reddy

Maybe you are looking for