‎2006 Dec 26 1:05 PM
Hi experts!
Can you answer me one question?
My code in the PAI:
FIELD field MODULE on_change ON INPUT.Module on_change:
MODULE on_change INPUT.
MESSAGE 'The field FIELD is not empty' TYPE 'I'.
ENDMODULE.The code in this module is performed each time in the PAI. But it has to be performed only if the FIELD is not empty! What is my problem?
Declaration of the FIELD:
DATA field TYPE stringRegards,
Pavel Aleshko
‎2006 Dec 26 1:09 PM
Module on_change:
MODULE on_change INPUT.
<b>if field NE space.</b>
MESSAGE 'The field FIELD is not empty' TYPE 'I'.
<b>endif.</b>
ENDMODULE.
‎2006 Dec 26 1:09 PM
Module on_change:
MODULE on_change INPUT.
<b>if field NE space.</b>
MESSAGE 'The field FIELD is not empty' TYPE 'I'.
<b>endif.</b>
ENDMODULE.
‎2006 Dec 26 1:36 PM
Thanks for the answer.
But I don't understand this quote from the help then.
<i>"Addition 1 ... ON INPUT
Effect: With this condition, module mod is called only if the screen field dynp_field is not empty."</i>
So this module hasn't to be performed cause field is empty! What is wrong?
Regards,
Pavel Aleshko
‎2006 Dec 27 4:32 AM
yes on input only fires if you give any input to the field. i.e. not empty.
on request you can use it will fire when you are changing any entry .
if you dont want that just ommit that on input or on request from your
FIELD field MODULE on_change ON INPUT
i.e
FIELD field MODULE on_change.
it will fire for the field every time in pai for that field
regards
shiba dutta
‎2006 Dec 27 11:31 AM
> yes on input only fires if you give any input to the
> field. i.e. not empty.
Hi shiba dutta.
That is the problem. If you write this code it will always perform the module <b>on_change</b> even if <b>field</b> is empty.
Code in the program:
DATA field TYPE string
MODULE on_change INPUT.
MESSAGE 'The field FIELD is not empty' TYPE 'I'.
ENDMODULE.Code in the screen flow logic:
FIELD field MODULE on_change ON INPUT.Do you have any idea why this module is always performed?
Points will be awarded!
Regards,
Pavel Aleshko
‎2007 Nov 27 4:07 AM
Can I know how you create ->
DATA field TYPE stringin screen painter?
Do you use Input/Output Fields(Textbox)?
‎2007 Nov 27 3:13 PM
Hi,
Field <field name> module <module name> is triggered when ever the field has non initial value. To trigger only when its value is changed, you have to write field <fieldname> module <module name> on request.
You write in the pai of flow logic
field <fieldname> module <module name> on request.
In se38 in the module block
if not <fieldname> is initial.
error message.
endif.
Then this is triggered only when it is changed and is non initial.
warm regards,
kamala.