Problem with decimal

Hi Experts,
I'm having a problem with decimal.
I have a alv data grid that can be edited.Once I press enter the value for the decimal fields are changed.
Example: If i input 5.00 in the field then I press enter it converts it to 0.05
And If I input 2.01 in the field it shows an error Too many decimal places(Maximum 0)
DATA INPUT for my internal table:
DATA: BEGIN OF it_data OCCURS 0,
   docno LIKE zit_haul_line-docno,
   line  LIKE zit_haul_line-line,
   eqpno LIKE zit_haul_line-eqpno,
   rpt LIKE zit_haul_line-rpt,
   notrip LIKE zit_haul_line-notrip,
   trc LIKE zit_haul_line-trc,
   escfee LIKE zit_haul_line-escfee,
   tollfee LIKE zit_haul_line-tollfee,
   repr LIKE zit_haul_line-repr,
   others LIKE zit_haul_line-others,
   tba LIKE zit_haul_line-tba,
   dik LIKE zit_haul_line-dik,
   locorg LIKE zit_haul_line-locorg,
   locdes LIKE zit_haul_line-locdes,
END OF it_data.
DATA: wa_data LIKE it_data.
Here is my code in change ALV Change.
FORM data_changed USING ir_data_changed TYPE REF TO cl_alv_changed_data_protocol.
   DATA ls_modi TYPE lvc_s_modi.
   DATA: ratepertrip LIKE zit_haul_line-rpt,
         nooftrip LIKE zit_haul_line-notrip,
         lv_value TYPE lvc_value ,
         totalrent LIKE zit_haul_line-trc,
         escortfee LIKE zit_haul_line-escfee,
         tollfee LIKE zit_haul_line-tollfee,
         represent LIKE zit_haul_line-repr,
         others LIKE zit_haul_line-others,
         lv_value1 TYPE lvc_value,
         totalbill LIKE zit_haul_line-tba.
   DATA: eqpno LIKE equi-equnr,
         gv_equnr LIKE equi-equnr.
* Check each modification:
   LOOP AT ir_data_changed->mt_mod_cells INTO ls_modi.
      CASE ls_modi-fieldname.
       WHEN 'EQPNO'.
         CONDENSE ls_modi-value.
         SELECT SINGLE equnr
           INTO gv_equnr
           FROM equi
           WHERE equnr EQ ls_modi-value.
         IF sy-subrc NE 0.
           CALL METHOD ir_data_changed->add_protocol_entry
             EXPORTING
               i_msgid     = '00'
               i_msgty     = 'E'
               i_msgno     = '398'
               i_msgv1     = 'Equipment Number does not exist:'
               i_msgv2     = ls_modi-value
               i_msgv3     = ''
               i_msgv4     = ''
               i_fieldname = ls_modi-fieldname
               i_row_id    = ls_modi-row_id.
         ENDIF.
     ENDCASE.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'RPT'
     IMPORTING e_value = ratepertrip.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'NOTRIP'
     IMPORTING e_value = nooftrip.
   CLEAR totalrent.
     ls_modi-fieldname = 'TRC'.
     IF ratepertrip = ''.
       ratepertrip = 1.
     ELSEIF nooftrip = ''.
       nooftrip = 1.
     ENDIF.
     totalrent = ratepertrip * nooftrip.
     CALL METHOD ir_data_changed->modify_cell
       EXPORTING i_row_id = ls_modi-row_id
       i_fieldname = ls_modi-fieldname
       i_value = totalrent.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'ESCFEE'
     IMPORTING e_value = escortfee.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'TOLLFEE'
     IMPORTING e_value = tollfee.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'REPR'
     IMPORTING e_value = represent.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'OTHERS'
     IMPORTING e_value = others.
   CLEAR totalbill.
     ls_modi-fieldname = 'TBA'.
     totalbill = escortfee + tollfee + represent + others.
     totalbill = totalrent + totalbill.
     CALL METHOD ir_data_changed->modify_cell
       EXPORTING i_row_id = ls_modi-row_id
       i_fieldname = ls_modi-fieldname
       i_value = totalbill.
   ENDLOOP.
ENDFORM.                    "data_changed

Hi,
Can you check my code. I've tried changing the data types of my internal table and my output is stll same when I press enter.
The output should be 2.00 3.00 5.00 7.00
Also if I enter 12345.00 the output should be 12,345.00.
Thank you so much for the help.
* ALV required data objects.
TYPE-POOLS: sdydo, icon, slis.
DATA: w_title     TYPE lvc_title,
       w_repid     TYPE sy-repid,
       w_comm      TYPE slis_formname,
       w_status    TYPE slis_formname,
       x_layout    TYPE slis_layout_alv,
       ls_events   TYPE LINE OF slis_t_event,
       t_events    TYPE slis_t_event,
       t_fieldcat  TYPE slis_t_fieldcat_alv,
       x_sort      type LINE OF slis_t_sortinfo_alv,
       t_sort      TYPE slis_t_sortinfo_alv,
       ls_heading  TYPE slis_listheader,
       t_heading   TYPE slis_t_listheader,
       ls_fieldcat TYPE slis_fieldcat_alv,
       gs_variant  LIKE disvariant,
        gt_events            TYPE slis_t_event,
        gs_events            TYPE slis_alv_event.
