How to convert from pt to mm

Advertisement
November 30

Dear all,
Does anybody know how to convert value of pt to value of mm according to language and font? Thanks a lot!
Best regards,
Christo
Edited by: Christo Tan on Dec 22, 2011 5:51 AM
Edited by: Christo Tan on Dec 22, 2011 6:00 AM

Advertisement

Replay

The standard system (I am on ECC 6) doesn't come with a unit for Russian Point (Tochka in Russian). So we need to do the following to be able to convert from millimeter (mm) to Russian Point and vice versa. This is how we did it in our production system.
1. In transaction CUNI create a new unit RP with LENGTH dimension. In the drop down list besides "Units of Measurement" button, select LENGTH dimension and enter values like in the below picture
[Russian Point in transaction CUNI|http://img265.imagevenue.com/img.php?image=70210_UnitofMeasure_RussianPoint_122_100lo.jpg]
2. In your ABAP program you can call UNIT_CONVERSION_SIMPLE like below to convert from RP to MM.
DATA: lv_input TYPE I VALUE 1,
      lv_output TYPE F.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
  EXPORTING
    input                      = lv_input
    NO_TYPE_CHECK              = 'X'
*   ROUND_SIGN                 = ' '
    UNIT_IN                    = 'RP'
    UNIT_OUT                   = 'MM'
  IMPORTING
*   ADD_CONST                  =
*   DECIMALS                   =
*   DENOMINATOR                =
*   NUMERATOR                  =
    OUTPUT                     = lv_output
* 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.
The above call converts 1 RP into 2.5400000000000000E-01 mm and puts it in lv_output (which is 0.254)

View 11 Replies

Tags:

  1. Fair photoshop cs4 action
  2. ifroget my icloud id n pasword
  3. hp g60 diskpart uefi
  4. BAPI_SALESDOCUMENT_CHANGE sample
  5. how to set program run dat in rffoedi1
  6. 7PBZ
  7. gladpng
  8. swimmingxgn
  9. positivezsr
  10. tipwss
Copyrights 2019 Fcffair BigData Resource, All rights reserved