| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Events in Table MaintenanceScenario: We have a following custom table which contains the
fields “Date on which record was created” and “Name of the person who
created the object”. We would like to have these to be filled up with SY-DATUM
and SY-UNAME respectively.
Go to Table Maintenance Generator:
Enter the details as shown below:
Now click on Environment -> Modification -> Events
Following screen is displayed.
Click on F4. Following entries are displayed:
Here you can observe that there are different types of events
available like before saving the data, after saving the data, before deleting,
after deleting and others. Let us go with “Creating a new entry”.
Click on the button in the Editor column and enter the
following code: (Please note that you should also code FORM and ENDFORM as
well).
Save and activate the table. Testing the scenario: Go to SM30 and try creating new entries. Do not enter the
values for “Created on” and “Created by”.
Check your entries in the database table. You can observe
that the date and user name are automatically filled-in. See the screenshot
below:
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||