{"id":10847,"date":"2025-07-16T11:20:16","date_gmt":"2025-07-16T09:20:16","guid":{"rendered":"https:\/\/www.inprosec.com\/?p=10847"},"modified":"2025-07-17T12:59:04","modified_gmt":"2025-07-17T10:59:04","slug":"table-maintenance-generator-routines-and-custom-restrictions","status":"publish","type":"post","link":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/","title":{"rendered":"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions"},"content":{"rendered":"<p>Controlling access to tables in SAP\u00ae has always been a challenge. The standard way SAP<strong data-start=\"413\" data-end=\"438\">\u00ae<\/strong> provides to restrict access to tables is through<strong> table groups or specific tables<\/strong> (using the S_TABU_DIS or S_TABU_NAM authorization objects and the traditional table view and modification transactions). <strong>Authorization objects<\/strong> are the basic unit for controlling user permissions in an SAP\u00ae system; in this case, the mentioned objects control access to the entire table, but not based on its content.<\/p>\n<p>Among best practices, it is most accepted to create a parameter transaction with the specific table and avoid broad access that could compromise other unwanted tables. These <em>parameter transactions<\/em> are nothing more than<strong> transactions that are based on another transaction but applying specific parameters.<\/strong> Thus, it is possible to create a new transaction that uses the SM30 (table modification) as its base but directly loads the table indicated in the parameter, instead of allowing the user to select the one they want.<\/p>\n<p>However, it is also possible to implement authorization checks that examine the internal information of the table, opening up the possibility of implementing more specific restrictions. In this article, we will see how to implement these restrictions using the Events of the <em>Table Maintenance Generator<\/em> (TMG).<\/p>\n\n<h2><strong>What are the Table Maintenance Generator Events?<\/strong><\/h2>\n<p>The Table Maintenance Generator is an SAP<strong data-start=\"413\" data-end=\"438\">\u00ae<\/strong> tool that allows for the necessary configuration to modify a table (specifically, generate the table maintenance program), directly from a standard interface. It can be accessed from the <em><strong>S<\/strong><strong>E11 \u2013 ABAP Dictionary Maintenance or SE54 \u2013 Generate table view transactions.<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10822\" aria-describedby=\"caption-attachment-10822\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10822\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-1-Accediendo-al-TMG-a-traves-de-la-SE11.png\" alt=\"\" width=\"800\" height=\"504\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-1-Accediendo-al-TMG-a-traves-de-la-SE11.png 1233w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-1-Accediendo-al-TMG-a-traves-de-la-SE11-300x189.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-1-Accediendo-al-TMG-a-traves-de-la-SE11-1024x645.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-1-Accediendo-al-TMG-a-traves-de-la-SE11-600x378.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10822\" class=\"wp-caption-text\">Image 1 &#8211; Accessing the TMG through SE11<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10824\" aria-describedby=\"caption-attachment-10824\" style=\"width: 799px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10824\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-2-Accediendo-al-TMG-a-traves-de-la-SE54.png\" alt=\"\" width=\"799\" height=\"503\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-2-Accediendo-al-TMG-a-traves-de-la-SE54.png 1233w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-2-Accediendo-al-TMG-a-traves-de-la-SE54-300x189.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-2-Accediendo-al-TMG-a-traves-de-la-SE54-1024x645.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-2-Accediendo-al-TMG-a-traves-de-la-SE54-600x378.png 600w\" sizes=\"(max-width: 799px) 100vw, 799px\" \/><figcaption id=\"caption-attachment-10824\" class=\"wp-caption-text\">Image 2 &#8211; Accessing the TMG through SE54<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>With this tool, it is possible to introduce and modify entries in the table, establish the Authorization Group, modify the interface, and even the programs associated with the maintenance of this table; in this case, we will focus on the Events.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10826\" aria-describedby=\"caption-attachment-10826\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10826\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-3-Eventos-del-TMG.png\" alt=\"\" width=\"800\" height=\"503\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-3-Eventos-del-TMG.png 1233w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-3-Eventos-del-TMG-300x189.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-3-Eventos-del-TMG-1024x644.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-3-Eventos-del-TMG-600x377.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10826\" class=\"wp-caption-text\">Image 3 &#8211; TMG Events<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>The TMG Events allow us to associate a new <strong>FORM routine<\/strong> with a specific event that can occur during the maintenance of a table. This routine will effectively be <strong>a new ABAP program that will execute at the time indicated by the event.<\/strong> Therefore, it is possible to include in this ABAP code any behavior desired. SAP\u00ae provides a wide variety of events, several examples of which can be seen in the image above.<\/p>\n<h2><strong>How to implement a custom restriction?<\/strong><\/h2>\n<p>Using the Events discussed earlier, our goal is to implement a custom restriction in the modification of a <em>custom<\/em> table, ensuring that only users authorized for a particular organizational value can modify the rows corresponding to that organizational value.<\/p>\n<p style=\"padding-left: 40px;\">We start by creating and configuring a custom table using the <strong>SE11<\/strong> transaction. Our table is enabled for modification and consists of 4 fields:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em><strong>Client<\/strong> <\/em><strong>(MANDT)<\/strong>: necessary to make the table client-specific.<\/li>\n<li><em><strong>Company Code<\/strong><\/em> <strong>(Z_BUKRS)<\/strong>: the organizational value with which we will apply the restriction.<\/li>\n<li><em><strong>Sales Organization<\/strong><\/em> <strong>(Z_VKORG)<\/strong>: a second organizational value.<\/li>\n<li><em><strong>Approver<\/strong> <\/em><strong>(Z_APPROVER)<\/strong>: an approver user according to the combination of previous organizational values.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10828\" aria-describedby=\"caption-attachment-10828\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10828\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-4-Configuracion-de-la-tabla-custom.png\" alt=\"\" width=\"800\" height=\"503\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-4-Configuracion-de-la-tabla-custom.png 1233w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-4-Configuracion-de-la-tabla-custom-300x189.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-4-Configuracion-de-la-tabla-custom-1024x644.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-4-Configuracion-de-la-tabla-custom-600x377.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10828\" class=\"wp-caption-text\">Image 4 &#8211; Custom Table Configuration<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10830\" aria-describedby=\"caption-attachment-10830\" style=\"width: 801px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10830\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-5-Campos-de-la-tabla-custom.png\" alt=\"\" width=\"801\" height=\"504\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-5-Campos-de-la-tabla-custom.png 1233w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-5-Campos-de-la-tabla-custom-300x189.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-5-Campos-de-la-tabla-custom-1024x644.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-5-Campos-de-la-tabla-custom-600x377.png 600w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><figcaption id=\"caption-attachment-10830\" class=\"wp-caption-text\">Image 5 &#8211; Custom Table Fields<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>In the TMG, we have assigned an authorization group for our table and a function group for the maintenance program. In addition, we have selected the<em> one-step<\/em> maintenance type and obtained the screen number 1 using <em>Find Scr. Number(s):<\/em><\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10834\" aria-describedby=\"caption-attachment-10834\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10834\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-6-Parametros-del-TMG-para-la-tabla-custom-1.png\" alt=\"\" width=\"800\" height=\"625\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-6-Parametros-del-TMG-para-la-tabla-custom-1.png 1167w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-6-Parametros-del-TMG-para-la-tabla-custom-1-300x234.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-6-Parametros-del-TMG-para-la-tabla-custom-1-1024x800.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-6-Parametros-del-TMG-para-la-tabla-custom-1-600x469.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10834\" class=\"wp-caption-text\">Image 6 &#8211; TMG Parameters for the Custom Table<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>At this point, our table is ready to be modified using the TMG itself.<\/p>\n<p>In this example, we went a bit further and decided to create a <em>custom transaction (parameter transaction of the<strong> SM30 \u2013 Call View Maintenance<\/strong>)<\/em> that facilitates the modification of this table. The new transaction was created using the <em><strong>SE93 \u2013 Maintain Transaction Codes transaction:<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10836\" aria-describedby=\"caption-attachment-10836\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10836\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-7-Configuracion-de-la-nueva-transaccion-en-la-SE93.png\" alt=\"\" width=\"800\" height=\"1026\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-7-Configuracion-de-la-nueva-transaccion-en-la-SE93.png 968w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-7-Configuracion-de-la-nueva-transaccion-en-la-SE93-234x300.png 234w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-7-Configuracion-de-la-nueva-transaccion-en-la-SE93-799x1024.png 799w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-7-Configuracion-de-la-nueva-transaccion-en-la-SE93-468x600.png 468w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10836\" class=\"wp-caption-text\">Image 7 &#8211; New Transaction Configuration in SE93<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>To configure the new routine we want to execute, we access the Events section of the TMG and add a new entry:<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10838\" aria-describedby=\"caption-attachment-10838\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10838\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-8-Acceso-a-los-eventos-desde-el-TMG.png\" alt=\"\" width=\"800\" height=\"632\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-8-Acceso-a-los-eventos-desde-el-TMG.png 1158w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-8-Acceso-a-los-eventos-desde-el-TMG-300x237.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-8-Acceso-a-los-eventos-desde-el-TMG-1024x809.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-8-Acceso-a-los-eventos-desde-el-TMG-600x474.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10838\" class=\"wp-caption-text\">Image 8 &#8211; Accessing Events from the TMG<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10840\" aria-describedby=\"caption-attachment-10840\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10840\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-9-Seleccion-del-Evento-en-el-TMG.png\" alt=\"\" width=\"800\" height=\"503\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-9-Seleccion-del-Evento-en-el-TMG.png 1402w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-9-Seleccion-del-Evento-en-el-TMG-300x189.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-9-Seleccion-del-Evento-en-el-TMG-1024x644.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-9-Seleccion-del-Evento-en-el-TMG-600x377.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10840\" class=\"wp-caption-text\">Image 9 Selecting the Event in the TMG<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>We select the event we want to use, give a name to the routine, and click the \u2018Editor\u2019 button.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10842\" aria-describedby=\"caption-attachment-10842\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10842\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-10-Definicion-de-la-rutina-para-un-Evento.png\" alt=\"\" width=\"800\" height=\"552\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-10-Definicion-de-la-rutina-para-un-Evento.png 1122w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-10-Definicion-de-la-rutina-para-un-Evento-300x207.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-10-Definicion-de-la-rutina-para-un-Evento-1024x706.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-10-Definicion-de-la-rutina-para-un-Evento-600x414.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10842\" class=\"wp-caption-text\">Image 10 &#8211; Defining the Routine for an Event<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_10844\" aria-describedby=\"caption-attachment-10844\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-10844\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-11-Adicion-de-un-nuevo-include-para-anadir-el-codigo-custom-ABAP.png\" alt=\"\" width=\"800\" height=\"487\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-11-Adicion-de-un-nuevo-include-para-anadir-el-codigo-custom-ABAP.png 1297w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-11-Adicion-de-un-nuevo-include-para-anadir-el-codigo-custom-ABAP-300x183.png 300w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-11-Adicion-de-un-nuevo-include-para-anadir-el-codigo-custom-ABAP-1024x624.png 1024w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/Imagen-11-Adicion-de-un-nuevo-include-para-anadir-el-codigo-custom-ABAP-600x365.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-10844\" class=\"wp-caption-text\">Image 11 &#8211; Adding a New Include to Insert Custom ABAP Code Preguntar a ChatGPT<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 40px;\">We select the option to add a new Include, which will open an ABAP editor where we can enter the code of our routine according to our needs. According to our example, we were interested in adding a restriction with the organizational value<em><strong> Company Code (Z_BUKRS)<\/strong><\/em> when the user tried to modify the table. For this, we used a very simple code and event <strong>01<\/strong>, as it allows us to check new entries, modifications, and deletions.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-10820\" src=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/restricciones-organizativas-codigo.jpg\" alt=\"\" width=\"548\" height=\"629\" srcset=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/restricciones-organizativas-codigo.jpg 643w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/restricciones-organizativas-codigo-261x300.jpg 261w, https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/restricciones-organizativas-codigo-523x600.jpg 523w\" sizes=\"(max-width: 548px) 100vw, 548px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>In this code, we decided to implement an authorization check with the object <strong>F_BKPF_BUK<\/strong> and the organizational value <em><strong>Company Code<\/strong><\/em> (Z_BUKRS in our table, BUKRS in the standard), checking the activity &#8217;02&#8217; (modification). The authorization object should always be used according to the organizational value being checked, and a new <em>custom<\/em> object could even be created to avoid expanding authorizations in other critical standard transactions.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p data-start=\"121\" data-end=\"689\">TMG <strong data-start=\"125\" data-end=\"148\">routines and events<\/strong> are a highly versatile tool that allows you to <strong data-start=\"196\" data-end=\"235\">enhance the functionality of tables<\/strong> in general. Many companies today use <strong data-start=\"273\" data-end=\"295\">custom SAP\u00ae tables<\/strong> to expand and adapt standard functionality to their specific business processes. By using this tool, it\u2019s possible to <strong data-start=\"414\" data-end=\"457\">reduce the need for custom developments<\/strong> and optimize behavior according to the <strong data-start=\"497\" data-end=\"541\">most specific needs of each organization<\/strong>. For example, it allows for the addition of <strong data-start=\"586\" data-end=\"608\">custom validations<\/strong> on the data entered in the table or changes to how the information is displayed.<\/p>\n<p data-start=\"691\" data-end=\"975\">In our particular case, we have successfully implemented an <strong data-start=\"751\" data-end=\"807\">authorization check based on an organizational value<\/strong>, something not supported by standard SAP\u00ae table controls, but often a <strong data-start=\"877\" data-end=\"915\">valuable enhancement for companies<\/strong> that require their structure to be properly <strong data-start=\"960\" data-end=\"974\">segregated.<\/strong><\/p>\n<h2 data-start=\"92\" data-end=\"159\"><strong data-start=\"92\" data-end=\"159\">Would you like to apply these restrictions in your SAP\u00ae system?<\/strong><\/h2>\n<p data-start=\"161\" data-end=\"415\">Do you have questions about how to implement this control in your SAP\u00ae environment? Our team can help you apply custom restrictions securely and efficiently. You can get in touch with us by clicking <a href=\"https:\/\/www.inprosec.com\/en\/contact\/\">here<\/a>, or visit our <a href=\"https:\/\/www.inprosec.com\/en\/sap-security\/\">SAP\u00ae Security<\/a> and <a href=\"https:\/\/www.inprosec.com\/en\/services\/sap-grc\/\">SAP\u00ae GRC<\/a> services.<\/p>\n<p data-start=\"691\" data-end=\"975\">\n","protected":false},"excerpt":{"rendered":"<p>Controlling access to tables in SAP\u00ae has always been a challenge. The standard way SAP\u00ae provides to restrict access to tables is through table groups or specific tables (using the S_TABU_DIS or S_TABU_NAM authorization objects and the traditional table view and modification transactions). Authorization objects are the basic unit for controlling user permissions in an&#8230;<\/p>\n","protected":false},"author":6,"featured_media":13443,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[4,61,52],"tags":[153],"class_list":["post-10847","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","category-sap-security-en-2","category-technical-article","tag-sap-security"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.3 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions - Inprosec<\/title>\n<meta name=\"description\" content=\"Learn how to implement custom restrictions in SAP using Table Maintenance Generator (TMG) Events for effective and specific table access control, enhancing the security and adaptability of your business processes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions\" \/>\n<meta property=\"og:description\" content=\"Learn how to implement custom restrictions in SAP using Table Maintenance Generator (TMG) Events for effective and specific table access control, enhancing the security and adaptability of your business processes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/\" \/>\n<meta property=\"og:site_name\" content=\"Inprosec\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-16T09:20:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-17T10:59:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/IMG-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fernando Mosquera\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fernando Mosquera\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/\"},\"author\":{\"name\":\"Fernando Mosquera\",\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/#\\\/schema\\\/person\\\/b05a40c0c3e81b819075dd95a10532e2\"},\"headline\":\"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions\",\"datePublished\":\"2025-07-16T09:20:16+00:00\",\"dateModified\":\"2025-07-17T10:59:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/\"},\"wordCount\":1137,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inprosec.com\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/IMG-2.png\",\"keywords\":[\"SAP Security\"],\"articleSection\":[\"General\",\"SAP Security\",\"Technical Article\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/\",\"url\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/\",\"name\":\"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions - Inprosec\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inprosec.com\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/IMG-2.png\",\"datePublished\":\"2025-07-16T09:20:16+00:00\",\"dateModified\":\"2025-07-17T10:59:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/#\\\/schema\\\/person\\\/b05a40c0c3e81b819075dd95a10532e2\"},\"description\":\"Learn how to implement custom restrictions in SAP using Table Maintenance Generator (TMG) Events for effective and specific table access control, enhancing the security and adaptability of your business processes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.inprosec.com\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/IMG-2.png\",\"contentUrl\":\"https:\\\/\\\/www.inprosec.com\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/IMG-2.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/table-maintenance-generator-routines-and-custom-restrictions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/\",\"name\":\"Inprosec\",\"description\":\"Information security is our priority.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inprosec.com\\\/en\\\/#\\\/schema\\\/person\\\/b05a40c0c3e81b819075dd95a10532e2\",\"name\":\"Fernando Mosquera\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/199e6c54b14f5b5ddf7e11a9bb0b455c3bed7a9a1a738b7be5c2572878e69d1a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/199e6c54b14f5b5ddf7e11a9bb0b455c3bed7a9a1a738b7be5c2572878e69d1a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/199e6c54b14f5b5ddf7e11a9bb0b455c3bed7a9a1a738b7be5c2572878e69d1a?s=96&d=mm&r=g\",\"caption\":\"Fernando Mosquera\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions - Inprosec","description":"Learn how to implement custom restrictions in SAP using Table Maintenance Generator (TMG) Events for effective and specific table access control, enhancing the security and adaptability of your business processes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/","og_locale":"en_US","og_type":"article","og_title":"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions","og_description":"Learn how to implement custom restrictions in SAP using Table Maintenance Generator (TMG) Events for effective and specific table access control, enhancing the security and adaptability of your business processes.","og_url":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/","og_site_name":"Inprosec","article_published_time":"2025-07-16T09:20:16+00:00","article_modified_time":"2025-07-17T10:59:04+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/IMG-2.png","type":"image\/png"}],"author":"Fernando Mosquera","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Fernando Mosquera","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#article","isPartOf":{"@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/"},"author":{"name":"Fernando Mosquera","@id":"https:\/\/www.inprosec.com\/en\/#\/schema\/person\/b05a40c0c3e81b819075dd95a10532e2"},"headline":"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions","datePublished":"2025-07-16T09:20:16+00:00","dateModified":"2025-07-17T10:59:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/"},"wordCount":1137,"commentCount":0,"image":{"@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/IMG-2.png","keywords":["SAP Security"],"articleSection":["General","SAP Security","Technical Article"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/","url":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/","name":"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions - Inprosec","isPartOf":{"@id":"https:\/\/www.inprosec.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#primaryimage"},"image":{"@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/IMG-2.png","datePublished":"2025-07-16T09:20:16+00:00","dateModified":"2025-07-17T10:59:04+00:00","author":{"@id":"https:\/\/www.inprosec.com\/en\/#\/schema\/person\/b05a40c0c3e81b819075dd95a10532e2"},"description":"Learn how to implement custom restrictions in SAP using Table Maintenance Generator (TMG) Events for effective and specific table access control, enhancing the security and adaptability of your business processes.","breadcrumb":{"@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#primaryimage","url":"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/IMG-2.png","contentUrl":"https:\/\/www.inprosec.com\/wp-content\/uploads\/2024\/03\/IMG-2.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.inprosec.com\/en\/table-maintenance-generator-routines-and-custom-restrictions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inprosec.com\/en\/"},{"@type":"ListItem","position":2,"name":"SAP\u00ae Table Maintenance Generator: Routines and Custom Restrictions"}]},{"@type":"WebSite","@id":"https:\/\/www.inprosec.com\/en\/#website","url":"https:\/\/www.inprosec.com\/en\/","name":"Inprosec","description":"Information security is our priority.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inprosec.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.inprosec.com\/en\/#\/schema\/person\/b05a40c0c3e81b819075dd95a10532e2","name":"Fernando Mosquera","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/199e6c54b14f5b5ddf7e11a9bb0b455c3bed7a9a1a738b7be5c2572878e69d1a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/199e6c54b14f5b5ddf7e11a9bb0b455c3bed7a9a1a738b7be5c2572878e69d1a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/199e6c54b14f5b5ddf7e11a9bb0b455c3bed7a9a1a738b7be5c2572878e69d1a?s=96&d=mm&r=g","caption":"Fernando Mosquera"}}]}},"_links":{"self":[{"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/posts\/10847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/comments?post=10847"}],"version-history":[{"count":5,"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/posts\/10847\/revisions"}],"predecessor-version":[{"id":13482,"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/posts\/10847\/revisions\/13482"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/media\/13443"}],"wp:attachment":[{"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/media?parent=10847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/categories?post=10847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inprosec.com\/en\/wp-json\/wp\/v2\/tags?post=10847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}