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)

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

  • 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

  • Problem with Shopping cart's currency

    Hello,
    I've got a problem with shopping cart's currency. I create the shopping cart with 1 item currency "EUR", I see in my backend ECC 5.0 , my purchase requisition have got a currency in "CHF".
    System SRM : SRM 5.5
    System ECC : 5.0
    The scenario for approval shopping cart is automatic, the workflow WS1000060 is active.
    Can you help me please, thanks very much.
    Lionel

    Hi Sambit,
    Yes I found the solution.
    You must implemente this BADI BBP_CREATE_BE_RQ_NEW with method FILL_RQ_INTERFACE. 
    You can see my code :
    METHOD if_ex_bbp_create_be_rq_new~fill_rq_interface.
      DATA : wa_requisition_items TYPE bbps_badi_rq_item,
             wa_item TYPE bbp_pds_transfer_item,
             w_tabix TYPE sy-tabix,
             w_check.
      LOOP AT cs_rq_document-it_requisition_items INTO wa_requisition_items.
        w_tabix = sy-tabix.
        READ TABLE is_sc_document-item INDEX w_tabix INTO wa_item.
        IF wa_requisition_items-currency NE wa_item-currency.
          wa_requisition_items-currency = wa_item-currency.
          wa_requisition_items-c_amt_bapi = wa_item-gross_price.
        ENDIF.                                               
        MODIFY cs_rq_document-it_requisition_items FROM wa_requisition_items INDEX w_tabix.
        CLEAR : wa_requisition_items,
                wa_item.
      ENDLOOP.
    ENDMETHOD.
    I hope that will help you.
    Kind regards.
    Lionel
    Edited by: Lionel Lacotte on Jun 24, 2008 2:22 PM

  • 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 depreciation area (Incorrect currency exchange rate is used)

    Good day to all SDN forumers!
    I'm having a problem with one depreciation area that we set up. The reason why we configured this depreciation area is for us to enable to monitor all asset postings in another (group) currency aside from the local currency. We set it up in such a way that the depreciation would not post and would thus only "convert" the asset postings to group currency using the table rates in table TCURR (via OB08).
    The problem is despite having defined an exchange rate for the current period, the system still picks up the exchange rate for 01/01/2001 which is incorrect. This affected all reports which displays incorrect values whenever I view the postings using the 2nd depreciation area we set up. Is there a way we can correct this?
    I'd really appreciate your comments and suggestions guys. Thanks a lot and more power!

    Update:
    I created a new depreciation area by copying an existing area and updated some of the configuration. The problem is still there though, since the depreciation area still reflects the <b>incorrect</b> rate (similar to that of the previous depreciation area) whenever I access it using Asset Explorer. What's surprising is that even though I've already set the exchange rate (e.g. USD to EUR)  to match that of the asset's capitalization / acquisition date, the posted values still do not reflect what I defined in table TCURR. Instead, it reflects the exchange rate used by the old depreciation area. Help anyone? We are already in a production client and transfer/retirement of all the assets is not an option the client would like to undertake.
    Edited by: Patrick on Nov 6, 2008 4:45 AM

  • 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 JPY and KRW currency in PDf printing

    Hello,
    we are printing the PDF account statement. Till today for KRW and JPY currencies, if the value is 30000 ( I mean more than 3 digits ), then it is printing as 30 000 ( space as seperator ). But we have tried to post a document and checked it for the value 300. in the output PDF, it is printing 300,00 which is wrong.
    It should print as 300 only as this dont have any decimals ( from TCURX table). I have declared the amount variable as char16. Because I had other requirement where I need to print space as thousand seperator and comma as decimal seperator ( eg: 1 221,85 ). Now everything is printing fine except for JPY and KRW currencies amounts.
    I understood that this problem is occuring only when the amount for JPY or KRW currency is less than or equal to 3 digits.
    I have checked some of the posts and gone through the some of the OSS notes, but i couldnot the exact one which could solve my issue.
    Can anyone please help me in fixing this issue ?
    Thanks in advance..!!!
    Best regards,
    Karthik.

    Hello Karthik
    You can explicitly multiply the amount by 100 for JPY KRW currency and display the rounded figure (use function trunc)
    Have you tried using FM FM  BAPI_CURRENCY_CONV_TO_EXTERNAL to format the currency amount.
    Regards
    Sandy

  • 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 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 format mask and currency

    Hi,
    I am trying to apply a format mask to a report column.
    I want my format to be: 4500 ==> $4,500.00
    I have tried to apply: FML999G999G999G999G990D00, and i get #4,500.00
    Do i have to set a currency parameter somewhere for this format mask to work?
    I have done a select * from nls_database_parameters:
    NLS_LANGUAGE AMERICAN
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET US7ASCII
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    Thanks in advance,
    Immanuel

    Immanuel,
    Here's what I believe is going on:
    1) Your database character set is US7ASCII. US7ASCII cannot store a '£' character.
    2) Although the real NLS_CURRENCY symbol for NLS_TERRITORY UNITED KINGDOM is '£', it's displaying a converted character of '#', due to the above reason.
    3) The currency symbol from the format mask is determined by your NLS_TERRITORY (and hence, your NLS_CURRENCY) settings for the session.
    4) Your application is most likely setup to run with an application primary language of English United Kingdom. Thus, your application will always set NLS_TERRITORY to UNITED KINGDOM.
    To get your desired result, either:
    1) Change your application primary language to en-us
    or simpler yet
    2) Hard-code the $ sign in your format mask.
    Joel

Maybe you are looking for

  • Ipod Not Being Reconized On Itunes

    I got the new ipod nano last week and ever since i have been trying to connect it to my computer, everytime i add it to my computer , itunes just stay the same, i downloaded the new itunes and it still just stayed the same, i then got another new ipo

  • Automatic Creation of TO

    Hi Friends , I wanted to create TO immediately (fully automatic) at the time of IM document posting without any user intervention. The settings I made are ... 1) In OMLR ( Transaction where we assign Reference Mtype to WM Mtype) , I marked the flag "

  • Why I am losing aspects of the PDF after replacing pages?

    Hi, I am using Adobe Acrobat 9 Pro with Windows 7, and I want to replace certain pages in one PDF with certain pages from another PDF. The pages are replaced, but anything that was added with the typewriter is lost in the pages I'm replacing. In othe

  • Problem with LSMW ?

    Hi all, i have a dought regarding can we use <b>Batch session</b> and <b>call transaction</b> methods in LSMW ?

  • Losing Session for Weblogic 7.0.2 in Cluster env

              PROBLEM: We are losing our session when running in our app in a clustered environment.           The user can use the app for a while, but then weird stuff starts happening. In           some cases, the login check that we do at the beginin