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: 

Regarding validation of table fields

Former Member
0 Kudos

Hi,

I have created a Table <b>TABLE1</b>.

In that for some fields i need to do validation like below:.

1. For Field <b>FIELD4</b> i need it to Defaulted to '<b>$</b>' whenever an entry is created in this table.

2. For field <b>FIELD6</b> i need to increment every time by 10.

3. For field <b>FIELD7</b> i need to validate with some Z-Table 2-field(s).

I need to do these validations.

How can i do them!

Can anybody solve this issue!

How can i write these validations for above fields in table!

Thanks,

Deep.

5 REPLIES 5

Former Member
0 Kudos

Hi

It depends on how you fill that table, by a dialog program or SM30?

If you've generated the maitenance program for SM30 you need to you the event, here you can create some routine to do your validation.

If you've created an your own program u need to insert your validations in PAI

Max

0 Kudos

Hi,

I have created Table maintenance for this table.

Then how can i do these validations!

Thanks,

Deep.

Former Member
0 Kudos

see this link of screen shot and implement the event for your validation ....

<a href="http://">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc</a>

or

<a href="http://">/people/sudheer.cheedella/blog/2006/02/20/extracting-data-in-table-maintenance

reward points if it is usefull ....

Girish

Former Member
0 Kudos

Hi Deep,

You can write your validation code in the PAI event. Goto to table maintainence generator and in that double click on the screen you want to validate and in the flow logic under PAI type "Module validation.". Now double click and create the module which will be created under the standard PAI event write your validation code in that for example Table1-field2 = '$'.

thanks,

Muthu

0 Kudos

Hi,

I have tried what you have said.

Now i am getting a syntax error because of which i am not able to go to Table maintenance generator.

It is showing syntax error & coming out of the program.

I am not even able to do any modifications to table also.

Can anybody solve this issue!

Thanks,

Deep.