Skip to Content
avatar image
Former Member

SAP ALV input decimal throws "Enter a numeric value"

Hi,

I have an ALV with a editable column of type decimal with the domain TSTRDURAN. The documentation of domain TSTRDURAN gives me the following information: Time stream: Duration in hhhhhhh:mm:ss / external hhhhhhh:mm


So I want to enter data in this format with ":" (colon), but then I get the information message: "Enter a numeric value". There's a conversion exit in the domain so why is it not called automatically? Do I need to set something in my field catalogue?

Just entering a decimal number with a comma is not an option.

I am using the function module REUSE_ALV_LIST_DISPLAY .

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 13, 2015 at 02:35 PM

    Check value of parameter id "SZG",  try to set its value to "1" ,"2" or "3" (thru transaction "SU3", tab "Parameters") til you are able to input field in required format (Perform the input test with transaction "SE37" and FM "CONVERSION_EXIT_TSTRN_INPUT").

    Once successful, you could add a SET PARAMETER ID before calling the old Reuse FM.

    Regards,

    Raymond

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raymond Giuseppi

      Yes, but it doesn't work with the LIST FM.

      My changes are:

           - set EDIT flag to 'X', only INPUT flag doesn't work for the GRID FM

           - set import parameter I_GRID_SETTINGS of GRID FM with value L_GLAY-edt_cll_cb = 'X'. Type LVC_S_GLAY

           - change FM from LIST to GRID

  • avatar image
    Former Member
    Jan 14, 2015 at 04:05 PM

    Hi,

    Please  refer the test program I have just written...

    REPORT  ZSPGPRODT.

    type-pools: slis.

    types: begin of ty_data,

       fld1 type SPGPRODT,

       fld2 type SPGPRODT,

       end of ty_data.

      data w_data type ty_data.

      data i_data type standard table of ty_data.

      data i_fcat type SLIS_T_FIELDCAT_ALV.

      data w_fcat type slis_fieldcat_alv.

       start-of-selection.

       w_data-fld1 = 103000.

       w_data-fld2 = 123000.

    *  w_data-fld1 = '12,300'.

    *  w_data-fld2 = '10,300'.

       append w_data to i_data.

    w_fcat-col_pos = 1.

    w_fcat-fieldname = 'FLD1'.

    w_fcat-input = 'X'.

    w_fcat-edit = 'X'.

    append w_fcat to i_fcat.

    w_fcat-col_pos = 2.

    w_fcat-fieldname = 'FLD2'.

    w_fcat-input = 'X'.

    w_fcat-edit = 'X'.

    append w_fcat to i_fcat.

       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

        EXPORTING

    *     I_INTERFACE_CHECK                 = ' '

    *     I_BYPASSING_BUFFER                = ' '

    *     I_BUFFER_ACTIVE                   = ' '

          I_CALLBACK_PROGRAM                = sy-repid

    *     I_CALLBACK_PF_STATUS_SET          = ' '

    *     I_CALLBACK_USER_COMMAND           = ' '

    *     I_CALLBACK_TOP_OF_PAGE            = ' '

    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '

    *     I_CALLBACK_HTML_END_OF_LIST       = ' '

    *     I_STRUCTURE_NAME                  =

    *     I_BACKGROUND_ID                   = ' '

    *     I_GRID_TITLE                      =

    *     I_GRID_SETTINGS                   =

    *     IS_LAYOUT                         =

          IT_FIELDCAT                       = i_fcat

    *     IT_EXCLUDING                      =

    *     IT_SPECIAL_GROUPS                 =

    *     IT_SORT                           =

    *     IT_FILTER                         =

    *     IS_SEL_HIDE                       =

    *     I_DEFAULT                         = 'X'

    *     I_SAVE                            = ' '

    *     IS_VARIANT                        =

    *     IT_EVENTS                         =

    *     IT_EVENT_EXIT                     =

    *     IS_PRINT                          =

    *     IS_REPREP_ID                      =

    *     I_SCREEN_START_COLUMN             = 0

    *     I_SCREEN_START_LINE               = 0

    *     I_SCREEN_END_COLUMN               = 0

    *     I_SCREEN_END_LINE                 = 0

    *     I_HTML_HEIGHT_TOP                 = 0

    *     I_HTML_HEIGHT_END                 = 0

    *     IT_ALV_GRAPHICS                   =

    *     IT_HYPERLINK                      =

    *     IT_ADD_FIELDCAT                   =

    *     IT_EXCEPT_QINFO                   =

    *     IR_SALV_FULLSCREEN_ADAPTER        =

    *   IMPORTING

    *     E_EXIT_CAUSED_BY_CALLER           =

    *     ES_EXIT_CAUSED_BY_USER            =

         TABLES

           t_outtab                          = i_data

        EXCEPTIONS

          PROGRAM_ERROR                     = 1

          OTHERS                            = 2

                 .

       IF sy-subrc <> 0.

    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

       ENDIF.

    The below format is important because domain TSTRDURAN is of  type DEC.

       w_data-fld1 = 103000.

       w_data-fld2 = 123000.


    The output is..

    Hope this helps..

    Regards

    Sumanta

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 14, 2015 at 01:50 PM

    Hi

    Have you tried the edit_mask option in fieldcatalog. This will allow you fix your output pattern.Hope this helps.

    Regards

    Sumanta

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 14, 2015 at 02:49 PM

    HI Zirkel,

    we have any option in type group  slis_event_exit u can find in that.

    Best Regards

    V@li

    Add comment
    10|10000 characters needed characters exceeded