DATA:
   wa_layout     TYPE slis_layout_alv,
   wa_events         TYPE slis_alv_event,
   wa_sort TYPE slis_sortinfo_alv.
TYPES: BEGIN OF t_header,
        line01(555) TYPE c,
        line02(555) TYPE c,
        END OF t_header.
DATA: is_print TYPE slis_print_alv,
       gset TYPE lvc_s_glay,
       %runmode TYPE aqlimode.
data: it_sortcat   type slis_sortinfo_alv occurs 1.
DATA: gw_header  TYPE t_header.
" END OF ALV DATA
"========================================================================================================================
DATA: BEGIN OF it_data OCCURS 0,
   docno LIKE zit_haul_line-docno,
   line  LIKE zit_haul_line-line,
   eqpno LIKE zit_haul_line-eqpno,
   rpt TYPE p DECIMALS 2,  "LIKE zit_haul_line-rpt,
   notrip TYPE p DECIMALS 2,
   trc TYPE p DECIMALS 2,
   escfee TYPE p DECIMALS 2,
   tollfee TYPE p DECIMALS 2,
   repr TYPE p DECIMALS 2,
   others TYPE p DECIMALS 2,
   tba TYPE p DECIMALS 2,
   dik LIKE zit_haul_line-dik,
   locorg LIKE zit_haul_line-locorg,
   locdes LIKE zit_haul_line-locdes,
END OF it_data.
DATA: wa_data LIKE it_data.
DATA: it_modified TYPE STANDARD TABLE OF zit_haul_line WITH HEADER LINE.
DATA: wa_modified TYPE STANDARD TABLE OF zit_haul_line WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: r_create RADIOBUTTON GROUP rad1  USER-COMMAND a DEFAULT 'X'.
   SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
   PARAMETERS: r_proj RADIOBUTTON GROUP rad2 MODIF ID A.
   PARAMETERS: r_cost RADIOBUTTON GROUP rad2 MODIF ID A.
   SELECTION-SCREEN END OF BLOCK b2.
PARAMETERS: r_post RADIOBUTTON GROUP rad1.
PARAMETERS: r_rev RADIOBUTTON GROUP rad1.
   SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME.
     PARAMETERS: p_docno LIKE mseg-belnr MODIF ID B,
                 p_post LIKE sy-datum MODIF ID B.
   SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME.
PARAMETERS: p_trand LIKE sy-datum,
             p_cost LIKE csks-kostl,
             p_proj TYPE string,
             p_wbs TYPE string,
             p_nwa TYPE string.
SELECTION-SCREEN END OF BLOCK b4.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
   IF r_create = 'X'.
     IF screen-group1 = 'A'.
        screen-active = 1.
     ENDIF.
   ELSE.
     IF screen-group1 = 'A'.
        screen-active = 0.
     ENDIF.
   ENDIF.
   IF r_post = 'X' OR r_rev = 'X'.
     IF screen-group1 = 'B'.
        screen-active = 1.
     ENDIF.
   ELSE.
     IF screen-group1 = 'B'.
        screen-active = 0.
     ENDIF.
   ENDIF.
   MODIFY SCREEN.
ENDLOOP.
START-OF-SELECTION.
PERFORM get_data.
PERFORM display_report.
FORM get_data.
it_data-line = '001'.
APPEND it_data.
it_data-line = '002'.
APPEND it_data.
it_data-line = '003'.
APPEND it_data.
it_data-line = '004'.
APPEND it_data.
it_data-line = '005'.
APPEND it_data.
it_data-line = '006'.
APPEND it_data.
it_data-line = '007'.
APPEND it_data.
it_data-line = '008'.
APPEND it_data.
it_data-line = '009'.
APPEND it_data.
it_data-line = '010'.
APPEND it_data.
ENDFORM.
"ALV DISPLAY ====================================================================================================================================
"&      Form  PF_WRITE_FIELDCAT
*&      Form  pf_write_fieldcat
*       text
*      -->FNAME      text
*      -->TNAME      text
*      -->TEXT       text
*      -->LEN        text
FORM pf_write_fieldcat  USING fname
                               tname
                               text
                               len
                               edt.
*                              key
*                              sum.
   ls_fieldcat-fieldname     = fname.
   ls_fieldcat-tabname       = tname.
   ls_fieldcat-seltext_l     = text.
   ls_fieldcat-outputlen     = len.
*  ls_fieldcat-key           = key.
*  ls_fieldcat-do_sum        = sum.
   ls_fieldcat-edit = edt.
   IF len = '0'.
     ls_fieldcat-outputlen     = '1'.
     ls_fieldcat-no_out = 'X'.
   ENDIF.
   APPEND ls_fieldcat TO t_fieldcat.
   CLEAR ls_fieldcat.
*  To set ENTER Event!
   gs_events-name = 'CALLER_EXIT'.
   gs_events-form = 'CALLER_EXIT'.
   APPEND gs_events TO gt_events.
*   To change the ALV Changed Protocoll
   gs_events-name = 'DATA_CHANGED'.
   gs_events-form = 'DATA_CHANGED'.
   APPEND gs_events TO gt_events.
ENDFORM.                    " PF_WRITE_FIELDCAT
*&      Form  display_report
FORM display_report.
   is_print-no_print_selinfos = 'X'.
   is_print-no_print_listinfos = 'X'.
   is_print-print_ctrl = 'X'.
   PERFORM pf_write_fieldcat USING:
