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

SM30 Validations

former_member213112
Participant
0 Likes
1,642

HI,

I have created SM30 for 2 tables say A & B with validations & logic in both the tables, which is having same primary keys for both the tables. So now the question is when user enters a primary key in table A same should be updated in table B automatically and when user removes entries from table A same should be deleted from table B automatically, this should work for multiple addition or deletion.

Need help on this

Regards,

Watch-point.

7 REPLIES 7
Read only

Former Member
0 Likes
1,148

Have you considered using a View Cluster?

Read only

Former Member
0 Likes
1,148

Hi,

This can be done through Table Maintenance Events

Event for your use is --02  After saving the data in the database--

Details given in below link

TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,148

Did you consider creation of a View Cluster, first step would be correct foreign key relation between your tables.

Regards,

Raymond

Read only

0 Likes
1,148

Hi Raymond & Andre,

Yes I am considering View cluster in the event 5 whether work center is allocated to the plant & material is for valid for the plant or not same kind. I have written code in PBO for insert & at event 5 to delete the entry but this is not working for multiple insert & delete.

Regards,

watch-point.

Read only

0 Likes
1,148

You do not need to implement table maintenance events. And please avoid changing the standard code generated by maintenance generator.

Just have a close look on the View Cluster. I think it will fit your needs.

Read only

0 Likes
1,148

Hi Andre,

I am using event because for some of the fields three tables are involved based on the entries of each table the validation changes and when it comes to PBO I have created separate Z module and calling that to insert & delete.

Regards,

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,148

Did you consider creating one table and 2 projection views with distinct maintenance dialogs?