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 Maintainance query

Former Member
0 Likes
496

Hi All,

I have a query in table maintainance I have 5 fields in my custom table and it has table maintainance generator now my requirement is when user enters data for the 4 fields and press enter or save, automatically the 5th field has to set to '0' in the table maintainance this is the requriement can any body give some idea on this?

which event I have to write this code.

Thanks&Regards

Mahesh

4 REPLIES 4
Read only

Former Member
0 Likes
467

You can do that by activating the events of the table maintenance. I think in this case you can use 02 event.

This document details out the process

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-876...

regards,

Ravi

Note : Please mark all the helpful answers

Read only

Former Member
0 Likes
467

Hi,

Try inserting your code in PAI of user includes in the function module generated by Table maintenance generator,

Rgds,

Read only

aris_hidalgo
Contributor
0 Likes
467

Hi Mahesh,

Use event '02 - after saving data in the database'. Now in your code, you can do it like this:

if not itab1-field1 is initial and

not itab1-field2 is initial and

not itab1-field3 is initial and

not itab1-field4 is initial.

move '0' to itab1-field5.

endif.

I am assuming that all 4 fields must be filled with values.

Regards!

P.S. Please award points for useful answers.

Read only

Former Member
0 Likes
467

Hi,

1. Go to transaction SE54

2. Specify your table name

3. From the Menu > Environments>Events

4. Press "New Entries" button in the next screen

5. Press F4 in the first column

6. Select the event like ..

02 - After saving the data in the database

7. Specify the perform in the next cell

Note: This perform you should have created under

the Function Group. This function group is

nothing but the FG created while creating

Table Maintenence Generator.

8. Now in this perform you can write the code to populate

the values according to your requirement.

9. To test keep a break point and check.

Regs,

Venkat Ramanan