*  'DOCNO'                  'IT_DATA'  'Line'                   ' ' '',
   'LINE'                  'IT_DATA'  'Line'                   ' ' '',
   'EQPNO'                 'IT_DATA'  'Equipment No.'          ' ' 'X',
   'RPT'           'IT_DATA'  'Rate per Trip'          ' ' 'X',
   'NOTRIP'              'IT_DATA'  'No of Trip'             ' ' 'X',
   'TRC'             'IT_DATA'  'Total Rental Charges'   ' ' '',
   'ESCFEE'             'IT_DATA'  'Escort Fee'             ' ' 'X',
   'TOLLFEE'               'IT_DATA'  'Toll Fee'               ' ' 'X',
   'REPR'             'IT_DATA'  'Representation'         ' ' 'X',
   'OTHERS'                'IT_DATA'  'Others'                 ' ' 'X',
   'TBA'               'IT_DATA'  'Total Billable Amount'  ' ' '',
   'DIK'              'IT_DATA'  'Distance in KM'         ' ' 'X',
   'LOCORG'             'IT_DATA'  'Location Origin'        ' ' 'X',
   'LOCDES'             'IT_DATA'  'Location Destination'   ' ' 'X'.
* Layout
   x_layout-zebra = 'X'.
   x_layout-no_keyfix = ' '.
   x_layout-colwidth_optimize = 'X'.
* GUI Status
   w_status = 'SET_PF_STATUS'.
   w_repid = sy-repid.
* User commands
   w_comm = 'USER_COMMAND'.
*  gs_variant-variant = p_var1.
*  gs_variant-handle  = space.
*  gs_variant-report  = sy-repid.
   gs_variant-report  = sy-repid.
   gs_variant-username = sy-uname.
   gset-no_colwopt = 'X'.
* Displays the ALV grid
   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       i_callback_program = sy-repid
       it_fieldcat        = t_fieldcat
       is_layout          = x_layout
       "it_sort            = t_sort
       it_sort                 = it_sortcat
*      i_callback_pf_status_set = w_status
       "i_callback_user_command  = w_comm
       I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
*      i_callback_html_top_of_page  = 'TOP_OF_PAGE'
       i_callback_top_of_page  = 'TOP-OF-PAGE'
*      i_callback_html_end_of_list = 'END-OF-PAGE'
       is_variant         = gs_variant
       i_save             = 'A'
       is_print           = is_print
       it_events          = gt_events
*      i_grid_title       = w_title
     TABLES
       t_outtab           = IT_DATA
     EXCEPTIONS
       program_error      = 1
       OTHERS             = 2.
ENDFORM.                    " display_report
FORM data_changed USING ir_data_changed TYPE REF TO cl_alv_changed_data_protocol.
   DATA ls_modi TYPE lvc_s_modi.
   DATA: ratepertrip LIKE zit_haul_line-rpt,
         nooftrip LIKE zit_haul_line-notrip,
         lv_value TYPE lvc_value ,
         totalrent LIKE zit_haul_line-trc,
         escortfee LIKE zit_haul_line-escfee,
         tollfee LIKE zit_haul_line-tollfee,
         represent LIKE zit_haul_line-repr,
         others LIKE zit_haul_line-others,
         lv_value1 TYPE lvc_value,
         totalbill LIKE zit_haul_line-tba.
   DATA: eqpno LIKE equi-equnr,
         gv_equnr LIKE equi-equnr.
* Check each modification:
   LOOP AT ir_data_changed->mt_mod_cells INTO ls_modi.
      CASE ls_modi-fieldname.
       WHEN 'EQPNO'.
         CONDENSE ls_modi-value.
         SELECT SINGLE equnr
           INTO gv_equnr
           FROM equi
           WHERE equnr EQ ls_modi-value.
         IF sy-subrc NE 0.
           CALL METHOD ir_data_changed->add_protocol_entry
             EXPORTING
               i_msgid     = '00'
               i_msgty     = 'E'
               i_msgno     = '398'
               i_msgv1     = 'Equipment Number does not exist:'
               i_msgv2     = ls_modi-value
               i_msgv3     = ''
               i_msgv4     = ''
               i_fieldname = ls_modi-fieldname
               i_row_id    = ls_modi-row_id.
         ENDIF.
     ENDCASE.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'RPT'
     IMPORTING e_value = ratepertrip.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'NOTRIP'
     IMPORTING e_value = nooftrip.
   CLEAR totalrent.
     ls_modi-fieldname = 'TRC'.
     IF ratepertrip = ''.
       ratepertrip = 1.
     ELSEIF nooftrip = ''.
       nooftrip = 1.
     ENDIF.
     totalrent = ratepertrip * nooftrip.
     CALL METHOD ir_data_changed->modify_cell
       EXPORTING i_row_id = ls_modi-row_id
       i_fieldname = ls_modi-fieldname
       i_value = totalrent.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'ESCFEE'
     IMPORTING e_value = escortfee.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'TOLLFEE'
     IMPORTING e_value = tollfee.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'REPR'
     IMPORTING e_value = represent.
   CALL METHOD ir_data_changed->get_cell_value
     EXPORTING i_row_id = ls_modi-row_id
     i_fieldname = 'OTHERS'
     IMPORTING e_value = others.
   CLEAR totalbill.
     ls_modi-fieldname = 'TBA'.
     totalbill = escortfee + tollfee + represent + others.
     totalbill = totalrent + totalbill.
     CALL METHOD ir_data_changed->modify_cell
       EXPORTING i_row_id = ls_modi-row_id
       i_fieldname = ls_modi-fieldname
       i_value = totalbill.
   ENDLOOP.
