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;

Similar Messages

  • Problem with Item Validation

    Hello,
    I am running an advanced tutorial: http://download.oracle.com/docs/cd/E14373_01/appdev.32/e13363/issue_track_ui.htm#BGBJCGIC
    and I have a problem with item Validation.
    Tutorial offers the following:
    You must manually create another validation to ensure that the Actual End Date is the same or later then the Start Date.
    To add a validation for the Actual End Date:
    1.Under Page Processing, Validations, click the Create icon.
    2.For Level, accept the default, Item level validation, and click Next.
    3.For Item, select Project Details: 50.P3_ACTUAL_END_DATE (Actual End Date) and click Next.
    4.For Validation Method:
    a.Select PL/SQL and click Next.
    b.Accept the default, PL/SQL Expression and click Next.
    5.For Sequence and Name:
    a.Sequence - Enter 50.
    b.Validation Name - Enter P3_END_AFTER_START.
    c.Accept the remaining defaults and click Next.
    6.For Validation:
    a.Validation - Enter:
    to_date(:P3_ACTUAL_END_DATE,:APP_DATE_FORMAT) >= to_date
    (:P3_START_DATE,:APP_DATE_FORMAT)
    b.Error Message - Enter:
    Actual End Date must be same or after Start Date.
    c.Click Next.
    7.For Conditions:
    a.Condition Type - Select Value of Item in Expression 1 is NOT NULL
    b.Expression 1 - Enter P3_ACTUAL_END_DATE
    8.Click Create.
    Is there a mistake in explanation? I did it 3 times already, very carefully! I ran the page, entered the date, which is After the Start date, and get the error message: Actual End Date must be same or After Start Date!!
    Thank you for your consideration...

    I got it solved. I don't know if this is documented(or a bug) but what I did was declare an exception and then raise it and put the form_trigger_failure into the exception handler rather than raise form_trigger_failure in the body.
    declare
    alreadyExists exception;
    begin
    -- select .....
    raise alreadyExists;
    exception
    when alreadyExists then
    message('.....exists');
    raise form_trigger_failure
    end;

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

    The enclosed trivial sample illustrates a problem I'm experiencing with validating dates
    The date field is initialized when the form opens.
    Once the form is open,  click the button and a popup appears saying there is a validation problem with the date field. Yet if the date is selected with the date selection widget the appearance is exactly the same, but without the validation problem. What's going on?

    OK, I've solved this, but I am hoping some kind person can tell me why I solved it.
    On the trivial form I enclosed before before, the "click" script used to say
    xfa.forms.recalculate(1);
    Now I've changed it to
    xfa.forms.recalculate (0);
    And I no longer see the undesired date validtion errors when I click the button. (See updated enclosure on this post).
    The difference is supposed to be that, if the parameter is 0 (or false) then only "pending" calculation scripts are fired, and if 1 (or true) then all calculation scripts are fired. So what does it mean to my DateTime field having unjust validation errors? The DateTime field has no calculation script, only an iitialize script.

  • 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

  • Help with certficates - problems with CSSMERR_TP_NOT_TRUSTED & validating

    I'm having problems with my machine, and it appears to be a certificate problem. The problems first started showing up with codesigning and when trying to re-install XCode. I've been trying to understand things through keychain, but I don't know if what I'm seeing is normal or not.
    I've got two copies of Apple Root CA and Apple Root Certificate Authority in my keychains (one of each in "System", one of each in "System Roots"). I have no idea if that is normal or if that part of the problem. These all show up with "This root certificate is not trusted". I'm assuming that's OK, maybe that's part of the problem? (They are all have trust set to "use system defaults").
    The Apple Worldwide Developer Relations intermediate certificate that I download from Apple doesn't appear to find or trust the Apple Root CA (in keychain, the AWWDR shows "This certificate was signed by an unknown authority, and keychain "evaluate" doesn't find a root certificate, even though Apple Root CA is in the keychain).
    Note that the AWWDR certificate says that it's issuer was Apple Root CA, serial number 25, version 3, but the Apple Root CA certificate says that it's serial number 2, version 3. I'm not sure if that makes any difference.
    The big problem is that because of what I believe to be certificate problems, I'm getting the CSSMERRTP_NOTTRUSTED error reported when I try to codesign or even when I try to install the iPhone SDK.
    I did have my motherboard replaced a couple of months back, but things were working just fine (including codesigning) after that, and suddenly stopped working (I don't know when, I just know that I noticed the problem around Oct 12).
    For what it's worth, the error when trying to install XCode (with iPhone SDK) is:
    10/16/10 12:20:02 PM Installer[1582] Failed install preflight: Error Domain=PKInstallErrorDomain Code=102 UserInfo=0x19dd99d0 "The package “iPhoneSDKTools.pkg” is untrusted." Underlying Error=(Error Domain=NSOSStatusErrorDomain Code=-2147409622 UserInfo=0x1aa22360 "The operation couldn’t be completed. CSSMERRTP_NOTTRUSTED")

    Reinstalling Snow Leopard from the original DVD seems to have cleared up the problem. My Apple Root CA certificate now shows "valid".

  • Problem with XSD validation in Java 5

    Hi everyone,
    my application creates in memory schema using JDOM. In Java 6 validation runs fine, but in Java 5 (which is the target platform currently) it fails.
    I tried a second test with just parsing an existing XSD document (not created using JDOM) and that works.
    The textual representation of both (file and JDOM generated) are identical. If I replace the XSD file with the JDOM output, the "file test" runs fine, too.
    Here's the test code:
        protected void assertXsdValid(Source xsdSource, InputSource xmlInputSource) throws SAXException, ParserConfigurationException, IOException {
            isValid = true;
            SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
            sf.setErrorHandler(myErrorHandler);
            Schema schema = sf.newSchema(xsdSource); // <<--------- THIS LINE FAILS IN JAVA 5
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            dbf.setSchema(schema);
            DocumentBuilder db = dbf.newDocumentBuilder();
            db.setErrorHandler(myErrorHandler);
            db.parse(xmlInputSource);
            assertTrue(isValid);
        }This is the XSD:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://some.org/metamodel" elementFormDefault="qualified">
      <xs:element name="system">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="name" type="xs:string" />
            <xs:element name="vendor" type="xs:string" />
            <xs:element name="version" type="xs:decimal" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>This is the error message I get:
    ERROR: org.xml.sax.SAXParseException: s4s-att-invalid-value: Invalid attribute value for 'type' in element 'element'. Recorded reason: UndeclaredPrefix: Cannot resolve 'xs:string' as a QName: the prefix 'xs' is not declared.
    This is how I call the test code in the JDOM test:
            assertXsdValid(new JDOMSource(xsdDoc), new JDOMSource(xmlDoc).getInputSource());If I change the code to parsing not the JDOMSource, but a StreamSource reading the textual representation of the XSD, it works fine!
            assertXsdValid(new StreamSource(new ByteArrayInputStream(new XMLOutputter().outputString(xsdDoc).getBytes())), new JDOMSource(xmlDoc).getInputSource());But this is not what I want (I expect suboptimal performance with large XSD documents). So, if it works with Java 6, then why doesn't it work with Java 5?
    How can I use the Java 6 JAXP in Java 5?
    Thank you.

    A new user name?
    I can think of ways round your problem but can you first provide a reference that indicates that byte 0x80 is the MS936 encoding for the Euro?
    P.S. This is a forum and the vast majority of participants, including me, have no direct relationship with Oracle so getting definitive answers from Oracle via this forum is unlikely. If you think you have found a bug in 1.5 and/or 1.6, and I am not convinced you have, you need to report it via the bug database. If it is a bug then the response time for a fix is likely to be months rather than days.
    P.P.S No I can't explain why it works in 1.7!

  • Problem with custom validated data types using domain on 11g

    Hi,
    I ' m on a migration process from 10 to 11 and I notice that a custom domain didn't work correctly anymore
    to be more specific every time that I was submiting a page a was getting an error cannot convert from myclass to oracle.jbo.domain.String
    I search the forum and I saw a similar problem
    Cannot convert type class java.lang.String to class oracle.jbo.domain.Clob
    at which Frank says that it is a known bug and suggests a work around.
    I use the workaround and it worked but some more issues came up:
    1. If the validation fails I get the error that I throw at the validate method not in a popup with just my message
    but in the whole window with the whole error stack, meaning that my custom validation is not handled like native ADF validation errors by
    the framework (at 10.1.3.4 worked OK)
    2 If i dont give a value at the attribute in the validation phase mdata variable is not null but is length is zero (at 10.1.3.4 its value was null)
    public class AFM implements DomainInterface, Serializable {
    public AFM(String val) {
    mData = new String(val);
    validate();
    private String mData;
    protected void validate() {
    // ### Implement custom domain validation logic here. ###
    mData==null // returns false
    mData.length()==0 // returns true
    3. Can i force validation only for new or updated values? I saw that the validation process is taking place every time a row is fetched.
    This is not only a performance issue, the bigger problem is that if a fetched from the DB value fails the validation an error is return but the
    user cannot change the value to correct it.
    TIA
    Tilemahos

    since i don't get any answer I wonder if i should have use a more provocative title like
    "custom domains in 11g don't work"
    is it true?
    Tilemahos

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

  • Problems with the Validator

    Hi,
    I have a
    <h:command_hyperlink label="DataList" commandName="showList" actionRef="Bean.showDataListAction"/>
    and some late in the Code a <h:form .....> with some text fields using the custom validator. The value will be requaed for this text fields.
    The validator should only be invoked after the form submition.
    But it will be invoked every time that i click on the link, becouse the fields are empty.
    Goes every action from the JSP that have some fields to validate over the Validator?
    How can I obviate it?
    Thanks
    Viktoria Tokaev

    Hi Viktoria,
    I had that problem too. See what I wrote in following thread:
    http://forum.java.sun.com/thread.jsp?forum=427&thread=445506&message=2014319#2014319
    Greetings,
    Rene

  • [CS3] Publish problem with no valid HTML templates

    Hi,
    I have a project file which I have publish numerous times
    before without problems. It has come to finally publishing it for
    the last time and when I go to publish an error messages comes up
    saying...
    "no valid HTML templates are avaliable to complete this
    operation".
    I have reinstalled the app again but still getting the
    problem.
    Any ideas...

    I get to the point where you select Publish Settings in the
    file menu but then it comes up with the error message...

Maybe you are looking for

  • Can't log in to Behance / Old CC ID still in use?

    Since Adobe linked CC and Behance, it appears i can't log in to Behance. This is because i need to log in with my CC ID. I joined Behance long before subscribing to CC, and when i did subscribe to CC, it was under a particular ID/email. During the la

  • Safari 4.1.3 crashes on launch with System 10.4.11

    Everytime I try to launch Safari, it crashes immediately.  Does anyone know why?  Here's my report. Many thanks to anyone who can help! Date/Time:  2012-11-15 20:41:19.992 -0800 OS Version: 10.4.11 (Build 8S2167) Report Version: 4 Command: Safari Pat

  • IN NEED OF DEVELOPMENT FIRM

    Hello, I'm in need of an excellent software development firm to help me get a web application to market in the next 6 months. Cirrus knowledge/experience is a very big plus. Please feel free to contact me directly if you know of anyone or are a devel

  • Problem with installing quicktime

    Ok I downloaded quicktime for windows and installed it but when it gets to the end of installation it reboots my pc and doesn't finish the install. And when I log back in I get the message from windows that there was a serious error or w/e. And it sh

  • REGEXP_SUBSTR in where clause

    select * from abc; COL -xxx 999 yyyy123 03112X 123:1 34455 3456xyc xxx234 xxxxxx 7 rows selected. select REGEXP_SUBSTR ( col            , '[0-9]+' from abc; REGEXP_SUBSTR(CO 999 03112 123 34455 3456 234 select * from abc where col = REGEXP_SUBSTR ( c