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

Table maintenance generator data validation

Former Member
0 Likes
1,092

     Hi ...

I have a requirement to check when user enters data through table maintenance they confirm to a particular pattern.

say one field should be

  • 0NNNNNNNNNN--11 digits including leading zero
  • AANNNNNNNN--2 ALPHA characters followed by 8 digits
  • NNNNNNNNA/NN or NNNNNNNN/NN 

whats the best way to implement this validation?

Thanks in advance

5 REPLIES 5
Read only

SantiMoreno
Participant
0 Likes
735

Hi, Sapstrydy100 -curious nick at all-

I would definitely do it in the PAI of the screen assigned to the view maintenance Function Group.

As its going to be in a table control, put your new module in the loop-endloop assigned to the table; in that point, you can refer to each field by its name tablename-fieldname, which makes quite easy to control what you wish.

Hope this helps.

Kind Regards.

Santiago.

Read only

Former Member
0 Likes
735

Hi,

You could use Menu Environment->Modification->Events from your TMG screen of you table. Then you can write routine for a event there to do validation . E,G. 05 for creating new entries/01 Before saving the data in database. Check the same in standard View V_T001/V_T001W.

Regards,

R

Read only

former_member189779
Active Contributor
0 Likes
735

Use Table events. Goto table Main Generator-- Envoirnment --Modifications-- Events

Check http://help.sap.com/saphelp_nw70/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/content.htm

Read only

Former Member
0 Likes
735

Hi,

You first need to create the view using SE11 of the database tables or table maintenance. In this you need to give the table name in Table/Join conditions. In View fields, bring all the fields that you require to input. In the next tab, Selection conditions, you need to bring all the fields, and in operator you need to put LIKE or NOT LIKE, and in the comparision value, you need to put the pattern which you require. Save this view, activate and test the view. The input will take as per the patterns. You can also create the transaction code for the same and this will open directly the table maintenance view which you created using SE11.

Regards,

Hardik Mehta

Read only

amy_king
Active Contributor
0 Likes
735

Hi,

You can perform validations during table maintenance using Table Maintenance Events. See these links for a couple of step-by-step guides.

Cheers,

Amy