ENDFORM.                    "data_changed
FORM caller_exit USING is_data TYPE slis_data_caller_exit.
* Switch to OO_ALV:
   DATA: lr_alv TYPE REF TO cl_gui_alv_grid.
   CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
     IMPORTING
       e_grid = lr_alv.
* Register ENTER as edit event:
   CALL METHOD lr_alv->register_edit_event
     EXPORTING
       i_event_id = cl_gui_alv_grid=>mc_evt_enter.
* pls. use MC_EVT_MODIFIED if leaving the cell should trigger the edit event!
ENDFORM. "CALLER_EXIT
*&      Form  TOP-OF-PAGE
*       text
FORM top-of-page.
*ALV Header declarations
   DATA: t_header TYPE slis_t_listheader,
         wa_header TYPE slis_listheader,
         t_line LIKE wa_header-info,
         ld_lines TYPE i,
         ld_linesc(10) TYPE c.
   DATA: text TYPE sdydo_text_element,
         a_right   TYPE REF TO cl_dd_area.
   DATA: tran TYPE string,
         send TYPE string,
         wbs TYPE string,
         nwa TYPE string.
   text = 'Create Hauling Charges for Project'.
   wa_header-typ  = 'S'.
   wa_header-info = text.
   APPEND wa_header TO t_header.
   CLEAR: wa_header.
   gw_header-line01 = text.
   CONCATENATE 'Transaction Date: ' p_trand INTO tran SEPARATED BY space.
   text = tran.
   wa_header-typ  = 'S'.
   wa_header-info = text.
   APPEND wa_header TO t_header.
   CLEAR: wa_header.
   gw_header-line01 = text.
   CONCATENATE 'Sender Cost Center: ' p_cost INTO send SEPARATED BY space.
   text = send.
   wa_header-typ  = 'S'.
   wa_header-info = text.
   APPEND wa_header TO t_header.
   CLEAR: wa_header.
   gw_header-line01 = text.
   CONCATENATE 'Receiver WBS: ' p_wbs INTO wbs SEPARATED BY space.
   text = wbs.
   wa_header-typ  = 'S'.
   wa_header-info = text.
   APPEND wa_header TO t_header.
   CLEAR: wa_header.
   gw_header-line01 = text.
   CONCATENATE 'Receiver Network and NWA: ' p_nwa INTO nwa SEPARATED BY space.
   text = nwa.
   wa_header-typ  = 'S'.
   wa_header-info = text.
   APPEND wa_header TO t_header.
   CLEAR: wa_header.
   gw_header-line01 = text.
   CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
     EXPORTING
       it_list_commentary = t_header.
ENDFORM.                    "top-of-page
FORM pf_set_top_page_heading  USING typ
                                     key
                                     info.
   ls_heading-typ = typ.
   ls_heading-key = key.
   ls_heading-info = info.
   APPEND ls_heading TO t_heading.
ENDFORM.                    " PF_SET_TOP_PAGE_HEADING
*&      Form  PF_SET_TOP_PAGE_EVENTS
FORM pf_set_top_page_events  USING name
                                    form.
   ls_events-name = name.
   ls_events-form = form.
   APPEND ls_events TO t_events.
   CLEAR ls_events.
ENDFORM.                    " PF_SET_TOP_PAGE_EVENTS
*&      Form  REUSE_ALV_GET_VARIANT
FORM reuse_alv_get_variant
   USING    value(iv_repid)   TYPE  sy-repid
            value(iv_handle)  TYPE  slis_handl
   CHANGING iv_variant        TYPE  disvariant-variant.
   DATA: lv_exit(1) TYPE c,
         ls_variant TYPE disvariant.   " Structure for Variant
   MOVE: iv_variant TO ls_variant-variant,
         iv_handle  TO ls_variant-handle,
         iv_repid   TO ls_variant-report.
   CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
     EXPORTING
       is_variant    = ls_variant
       i_save        = 'A'
     IMPORTING
       e_exit        = lv_exit
       es_variant    = ls_variant
     EXCEPTIONS
       not_found     = 1
       program_error = 2
       OTHERS        = 3.
   IF sy-subrc <> 0.
     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   ENDIF.
   IF lv_exit = space.
     MOVE ls_variant-variant TO iv_variant.
   ENDIF.
ENDFORM.                    " REUSE_ALV_GET_VARIANT                 "
FORM user_command USING w_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE w_ucomm.
WHEN '&DATA_SAVE'.
*  READ TABLE it_data INTO wa_data." INDEX rs_selfield-tabindex.
   DELETE it_data WHERE eqpno IS INITIAL.
   LOOP AT it_data INTO wa_data.
     CONDENSE wa_data-eqpno.
     MOVE-CORRESPONDING wa_data TO wa_modified.
     APPEND wa_modified TO it_modified.
   ENDLOOP.
   MODIFY zit_haul_line FROM TABLE it_modified.
