thespot4sap.com independent sap information
 

New - get SAP Access - pay monthly

SAP Tutorials    Online SAP Training    SAP CBT's    Forums    SAP Articles    SAP Jobs    Resumes
  SAP Access    SAP Blogs    SAP Books     Links     Vendor Directory     Submit Content    Search

New Page 1

Previous Page

Next Page

Designing SAP Transactions
Example - Validating Fields

Page 11 of 13

Validating Fields

Now we will write the code for validating each field of the screen 200. 

Module check_name.

  Perform validate_name.

endmodule.

 

Form validate_name.

    If not ztryemp-name co c_alphabet.

     Message e999(z1) with text-005.

  Endif.

Endform.

 

Module check_phone.

  Perform validate_phone.

endmodule.

 

Form validate_phone.

  If not ztryemp-phone co c_digits.

     Message e999(z1) with text-006.

Endform.

 

Module check_basic.

  Perform validate_basic.

endmodule.

 

Form validate_basic.

  If ztrytxn-basic le c_0.

     Message e999(z1) with text-007.

  Endif.

Endform.

 

As we use various variables and constants in our code, double click them to create their declarations in the top include of the transaction, i.e MZTRYTOP. Finally this top include will look something like ...

Next Page

Previous Page

 

New Page 1

 

 


About Us   Contact Us   Privacy   Disclaimer   Feedback   Email Discussion   Newsletter  

Copyright © - Independent SAP Information
Partners: Learn XML, SAPdox, Worldwide Guesthouses and B&B's