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: 

A problem about FIELD ON INPUT and FIELD ON REQUEST

Former Member
0 Kudos

hi everyone,

can anybody tell me the difference between

Field <MODULENAME> ON INPUT

AND

Field <MODULENAME> ON REQUEST

?

More details plz.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can ensure that a PAI module is only called when a

certain condition applies by using the following

statement:

<b>FIELD <f> MODULE <mod> ON INPUT|REQUEST|*-INPUT.</b>

The additions have the following effects:

<b>ON INPUT</b>

The ABAP module is called only if the field contains a

value other than its initial value. This initial value is

determined by the data type of the field: Space for

character fields, zero for numeric fields. Even if the

user enters the initial value of the screen as the

initial value, the module is not called. (ON REQUEST, on

the other hand, does trigger the call in this case.)

<b>ON REQUEST</b>

The module <mod> is only called if the user has entered

something in the field. This includes cases when the user

overwrites an existing value with the same value, or

explicitly enters the initial value.

In general, the <b>ON REQUEST</b> condition is triggered

through any form of "manual input". As well as user

input, the following additional methods of entering

values also call the module:

The element attribute PARAMETER-ID (SPA/GPA parameters).

The element attribute HOLD DATA

CALL TRANSACTION ... USING

Automatic settings of particular global fields

ON *-INPUT

The ABAP module is called if the user has entered a "*"

in the first character of the field, and the field has

the attribute *-entry in the Screen Painter. When the

input field is passed to the program, the * is removed. *

behaves like an initial field in the ON INPUT condition.

5 REPLIES 5

Former Member
0 Kudos

You can ensure that a PAI module is only called when a

certain condition applies by using the following

statement:

<b>FIELD <f> MODULE <mod> ON INPUT|REQUEST|*-INPUT.</b>

The additions have the following effects:

<b>ON INPUT</b>

The ABAP module is called only if the field contains a

value other than its initial value. This initial value is

determined by the data type of the field: Space for

character fields, zero for numeric fields. Even if the

user enters the initial value of the screen as the

initial value, the module is not called. (ON REQUEST, on

the other hand, does trigger the call in this case.)

<b>ON REQUEST</b>

The module <mod> is only called if the user has entered

something in the field. This includes cases when the user

overwrites an existing value with the same value, or

explicitly enters the initial value.

In general, the <b>ON REQUEST</b> condition is triggered

through any form of "manual input". As well as user

input, the following additional methods of entering

values also call the module:

The element attribute PARAMETER-ID (SPA/GPA parameters).

The element attribute HOLD DATA

CALL TRANSACTION ... USING

Automatic settings of particular global fields

ON *-INPUT

The ABAP module is called if the user has entered a "*"

in the first character of the field, and the field has

the attribute *-entry in the Screen Painter. When the

input field is passed to the program, the * is removed. *

behaves like an initial field in the ON INPUT condition.

0 Kudos

i am sorry vasu ,this article i had read already....

but i think this is not enough .

0 Kudos

ON REQUEST : This is simply used to validate if user enters anything.

This traps user action.

<b> This is mostly used for validation and in cases if you want to populate some other field on the screen based on the input.</b>

As mentioned, this get's triggered at all times when user does something on the field. If they don't do anything to the field nothing get's executed.

ON INPUT : On input on the other hand is called every time there is a value in the field.

Even if user has not entered anything on his own. Now this a good thing since on a screen if you want to <b> initialize </b> some value of other fields based on value in this field you can do that.

Hope this gives you some idea.

Regards

Nishant

0 Kudos

thanks , points to u .

but i want to know more about it

can anyone else can give me some suggestion?

0 Kudos