ENDCASE.
ENDFORM. "user_command

Similar Messages

  • Problem with decimal point in Korea and Japan

    Hi all,
    I have one problem with decimal points.
    I need to change in my out put cuurency values as per japan or korea standards.
    Please help me is there any function module for this one.
    program using alv grid display.
    i use write statement but it is not working. Because
    data: L_AMT  type glpca-hsl,
             G_AMT  TYPE CHAR15.
    CURR this value is 'JPY'.
    WRITE L_AMT CURRENCY CURR TO G_AMT.
    here i need to do
    L_AMT = G_AMT.   "" going to runtime error.
    if i taken like
    data: L_AMT  TYPE CHAR15,
             G_AMT  TYPE CHAR15.
    CURR this value is 'JPY'.
    WRITE L_AMT CURRENCY CURR TO G_AMT.   "" it is not working
    Regards
    margani

    Hello,
    This is pretty basic, whenever you've currency & quantity fields you need to pass the corres. reference fields.
    In your case you need to populate the cfieldname & ctabname fields of the FieldCat.
    BR,
    Suhas

  • Problems with decimal places and formatting

    Hi , we are having problems with an add on running on different localization companies. Decimal places separatd by "," differ from other localizations. We dont know if this is a SQL collation setting or somethng related to code or requirements to run add ons on different servers and languages.
    Any ideas??
    Thanks

    Hello
    Follow up with this thread:
    [Re: How to get the numeric value of DocTotal from UI API]
    Regards,
    J.

  • Problem with decimal in Japan currency

    Hi Gurus,
    I have a problem with Japan currency that when When i take the printout of  document with JPY 5,168,277 it is wrongly printing as 51,682.77 but in document  display it is showing correclty as 5,168,277.  But when i check this in BSEG  table it was wrong updated as 51,682.77 (WRBTR field) i hope it is picking the amount from this field for printing .
    For the above i made changes in OY01  but i find there was no use.
    In OY01 the decimal place setting is 1,234,567.89 the middle one of the three.
    When i post the same amount to japan co code in currency JPY and if i check in BSEG table
    Amount in LC                                      51,682.77
    Amount          (WRBTR)                       51,682.77
    Orig.reduction                                      0.00
    G/L amount                                         5,168,277
    When i post the same amount in non japan co code in JPY Currency and check in BSEG(area where i am facing problem)
    Amount in LC                                      47,550.22
    Amount          (WRBTR)                       51,682.77
    Orig.reduction                                      0.00
    G/L amount                                         5,168,277
    Please tell me how to correct this.

    May ne u can check this OSS note also 137626
    Summary
    Symptom
    1. Which currencies have to be defined separately with regard to the number of decimal places?
    2. What do I need to observe when maintaining decimal places for currencies?
    3. Which Customizing presettings does SAP deliver in table TCURX (decimal places for currency codes)?
    4. Does SAP deliver the Customizing presettings of decimal places for currency codes (Table TCURX) for upgrade installations?
    5. Which information does SAP use for the specification of these Customizing presettings?
    Solution
    1. question: Which currencies have to be defined separately with
                regard to the number of decimal places?
    Answer:
    The number of decimal places can vary for currencies. Currencies which do not have two decimal places must be defined in table TCURX (decimal places for currency codes).
    You can maintain this table via the R/3 Implementation Guide (Global Settings -> Currencies, Transaction OY04).
    If a currency is not defined in Table TCURX (decimal places for currency codes), this currency is regarded as currency with two decimal places.
    2. question: What do I need to observe when maintaining decimal places
                for currencies?
    Answer:
    During operation, you must neither delete currencies used nor change their definition of decimal places. Amounts in posted documents could become invalid or incorrect as a result.
    3. question: Which Customizing presettings does SAP deliver in table
                TCURX (decimal places for currency codes) ?
    Answer
    At present, SAP delivers the following Customizing presettings for table TCURX:
    ISO Currency Decimal places
    Code
    ADP   Andoran Peseta                            0
    AFA   Afghani  Afghani                          0
    BEF   Belgian franc                             0
    BHD   Bahraini dinar                            3
    BIF   Burundi franc                             0
    BYB   Belorussian rubel (old)                   0
    BYR   Belorussian rubel (new)                   0
    CLP   Chilean peso                              0
    COP   Columbian peso                            0
    DEM3  (Internal) German Mark (3 Dec.)           3
    DJF   Djibouti franc                            0
    ECS   Ecuadorian sucre                          0
    ESP   Spanish peseta                            0
    GNF   Guinea franc                              0
    GRD   Greek drachma                             0
    HUF   Hungarian forint                          0
    IDR   Indonesian rupiah                         0
    IQD   Iraqui dinar                              3
    ITL   Italian lira                              0
    JOD   Jordan dinar                              3
    JPY   Japanese yen                              0
    KMF   Comoros franc                             0
    KRW   South Korean won                          0
    KWD   Kuwaiti dinar                             3
    LAK   Laos new kip                              0
    LUF   Luxembourg franc                          0
    LYD   Libyan dinar                              3
    MGF   Madagascan franc                          0
    MZM   Mozambique metical                        0
    OMR   Omani rial                                3
    PTE   Portugese escudo                          0
    PYG   Paraguay guarani                          0
    ROL   Roumanian Lei                             0
    RWF   Rwanda franc                              0
    TJR   Tadzhikistani rubel                       0
    TMM   Turkmenistani manat                       0
    TND   Tunesian dinar                            3
    TPE   Timor escudo                              0
    TRL   Turkish lira                              0
    TWD   New Taiwan dollar                         0
    UGX   Uganda shilling                           0
    USDN  (Internal) US Dollar (5 dec.pl.)          5
    VND   Vietnamese dong                           0
    VUV   Vanuata vatu                              0
    XAF   CFA Franc BEAC                            0
    XOF   CFA Franc BCEAO                           0
    XPF   CFP Franc                                 0
    4. question: Does SAP deliver the Customizing presettings of decimal
                places for currency codes (Table TCURX) for upgrade
                 installations?
    Antwort
    Table TCURX (decimal places for currency codes) is a client-independent table of the delivery class "C" (Customizing table). Therefore the table contents for this table can only be delivered with new installations.
    For upgrade installations, new or changed contents of Table TCURX are not delivered.
    5. question: Which information does SAP use for the specification of
                 these Customizing presettings?
    Answer
    Currency codes and decimal places for currency codes are defined in ISO standard 4217. For the specification of decimal places for currency codes, SAP uses this ISO standard.
    For some currencies, for example, for the "Turkish lira", the decimal places which are used in reality deviate from the ISO definition. In many of these cases, SAP decided to adhere to the definitions generally used.
    Example:
    ISO standard 4217 defines two decimal places for the Turkish lira (TRL), however in reality zero decimal places are being used for the Turkish lira. SAP delivers zero decimal places as Customizing presetting for "Turkish lira".
    Header Data
    Release Status: Released for Customer
    Released on: 14.08.2007  13:12:09
    Priority: Recommendations/additional info
    Category: FAQ
    Primary Component: XX-CSC-XX Country specific Customizing & Functionality (Standard R/3)
    Secondary Components: FI Financial Accounting
    Releases
    Release Independant
    Related Notes
    434349 - Change of decimal places of currencies
    126531 - Collective note preliminary availability Colombia
    Print Selected Notes (PDF)

  • Problem with decimal fields using BADI For PD Infotypes

    Hi,
    I'm implementing BADI  HRBAS00INFTY.
    For reading the fields of infotype , I'm using the substring
    of the field NEW_INNNN-VDATA .
    I have a problem with fields of type DEC.
    In field NEW_INNNN-VDATA it looks like this :  '####'
    I believe that the possible reason for this is conversion from DEC to CHAR
    But I don't know how to fix it.
    Thank you .
    Message was edited by: Alon Lozinsky

    Hi Alon,
    We had same issue. Use following code.
    data: hri1011_str type hri1011.
    move new_innnn-vdata to hri1011_str.
    HRI1011_STR fields will have decimal values.
    Let me know if you still have any issues. If solution works, kindly do Point Recognition.
    -Bharat

  • Problem with decimal numbers..

    hi i posted the other day with a problem I had. I thought it was all sorted but I have just realised that there is another problem.
    I have the following code for an applet:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TextFieldExample extends Applet implements ActionListener {
    TextField textInput;
    String text = "";
    public void init() {
    textInput = new TextField (20);
    add(textInput);
    textInput.addActionListener(this);
    public void actionPerformed(ActionEvent e) {
    text = textInput.getText();
    repaint();
    public void paint(Graphics g) {
         int x = Integer.parseInt(text);
         double y = Math.abs(x);
    g.drawString("You wrote " + text,20,500);
         g.drawString("The absolute value is: " + y,20,100);
    I am trying to do the applet so when you type in an angle, it tell you the sine, cosine etc. I can get it to work with whole numbers like 1,10,300, but it won't work when i try to use decimal numbers. Can anyone help?
    Thnk you in advance!
         

    Hi,
    you are using Integer.parseInt() to convert the input, so it will only work if the text is an integer. Use Double.parseDouble() instead.
    Andre

  • Problem with decimal stepSize in the spark NumericStepper

    Hi together,
    I get problems when I define a decimal stepSize for a spark NumericStepper:
    <s:NumericStepper id="numericStepperRange" x="318" y="104" width="65"
                                                        maximum="20000.0" minimum="0.1"
                                                        stepSize="0.1" value="0.1" />
    When I click on the Up Arrow following numbers will be displayed: 0.1  >  1.1  >  11.1  >  111.1  >  1111.1  >  11111.1  >  20000.
    If I exchange the spark NumericStepper with the one from the MX component set, the problem does not occure.
    <mx:NumericStepper id="numericStepperRange" x="318" y="104" width="65"
        maximum="20000.0" minimum="0.1"
        stepSize="0.1" value="0.1" />
    0.1  >  0.2  >  0.3  >  0.4  >  0.5  > ...
    Maybe someone else had the same problem?
    Thanks!

    I tried spark numericStepper and it works correctly.
    <s:NumericStepper minimum="0.1" maximum="20000.0" stepSize="0.1"  value="0.1" />

  • UiXML: dataBinding problem with decimal validator

    I'm trying to use the decimal validator inside a uit template and dataBind the minValue, maxValue, maxScale and maxPrecision attributes to the ui:rootAttr dataObject like so:
    <textInput ...>
    <onSubmitValidater>
    <decimal
    data:minValue="minValue@ui:rootAttr"
    data:maxValue="maxValue@ui:rootAttr"
    data:maxPrecision="maxPrecision@ui:rootAttr"
    data:maxScale="maxScale@ui:rootAttr"/>
    </onSubmitValidater>
    </textInput>
    However that doesn't seem to work the validation never executes.
    But when I don't use dataBinding it works fine.
    Example:
    <textInput ...>
    <onSubmitValidater>
    <decimal
    minValue="0"
    maxValue="10"
    maxPrecision="2"
    maxScale="3"/>
    </onSubmitValidater>
    </textInput>
    Could it be that there is some bug with the decimal validator? I'm using the dateValidator in just the same way and it works fine.
    Guido

    We'll at least warn you of the problem starting in 9.0.5.
    Getting full databinding support in there may not happen
    by then.
    But there is a workaround today: databind the
    onSubmitValidater attribute:
    <textInput data:onSubmitValidater="decimal@someBean"/>
    ... to point to code that directly creates the
    DecimalValidater.
    public ClientValidater getDecimal()
    DecimalValidater validater = new DecimalValidater();
    validater.setMinValue(1.0);
    // etc...
    return validater;

  • Data Load with HAL Problem with Decimal-delimiter/Language Setting

    Hi,
    we use HAL to load Data into Essbase. The Data is with a . as Decimal Point like in
    1252.25 When i upload these Data with HAL the number becomes 125225.00
    The Locale of my OS is German
    The Locale i specified for the file in HAL is English
    If i change the Locale of my BS to English the Problem disappears but thats annoying.
    Has anybody else such a problem ?
    Is There a Solution for this ?
    Thanks.
    Kevin

    Reading over John's blog, we created a rule file.
    But, it looks the load process using the rule file seems to be hanging? are we missing any thing? We are using comman seperator and having number of lines to skip as zero.

  • Problem with decimal data visualization in a circular graphic object type

    When we are design a report using Crystal Reports 2008 we found the following problem. When we insert an object of type circle graphic selecting the option in the graphics wizard for view in the legend data both in value and percentage (u2018bothu2019 design) we cant show them in a two decimals format at the same time.
    Using the option u2018number formatu2019 and indicating two decimals only affects the value but not the percentage.
    Show both the value and the percentage with two decimals at same time itu2019s a necessary requirement for our report design.
    Is there any way to show both the value and the percentage in a circle graphic object with two decimals at the same time?
    Thanks.

    hello Jose,
    i am not sure what you mean by "circular graphic object type".
    there's nothing in the standard cr 2008 build that has this that i've ever found that creates a circle other than inserting a box and changing the rounding on the corners. if you're using a 3rd party product or add-on you'll need to contact whoever built it.
    cheers,
    jamie

  • Problem with decimal separator

    How to change default settings for decimal and group separators?
    Example:
    - 10g database
    - APEX v.3.1.2.00.02
    0.00: S H O W: application="1" page="6" workspace="" request="" session="1327891581523707"
    0.00: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: hr
    0.01: alter session set nls_language="*CROATIAN*"
    0.01: alter session set nls_territory="*CROATIA*"
    0.01: NLS: CSV charset=*EE8MSWIN1250*
    *0.01: ...NLS: Set Decimal separator="."*
    *0.01: ...NLS: Set NLS Group separator=","*
    - 11g database
    - APEX v.3.1.2.00.02
    0.00: S H O W: application="1" page="6" workspace="" request="" session="124256584707880"
    0.00: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: hr
    0.00: alter session set nls_language="*CROATIAN*"
    0.00: alter session set nls_territory="*CROATIA*"
    0.00: NLS: CSV charset=*EE8MSWIN1250*
    *0.00: ...NLS: Set Decimal separator=","*
    *0.00: ...NLS: Set NLS Group separator="."*
    Both applications are same and in both applications Application Primary Language globalization attribute is set to Croatian (hr) but I'm getting different decimal and group separators.
    Querying v$nls_parameters view I saw that, in first case NLS_NUMERIC_CHARACTERS parameters are set same on database and apex ('.,') but in second case they are different. On database is '.,' but on apex application ',.'
    Why?
    Please help!

    Make changes in the regional configurations of your PC.
    Maybe its solve your problem.

  • Problem with decimal no

    Hi experts.,
    How to do decimal caleculations in sap
    For EX:
    when i am giving like this it is giving error at 14.5
    wa_vbtab-jivp = ( ( wa_vbtab-difv + wa_vbtab-jex ) * 14.5 ) / 100.
    how to give 14.5.please help me.

    Hi Kalpana,
    Just need to know the data types that you are using for the all the fields.
    Constant : lv_div type c value '14.5'.
    If the data types are not Char convert that in to char and do the calculations.
    wa_vbtab-jivp = ( (  wa_vbtab-difv + wa_vbtab-jex  ) * lv_div  )  /  100.
    With Regards,
    Sumodh.P

  • Problem with decimal symbol

    When I import in string format and after try to convert to number sometimes my procedure fails. I see that sometimes database need number string decimal symbol to be '.' and I replace ',' with '.' . But time after I find that I must change my procedure because system only acepts '.' like decimal symbol in to_number(str) operation. I think there could be two solutions I don't know how could be developed:
    1) Control in de procedure which of the two symbols is accepted
    2) Make Oracle database not to change decimal symbol setting
    Any idea?
    Thanks

    That isn't a sql developer issue. You are not specifying the correct 'fmt' or nlsparam' parameters to the TO_NUMBER function.
    >
    When I import in string format and after try to convert to number sometimes my procedure fails. I see that sometimes database need number string decimal symbol to be '.' and I replace ',' with '.' . But time after I find that I must change my procedure because system only acepts '.' like decimal symbol in to_number(str) operation. I think there could be two solutions I don't know how could be developed:
    1) Control in de procedure which of the two symbols is accepted
    2) Make Oracle database not to change decimal symbol setting
    Any idea?
    >
    Your statement that "system only acepts '.' like decimal symbol in to_number(str) operation" is misinformed.
    Oracle's TO_NUMBER function will accept both a format string and an nslparam parameter and will handle that conversion for you.
    See the TO_NUMBER function in the SQL Language Reference.
    http://docs.oracle.com/cd/E14072_01/server.112/e10592/functions209.htm
    More importantly see the TO_CHAR function in the same doc since the example for 'fmt' and 'nlsparam' are there
    http://docs.oracle.com/cd/E14072_01/server.112/e10592/functions199.htm#i79330
    There are examples in the TO_CHAR section and this introductory text should satisfy you that these parameters will do what you need.
    >
    TO_CHAR (number) converts n to a value of VARCHAR2 data type, using the optional number format fmt. The value n can be of type NUMBER, BINARY_FLOAT, or BINARY_DOUBLE. If you omit fmt, then n is converted to a VARCHAR2 value exactly long enough to hold its significant digits.
    If n is negative, then the sign is applied after the format is applied. Thus TO_CHAR(-1, '$9') returns -$1, rather than $-1.
    Refer to "Format Models" for information on number formats.
    The 'nlsparam' argument specifies these characters that are returned by number format elements:
    •Decimal character
    •Group separator
    •Local currency symbol
    •International currency symbol
    This argument can have this form:
    'NLS_NUMERIC_CHARACTERS = ''dg''
    NLS_CURRENCY = ''text''
    NLS_ISO_CURRENCY = territory '
    The characters d and g represent the decimal character and group separator, respectively. They must be different single-byte characters. Within the quoted string, you must use two single quotation marks around the parameter values. Ten characters are available for the currency symbol.
    If you omit 'nlsparam' or any one of the parameters, then this function uses the default parameter values for your session.
    >
    Those comments appy to the parameters when used with TO_NUMBER also.

  • Problem with decimal display

    Hi everybody,
    when I make reports by report painter (GRR1), I can choose decimal display (for example: 1,234 or 1.234). But when I make reports by drilldown report (KE84), SAP use default point instead of comma. I can't change it. How to choose decimal display is comma (1,234) in drilldown report?
    Thanks

    Hi Sangram,
    I changed setting according to your instruction. But It's useless. When I execute report, SAP still display $1.745.600.
    Edited by: Phu Quoc Si on Dec 22, 2011 8:42 AM

  • Problem with decimal values

    Hi
    I need to store a very long decimal value. something like
    0.123456789012 in to the SQL data base.
    However after doing some calculations , my value is trim to
    0.12345
    float value = v1 v2v3;
    v1 is long and v2 is a float and v3 is in double.
    anyone noes y? I need the value to be in full lenght (as in all the numbers after the decimal point).
    many thanks !
    yan

    but my SQL database is designed to store float
    value.
    I haf no control of the SQL database..Don't assume that float in the SQL database is the same as float in Java code.
    SQL-Server 2000's float is the same as a Java double. Depending on the RDBMS you are using, the same words may have a different meaning between the RDBMS and Java

