{"id":7393,"date":"2025-08-05T02:01:45","date_gmt":"2025-08-04T20:31:45","guid":{"rendered":"https:\/\/www.sapewmhelp.com\/?question=tmg-table-maintenance-generator-events"},"modified":"2025-08-05T02:02:20","modified_gmt":"2025-08-04T20:32:20","slug":"tmg-table-maintenance-generator-events","status":"publish","type":"question","link":"https:\/\/www.sapewmhelp.com\/?question=tmg-table-maintenance-generator-events","title":{"rendered":"TMG ( Table Maintenance Generator ) Events"},"content":{"rendered":"<h4>Purpose of TMG Events<\/h4>\n<p>Events in TMG are used to:<\/p>\n<ul>\n<li>Validate data before it&#8217;s saved.<\/li>\n<li>Set default values when creating entries.<\/li>\n<li>Restrict access to rows based on user roles.<\/li>\n<li>Log changes or trigger custom logic.<\/li>\n<li>Enforce complex business rules beyond field-level checks.<\/li>\n<\/ul>\n<h4>Where You Configure TMG Events<\/h4>\n<ol>\n<li>Transaction: <strong>SE54<\/strong> (Table\/View Maintenance)<\/li>\n<li>Choose: <strong>Environment<\/strong> \u2192 <strong>Events<\/strong><\/li>\n<li>Select your table\/view and function group<\/li>\n<li>Choose the desired <strong>event<\/strong> number and implement the ABAP logic<\/li>\n<\/ol>\n<p><strong>TMG Events<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Event No.<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>01<\/strong><\/td>\n<td>Before saving the data in the database (Insert or Update)<\/td>\n<\/tr>\n<tr>\n<td><strong>02<\/strong><\/td>\n<td>After saving the data<\/td>\n<\/tr>\n<tr>\n<td><strong>03<\/strong><\/td>\n<td>Before deleting a record<\/td>\n<\/tr>\n<tr>\n<td><strong>04<\/strong><\/td>\n<td>After deleting a record<\/td>\n<\/tr>\n<tr>\n<td><strong>05<\/strong><\/td>\n<td>Before saving data (used for <strong>custom validations<\/strong>)<\/td>\n<\/tr>\n<tr>\n<td><strong>06<\/strong><\/td>\n<td>After data retrieval (can filter rows or enhance data)<\/td>\n<\/tr>\n<tr>\n<td><strong>07<\/strong><\/td>\n<td>Before display of the maintenance screen (e.g., make fields read-only)<\/td>\n<\/tr>\n<tr>\n<td><strong>08<\/strong><\/td>\n<td>Fill hidden fields or dynamic fields before display<\/td>\n<\/tr>\n<tr>\n<td><strong>09<\/strong><\/td>\n<td>After entering maintenance screen<\/td>\n<\/tr>\n<tr>\n<td><strong>10<\/strong><\/td>\n<td>Before creating the new entry<\/td>\n<\/tr>\n<tr>\n<td><strong>11<\/strong><\/td>\n<td>Before changing an entry<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","question-category":[158],"question_tags":[178,240,292,177,291],"class_list":["post-7393","question","type-question","status-publish","hentry","question-category-abap","question_tags-abap","question_tags-ddic","question_tags-events","question_tags-sap","question_tags-tmg"],"_links":{"self":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question\/7393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question"}],"about":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7393"}],"wp:attachment":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7393"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion-category&post=7393"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion_tags&post=7393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}