Application Development and Automation 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: 
Read only

Error in Input

Former Member
0 Likes
912

Hi,

When iam passing the values to the input field it is given the following error.

Input should be in the form IO1_________.

This is my program.

MODULE USER_COMMAND_9001 INPUT.

CASE SY-UCOMM.

WHEN 'ADD'.

IO3 = IO1 + IO2.

WHEN 'SUBTRACT'.

IO3 = IO1 - IO2.

WHEN 'MULTIPLY'.

IO3 = IO1 * IO2.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_9001 INPUT

&----


& Include MZZILMPP3TOP Module poo

*& *

&----


PROGRAM SAPMZZILMPP3 .

DATA:

IO1 TYPE I,

IO2 TYPE I,

IO3 TYPE I.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_9001.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_9001.

Please let me know where is the error.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
705

I think you are commenting PAI event

uncomment it.

4 REPLIES 4
Read only

Former Member
0 Likes
706

I think you are commenting PAI event

uncomment it.

Read only

0 Likes
705

Hi,

I am not commenting PAI.

But when iam creating the screen, I had kept the text as _IO1. Because it is giving the message saying the I\O fields should have underscore.

Is it the cause of error?

Thanks.

Read only

0 Likes
705

Ram,

Text fields provide labels for other elements. Text labels (sometimes called keywords) are display-only elements: neither the user nor the ABAP program can modify them at runtime. Text elements appear in a fixed position on the screen.

Text elements can also include literals, lines, icons, and other static elements. They can include all alphanumeric characters. However, you cannot begin a text with an _ (underscore) or a ? (question mark). (question mark). If you use a text to label a radio button or checkbox, the text must have the same element name as the element it labels.

If the text consists of several words, join the words together with underscores. The underscores allow the system to recognize the words as a unit. They are replaced by spaces at runtime.

Input/Output Fields

Input/output fields are sometimes called templates. You use them for entering and displaying data. To define the size of an entry element, enter underscore characters in the Text field as follows:

You can also use any other characters to format your template. For numeric values, you can define a comma (,) as the separator and a period (.) as the decimal point. As the last character of the template, you can set a V as place holder for signs.

Input/Output fields have no text labels. To assign a label to one, place a text field next to it.

Input/output fields can have a maximum defined length of 255 characters. The visualized length is also a maximum of 255 characters.

check this link

http://help.sap.com/saphelp_47x200/helpdata/en/d1/801c2d454211d189710000e8322d00/frameset.htm

Read only

Former Member
0 Likes
705

hi...

i think dis error is related to the screen layout.

plz chk how u hav defined the screen field names...

is it matching with how u hav defined ....

reward pts if useful

regards

winnie