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: 

How to validate input in Modulepool program

Former Member
0 Kudos

Hi Dears,

I have screen 200. For one of the input field when it has the value coming by default with 'S' i need to allow only 'F' as input if user wants to change. If input is coming by default with 'F' I need to allow 'S' as input if user wants. How can I control this input in module pool programming.

Thanks,

4 REPLIES 4

Former Member
0 Kudos

PAI

field <fieldname> module check.

module check input.

if..condition

message e001...

or message w001...

endif.

endmodule

former_member188685
Active Contributor
0 Kudos

check the prgrams

demo_dynpro_value_select

demo_dynpro_field_chain

Former Member
0 Kudos

Your requirement is tricky.

Here I would suggest that you change the field to alist box and dynamically set the list values based on the currrent value.

if the current value is "S" or "F" then the list will have only these 2 values.

if it is something else, you can fill the list with the entire list of possible values.

Former Member
0 Kudos

hi

check this

in screen 200 pai

module check

if default = 'S'

use input value = 'F'

else.

message 'incorrect value '.

endif.

if default = 'F'

user input value 'S' .

else.

message 'incorrect value '.

endif.

endmodule.

if it is not usefull then plz make clear ur problem in brief

regards

anil