‎2009 Jun 19 2:55 PM
Hi friends.
I written the validation codes in module pool program.
MODULE VALIDATE_PLANT.
MODULE VALIDATE_LGORT.
MODULE VALIDATE_UMLGO.
MODULE VALIDATE_MATNR.
Coding have no problems.
Whenever it is validating showing all messages at a time.
If wrong value , the message are showing .
But it also validating next module.
I want to brake of one module to another.
Till not enter one fields value it should not go to next module validation.
Please guide me.
Waiting your result.
Regards,
Subash
‎2009 Jun 19 3:19 PM
You have to use FIELD statement.
PROCESS AFTER INPUT.
FIELD plant_field MODULE VALIDATE_PLANT. "plant_field is name for screen field which you want to validate
FIELD lgort_field MODULE VALIDATE_LGORT.
...
Now, the validation will not go further until user enters correct value for prevoius one. So if wrong value in lgort, it will persisently return to this validation FIELD lgort_field VALIDATE_LGORT not allowing to proceed futher.
Regards
Marcin
‎2009 Jun 19 3:13 PM
Use chain .
field name module xx on input.
Inside this module you can do validation and if error then exit.
endchain.
‎2009 Jun 19 3:17 PM
Another option is to set an error flag variable, check this at the start of every module and exit the module if it is set.
‎2009 Jun 19 3:19 PM
You have to use FIELD statement.
PROCESS AFTER INPUT.
FIELD plant_field MODULE VALIDATE_PLANT. "plant_field is name for screen field which you want to validate
FIELD lgort_field MODULE VALIDATE_LGORT.
...
Now, the validation will not go further until user enters correct value for prevoius one. So if wrong value in lgort, it will persisently return to this validation FIELD lgort_field VALIDATE_LGORT not allowing to proceed futher.
Regards
Marcin
‎2009 Jun 19 3:27 PM
the two below two sample codes are used for validation but screen enableing is different..
check you are raising the Error message..if you pass Message type S or I it will execute rest of all
messages with sequence..
Try to use the message 'E' in each validate_field and try agian with your program i think it will work...
the below two ways needs error message in each validate_field ....
one way as below....
PROCESS AFTER INPUT.
FIELD plant_field MODULE VALIDATE_PLANT.
FIELD lgort_field MODULE VALIDATE_LGORT.
or
PROCESS AFTER INPUT.
CHAIN.
FIELD plant_field MODULE VALIDATE_PLANT.
FIELD lgort_field MODULE VALIDATE_LGORT.
ENDCHAIN.
Prabhudas