Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ALV input decimal throws "Enter a numeric value"

Former Member
0 Kudos

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 .

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

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

10 REPLIES 10

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

I tested it with both three values for parameter id SZG and SZN but it does not work. I used transaction SU3 to set the parameter before I execute my program but it still gives me the message.

There seems to be no error with the conversione exit. The error is thrown by the ALV itself.

0 Kudos

Could you replace REUSE_ALV_LIST_DISPLAY with REUSE_ALV_GRID_DISPLAY (temporary) so you could execute The Consistency Check, look for actual definition of the input field in field catalog (type, length, conversion-exit)

NB:You could also perform some test with SE37 on the FM CONVERSION_EXIT_TSTRN_INPUT and not with your program to insure that the format you expect is the correct one.

Regards,
Raymond

0 Kudos

I replaced the FM REUSE_ALV_LIST_DISPLAY with REUSE_ALV_GRID_DISPLAY and did some changes in the field catalog. It is working now, but I still don't know why the List FM does not work like the Grid.

0 Kudos

Did you revert back to LIST FM once field catalog adjusted ?

NB. Even if they share same history, those FM use now different technologies to display (and input) data so different behavior is not truly surprising.

Regards,

Raymond

0 Kudos

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

0 Kudos

Hi

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

Regards

Sumanta

0 Kudos

Yes, but it still gives me the message "Enter a numeric number"!

0 Kudos

HI Zirkel,

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

Best Regards

V@li

0 Kudos

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