11-01-2007 12:22 PM
hi everyone,
can anybody tell me the difference between
Field <MODULENAME> ON INPUT
AND
Field <MODULENAME> ON REQUEST
?
More details plz.
11-01-2007 12:25 PM
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.
11-01-2007 12:25 PM
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.
11-01-2007 12:31 PM
i am sorry vasu ,this article i had read already....
but i think this is not enough .
11-01-2007 12:42 PM
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
11-02-2007 12:19 AM
thanks , points to u .
but i want to know more about it
can anyone else can give me some suggestion?
11-02-2007 12:37 AM
check below sap link for details
http://help.sap.com/saphelp_46c/helpdata/EN/9f/dbabbd35c111d1829f0000e829fbfe/frameset.htm
Regards,
Atish