Application Development and Automation 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: 
Read only

How to validate one module to another in module pool program ?

Former Member
0 Likes
682

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

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
648

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

4 REPLIES 4
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
648

Use chain .

field name module xx on input.

Inside this module you can do validation and if error then exit.

endchain.

Read only

christine_evans
Active Contributor
0 Likes
648

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.

Read only

MarcinPciak
Active Contributor
0 Likes
649

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

Read only

Former Member
0 Likes
648

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