Converting the units of a weight field

Hi,
I want to convert weight field's units   into KG. i want to add the all weights but i want to convert it into KG before. as it may contain the units other than KG. plz tell me its veryvery urgent.
i think u understood..
weight( (VBRP-BRGEW)
units (VBRP-GEWEI)
Kumar

this  sample  code   must   help  u ....
*&      Form  z_unit_conversion_kg
This form is used to convert weight unit in 'LB'
-->  p1        text
<--  p2        text
FORM Z_UNIT_CONVERSION_LB.
  I_LN_ITEMS-BRGEW_KG = I_LN_ITEMS-BRGEW.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-BRGEW
            UNIT_IN  = C_KG
            UNIT_OUT = C_LB
       IMPORTING
            OUTPUT   = I_LN_ITEMS-BRGEW_LB.
I_LN_ITEMS-NTGEW_KG = I_LN_ITEMS-NTGEW.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-NTGEW
            UNIT_IN  = C_KG
            UNIT_OUT = C_LB
       IMPORTING
            OUTPUT   = I_LN_ITEMS-NTGEW_LB.
  MODIFY I_LN_ITEMS TRANSPORTING NTGEW_KG NTGEW_LB.
ENDFORM.                               " z_unit_conversion_lb
*&      Form  z_unit_conversion_lb
This form is used to convert weight unit in 'KG'
-->  p1        text
<--  p2        text
FORM Z_UNIT_CONVERSION_KG.
  I_LN_ITEMS-BRGEW_LB = I_LN_ITEMS-BRGEW.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-BRGEW
            UNIT_IN  = C_LB
            UNIT_OUT = C_KG
       IMPORTING
            OUTPUT   = I_LN_ITEMS-BRGEW_KG.
  MODIFY I_LN_ITEMS TRANSPORTING BRGEW_LB BRGEW_KG.
I_LN_ITEMS-NTGEW_LB = I_LN_ITEMS-NTGEW.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-NTGEW
            UNIT_IN  = C_LB
            UNIT_OUT = C_KG
       IMPORTING
            OUTPUT   = I_LN_ITEMS-NTGEW_KG.
  MODIFY I_LN_ITEMS TRANSPORTING NTGEW_LB NTGEW_KG.
ENDFORM.                               " z_unit_conversion_kg
*&      Form  z_unit_conversion_kg_lb
This form is used to convert weight unit in 'KG' and 'LB'
-->  p1        text
<--  p2        text
FORM Z_UNIT_CONVERSION_KG_LB.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-BRGEW
            UNIT_IN  = I_LN_ITEMS-GEWEI
            UNIT_OUT = C_KG
       IMPORTING
            OUTPUT   = I_LN_ITEMS-BRGEW_KG.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-BRGEW_KG
            UNIT_IN  = C_KG
            UNIT_OUT = C_LB
       IMPORTING
            OUTPUT   = I_LN_ITEMS-BRGEW_LB.
  MODIFY I_LN_ITEMS TRANSPORTING BRGEW_KG BRGEW_LB.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-NTGEW
            UNIT_IN  = I_LN_ITEMS-GEWEI
            UNIT_OUT = C_KG
       IMPORTING
            OUTPUT   = I_LN_ITEMS-NTGEW_KG.
  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
       EXPORTING
            INPUT    = I_LN_ITEMS-NTGEW_KG
            UNIT_IN  = C_KG
            UNIT_OUT = C_LB
       IMPORTING
            OUTPUT   = I_LN_ITEMS-NTGEW_LB.
  MODIFY I_LN_ITEMS TRANSPORTING NTGEW_KG NTGEW_LB.
ENDFORM.                               " z_unit_conversion_kg_lb

Similar Messages

  • I want to know the function moulde used to convert the unit of measure

    The whole process should be done in the Portugues login language.
    For the login language PT( Portuguese). In table MARA, if i choose the menu settings-> use parameters-> and chek this field (conversion field exit) . Then for any material if i check the unit of measure (MEINS), is display of all the material its shows differently, but if i select one material and see all the fields of that material, the MEINS field is changed. For example when all the materials are show the MEINS is ST. but when i select one material and display it . it shows PEC in portugues language.
    I want to know the function moulde used to convert the unit of measure

    HI,
    There exits the conversion routine for that particular field in its domain level..
    copy that conversion routine and search for that in SE37 your conversion routine
    you will find the function module this gives you the internal and external formats
    Fms are listed below for MEINS
    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
    For convertiung quantity into base unit of measure you can do this way
    CALL FUNCTION 'ME_CONVERSION_MEINS'                       "#EC *
        EXPORTING
          i_matnr             = "give material number"
          i_mein1             = "Unit of measurement "
          i_meins             = "base unit of measure
          i_menge             = "quantity
        IMPORTING
          menge               = "quantioty in your required measurement
        EXCEPTIONS
          error_in_conversion       = 1
          no_success                = 2
          OTHERS                    = 3.
    HOpe this helps you
    Reward if useful
    regards,
    nazeer
    Message was edited by:
            nazeer shaik

  • Need to convert the binary data in blob field to readable format

    Hi,
    We need to convert the Binary data in the BLOB field to readable format and need to display it in Oracle Apps Environment,does anybody come across the similar requirement.
    please advise, thanks in advance.
    Regards,
    Babu.

    You could use standard Attachments functionality here ... if the blob is not in FND_LOBS, insert into FND_LOBS, fnd_attached_documents etc to enable viewing via "Attachments" to the entity the blob is related to.
    Gareth

  • How can i convert the quantity of one unit to other unit in BI 7?

    Hi ,
    I have developed an RFC function module in SAP BW (BI 7.0).
    For this function module I have to populate material  number and  Quantity required and UNIT.Every thing working good. If the user forgets to enter unit  or enters other unit  where Quantity in ODS is not mentioned in terms of that unit.WE have to Convert the Quantity requested into the Qunantity that exist in ODS or DATA BASE  based on the unit of measure .
    Please suggest me how can I convert the UNIT of measure of quantity?
    Thanks,
    Suresh.

    I have to do this with conversion table /BIO/PMAT_UNIT.
    IN THIS TABLE I DON'T KNOW HOW CAN I CONVERT?
    REGARDS,
    SURESH.

  • How can i convert the HTML information in XML form to a PDF?

    Hi does any body know how can i convert the content of an HTML field in a XML Form in a regular text to include in a PDF in a Java program?

    Hi ,
    On the tool bar you have an option "Browser" which is next to "HTML Editor" .
    You know that for using these elements wo have to map them with Data Schema.
    Step by step
    1. In data Model Under Data Schema Add a child and name it Read_More.
    2. In the left hand corner ,click on tab Type and from the drop down select "rid"
    3.Click on the "Browser" from the toolbar (as told earlier) and drag and drop it on the form.
    4. Drag the Data schema which u have made(Read_more) and drop it on the browser on form. On right hand side u will se the mapping done.
    5.Click on the "Browser" which is there in the form and on the right hand side of the form u will see the property window.
    6.In property window change the value of action property to "Item Entry point"
    7. Repeat step 3 and 4 in Render and show form but using "label" nad not browser.
    Do not forget to add Save button in Edit Form.
    This will solve your problem.
    PS:Rewards Point Please.
    Regards,
    Naveen Gupta

  • Appraidal Weighting field

    Hi Gurus,
    I have received a request from client to make this field not mandatory and change the configuration to allow system to save the appraisal form with weighting field is BLANK.
    I found SAP Note 816717 released in 2005 that will performed a check on this. Is there any way I can pass this checking?
    Thanks
    Khairul

    Hi Khairul,
    I made some search on this note an I'm afraid currently there is no possibility to bypass this check. The only option I suppose there would be to comment out the changes provided with this note but this will then be considered a modification by SAP and thus is not supported.
    Best regards
    Sarah

  • Weight from Handling Unit not copied into outbound delivery weight field.

    Hi,
    We create handling units with hupast and with a weight interface. If we select the HU in the outbound delivery, we need the total weight of all HU displayed in the outbound delivery. This is not happening. The total weight which is shown is the weight of the material master.
    How can we put HU weight in the outbound delivery?
    Thank you,
    Eric van Zundert.

    hi Eric,
    you habe to do this with a user exit.
    In the deliveries, there is only one good userexit at the time save dcoument prepare. -- there is a oss - note for it.
    I copy at every save the sum of the HU-weights in the fields of likp.
    Additionally at time of goods out - boocking, i collect the LIKP-weight upon all positions of the lips, so that the sum of lips-weights will give the likp-weight.
    You need to do this, because in invoice, the weight is taken as sum of the positions and the following processes of export will also take the weight of the invoice-position.
    hans

  • How to convert the text field into currency field

    Hi,
    I have an requirement to converting the text field into currency.
    If I convert directly it gives dump.
    If I convert this to Numeric means it takes the decimals also as whole value.
    Is there any FM to convert the text field into Currency field.
    Please advice me.
    Thanks in advance.

    Hi,
    I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
    But I also need to transfer a string value like '12,99' to a field with type curr.
    Can i Do that manually, or is there another FM?
    I have already checked code with write to or pack/unpack.
    But without success yet.
    Something like this:
    DATA: g_str(11) type c.
    DATA: g_p type p.
    WRITE '12,99' TO g_str CURRENCY 'EUR'.
    is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
    also: PACK g_str to <curr-field or g_p> dumps.
    Help appreciated.
    regards, matthias

  • How do I convert the ASCII character % which is 25h to a hex number. I've tried using the scan value VI but get a zero in the value field.

    How do I convert the ASCII character % ,which is 25h, to a hex number 25h. I've tried using the scan value VI but I get a zero in the value field. 

    You can use String to Byte Array for this.

  • Convert the all the quantity units into one Unit of measure that is 'CSE'.

    Hi all,
    I want to convert the all the quantity units into one Unit of measure that is 'CSE'.
    would anybody tell me what is the FM that converts all the quantity units into one Unit.
    Thanks in advance,
    Mythily

    Hi Mythily,
    You can check the following function module - -
    FCO_CONVERT_FROM_BASE_UNIT
    MD_CONVERT_MATERIAL_UNIT
    MS_CONVERT_UNIT_TO_TIME
    RV_CONDITION_CONVERT_UNITS
    VHUMISC_CONVERT_TO_ALTERN_UNIT
    VHUMISC_CONVERT_TO_BASEUNIT
    WALL_QUANTITY_CONVERT_UNIT
    WALL_QUANTITY_CONVERT_UNIT_RND
    WSTP_CONVERT_UNIT
    Regards
    Pinaki

  • The Unit Converter is ERROR

    The Unit Converter is ERROR with Currency Exchange
    i did send the letter to yahoo, please check it out, man

    no, the problem existed before, a couple of weeks already.
    I just checked again, on my old mac mini, w/ safari 3, same problem.
    I guess the connection to yahoo-finance (i.e. the data the widget gets from Y!) is somehow messed up.

  • How to convert the date in the Parameter from to mm/dd/yyyy when you tab out of field

    Hello,
    Can some one help me out in Oracle Reports 3.0 version i am trying to
    set in the parameter form two date fields to mm/dd/yyyy.
    my questions is can we set the both of the date fields to if the user
    enters as 010202 and Tab out of the field it should automatically
    format to 01/02/2002.
    i know we can do this in forms but in the parameter form when you are
    sending as parameter to the report i am unable to do it.
    try to set date as format mask in properties but doesnt help..
    any body have any idea will be appreciated much..
    thanks in advance.

    Hi!
    Try to use dd/mm/rrrr format mask. I use it in my reports and it works fine for me. My user can enter 010101 in a date field and it is properly recognized as 01/01/2001 by reports.
    Hope it helps.

  • Need to convert the Varchar2 to decimal

    Hi,
    I need to convert source sybase varchar2 record in to decimal record in Target DB2 table by using the function in Oracle data integrator.
    In my source table, column is defined as varchar2 (4) and in target table same column has defined as Decimal (2). So, is there any function to convert the varchar2 data to decimal record.
    thanks,
    keshav.

    Hi SH,
    Thanx so much for your answer!
    Well actually I have managed to do the filters, and right now dealing with the convertion of formats.
    Right now I am working with Oracle DB 11g, and Excel; and what i would like to do is now that is passing from my uploaded excel the info to my Oracle DB would like to control the ways it pases the info.
    Let's say for example, that I have gotten a Field A in my source table (Excel uploaded to ODI), and that on my Orazle Table on Field A i would like to change the data type of the field, or just make sure that the data inserted will always be of certain type? Can I do this with ODI? Could you please give me some advice in how to it? I assume that it should be done on my interface, in the Diagram tab > Target Database > Mapping Area > Implementation Tab > Expression Editor and modify it there, is it?
    As this is mapping from excel, can I just use the excel function? it does not make any sense for me as it is all in Oracle. I am sorry but I am kinda confused now.
    Once again I do really appreciate your help.

  • Opportunity Product Weighted Field?

    Is there a opportunity product revenue weighted field? I saw that the forecast area has weighted values. I did not see a field, but just want to make sure I am not missing anything.. I would like to have the weighted value displayed in a report.

    You may be confusing Opportunity fields with Product fields.
    On the Opportunity, you have the following fields:
    (Opportunity) Revenue
    (Opportunity) Probability
    (Opportunity) Expected Revenue (Opportunity Revenue * Opportunity Probability)
    On the Opportunity-Product, you also have these fields:
    (Product) Revenue
    (Product) Probability
    (Product) Expected Revenue (Product Revenue * Product Probability)
    When you are using Opportunity Forecasting, the Forecast uses the Opportunity fields. When you are using Product Revenue Forecasting, the Forecast uses the Opportunity-Product fields. You can only forecast one or the other.
    Mike L

  • How do I make a form field validate that it is the sum of two other fields?

    Hi there,
    I am creating a form, and I would like one of the fields to validate by making sure that this field is the sum of two other fields in the form.  Does anyone have any ideas on how to go about this?  I know I'll need to run a custom validation script, but I'm not sure where to begin - I've never done one for validation before.
    Thanks for any help!

    OK, here's a sample script that I hope will clearly demonstrate the general approach. It is intended to be the custom Validate script of the field that the user enters that value that is supposed to be equal to the sum of the two others.
    // Custom Validate script
    (function () {
        // Get the value that the user entered
        var sVal = event.value;
        // If it is blank, do nothing else
        if (!sVal) {
            return;
        // Convert string to a number
        nVal = +sVal;
        // Get the values of the fields, as numbers
        var v1 = +getField("text1").value;
        var v2 = +getField("text2").value;
        // Add them together, rounding to two decimal places, converting to number
        var sum = +util.printf("%.2f", v1 + v2);
        // Compare entered value to the sum of the other two fields
        // Alter the user if they do not match
        if (nVal !== sum) {
            app.alert("The value you entered does not equal the sum of text1 and text2. Please correct.", 3);
            // If you want the entered value rejected, include the following
            event.rc = false;
    Replace "text1" and "text2" with the actual field names.

Maybe you are looking for

  • Office 2013 in MAC Book Pro with Windows 8

    hello, i have purchased new laptop Mac Book Pro and installed windows 8 also i have licensed version of MS Office 2013 for home and office; now i would like to know will this is going to work in mac or not? if yes please let me know how to get regist

  • New MacMini that wants to iChat AV

    Just bot my family Macs and they all have built in cameras except for the MacMini I bot for my 8 year old. He loves it. I want to video chat with him and the reast of my fam while I am traveling on business. I bot a USB WebCam called iMage from Pico

  • Problems with ViewSonic LCD displays?

    I have a ViewSonic VP2030b 21.5" LCD monitor hooked up to my G4 DA. The monitor works OK with these two exceptions: 1. "About This Mac" info on Displays consistently says "No display detected". 2. I frequently have to restart the G4 several times to

  • ClassCastException: com.evermind.server.rmi.OrionRemoteException

    We have resently tried to move our application from OC4J 9.0.3 to the OC4J 9.0.4 preview. However when autogenerating data we get the following exception: com.evermind.server.rmi.OrionRemoteException: java.lang.ClassCastException: com.evermind.server

  • How to Use BAPI_OUTB_DELIVERY_CHANGE for Batch Split

    Hi Experts, I have the follow delivery: Item        Material   Deliv.Qty    Un 10     739911     2     PQT And I want to obtain this: Item        Material   Deliv.Qty    Un                            Batch 10     739911     0     PQT 900001     73991