Maybe you are looking for

  • Accessing attachments stored in Open text (ECC) with Work manager 6.0

    Hello Experts, We are using Open text in one of our ECC systems to store documents, files, pdfs and other attachments for the Work Orders and Notifications. We want to configure the Work Manager 6.0 application hosted on SMP2.3, in order to fetch all

  • Download DMS attachment into an application server in background mode?

    Is it possible to download DMS attachment into an application server in background mode? Currently I am using the following code but does not work in background mode   CALL FUNCTION 'CVAPI_DOC_GETDETAIL'     EXPORTING       pf_dokar     = 'Z06'      

  • Oracle Enterprise Manager can't connect to database after installation

    Hello, I have a problem with Enterprise Manager. I installed Oracle 10g and the patch 10.2.0.2. After install, I could connect to database from SqlPlus without problems, but when I try to connect from AllPrograms - Oracle - DatabaseControl or since t

  • How Can I configure Bank Country or Bank Key

    Hi Experts, As I am learning VC , when I am going to make an application (BAPI_BANK_GETDETAIL) when I am going to do this on the BAPI..... Test the data service (choosing the Test Data Service right-click context menu), using the following values: su

  • Slow Intel Photoshop VS Slow G4 Photoshop?

    I'm very interested in buying a 15" 2.0GHz MacBook Pro to replace my 1.33GHz 12" PowerBook. Since I've heard that Photoshop runs extremely slow on the new Intel Core Duo, I'm a little hesitate if I should get an 2.0GHz 15" MBP or if I should get an 1