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

Updating a database table

Former Member
0 Likes
910

If there are two tables in a database, for example Table ZACCDETAILT and

ZACCDETAILS,where ZACCDETAILT has all the fields present in ZACCDETAILS

with two extra fields ,I would like a transaction code to maintain all

the fields of table ZACCDETAILT and when saving this must update both

tables (ZACCDETAILS and ZACCDETAILT.

Thanks and regards

Ashish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
886

ashish,

Pls. go through this link you will have complete idea...

But don't forget to reward if useful.....

6 REPLIES 6
Read only

Former Member
0 Likes
886

Hello,

What is the question??

Do you want the full code for it??

Bye

Gabriel

Read only

Former Member
0 Likes
886

Hello,

If you create a maintenance view between these tables ZACCDETAILS and ZACCDETAILT, you can update them together in SM30. Otherwise, you have create a program and in the 'Save' event, you can take care of the required condition.

Thanks,

Venu

Read only

0 Likes
886

Hello Venu,

Can u give me the procedure to solve this problem with the help of maintanence view,because i tried doing this but it gets updated in only table .

Thanks and regards

Ashish

Read only

Former Member
0 Likes
887

ashish,

Pls. go through this link you will have complete idea...

But don't forget to reward if useful.....

Read only

Former Member
0 Likes
886

hi,

if i think right if u press save button, then u r able to update one database table for the same u written code in the program just like that u can write code for the second database tabale,then pblm will solve...

reward points if useful,

seshu.

Read only

Former Member
0 Likes
886

Hi Ashish,

In table maintainance generator, you can add your code to populate data in ZACCDETAILT. Steps would be

1. Create maintainance generator for table ZACCDETAILS

2. Select Event '02' - ( After saving the data in database ) or 05 ( create new entry ) while creating maintaiance generator.

SE11 --> Utilities -> Table maintainance Generator -> environment -> modification -> events

3. You can add your code for these events to save data in table ZACCDETAILT.

Using SM30, you can save data in ZACCDETAILS as well as ZACCDETAILT.

Hope it will help you.

Regards,

Naren