Skip to Content
H S

Entry is too long for the field - Message no. 00092

I am trying to make a simple screen with 2 Input/Output Fields and One Button. Here is the full code :

*&---------------------------------------------------------------------*
*& Module Pool       ZABAP_PRACTICE2_MODULE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

PROGRAM zabap_practice2_module.
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0101  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
DATA : v_matnr TYPE matnr,
       v_spras TYPE spras,
       v_maktx TYPE maktx.

DATA ok_code TYPE sy-ucomm.

MODULE user_command_0101 INPUT.
  CASE OK_CODE.
    WHEN 'SUBMIT'.
      CLEAR ok_code.
      SELECT SINGLE maktx FROM makt INTO v_maktx WHERE matnr EQ v_matnr AND spras EQ 'E'.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0101  INPUT
*&---------------------------------------------------------------------*
*&      Module  STATUS_0101  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0101 OUTPUT.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_0101  OUTPUT

When I try to press SUBMIT after entering 100-100 or 100-600 I got the error that "Entry is too long for the field". I am unable to understand why I am getting this. Read somewhere that a new user has to be created to remove this error. Screenshots attached.1.jpg

1.jpg (52.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 03, 2020 at 11:16 AM

    Hello H S,

    I suppose the data type of MATXT Value fetched from MAKT table is the issue. Its actually CHAR 40 in table but here for V_MAKTX you have given definite length as 25 also you have not linked to the dictionary.

    For the screen element V_MAKTX recommend you to fetch the field from MAKT table using Tool Tip which fetch fields from data base table or check the Box "FROM DICT" in attributes section as shown below.

    Ensure both the screen fields are consistent with database.

    Regards!


    scn.png (7.1 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Hello H S,

      Yes the error is right because there is no field in data dictionary with that name. Recommend you to do the below steps in sequence.

      1) Delete all the present screen elements first, now recreate your entire screen as per the below instructions.

      2) Reach out to the screen layout, do below steps in same sequence as described below with reference to attached image.

      a) Click on the icon "Dictionary/Program Field" (Marked in RED Below).

      b) Now Enter the table field name as MAKT (Marked in Orange Below)

      c) Click on "Get From Dictionary" option (Marked in Blue Below)

      d) Finally select the fields from the left pane (Marked in Green Below)

      3) Once the fields are selected, click continue. Now you will have the place the fields in the screen. After this all the properties from the database would have been assigned to the fields directly.

      4) Declare the screen field names in your program and use them across.

      Hope it helps!

      Regards!

      scn.png (107.7 kB)

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.