‎2006 Jul 07 6:40 AM
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
‎2006 Jul 07 6:47 AM
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
regards,
Ravi
Note : Please mark all the helpful answers
‎2006 Jul 07 7:16 AM
Hi,
Try inserting your code in PAI of user includes in the function module generated by Table maintenance generator,
Rgds,
‎2006 Jul 07 7:30 AM
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.
‎2006 Jul 07 7:39 AM
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