{"id":7632,"date":"2025-08-24T16:46:26","date_gmt":"2025-08-24T11:16:26","guid":{"rendered":"https:\/\/www.sapewmhelp.com\/?question=what-is-an-update-function-module"},"modified":"2025-08-24T16:46:26","modified_gmt":"2025-08-24T11:16:26","slug":"what-is-an-update-function-module","status":"publish","type":"question","link":"https:\/\/www.sapewmhelp.com\/?question=what-is-an-update-function-module","title":{"rendered":"What is an Update Function Module?"},"content":{"rendered":"<p>An <strong>Update Function Module<\/strong> is a special type of function module that executes <strong>update tasks<\/strong> (like DB changes, inserts, updates, deletes) <strong>asynchronously<\/strong>, after a <code>COMMIT WORK<\/code>.<\/p>\n<p>They are processed in <strong>update work processes<\/strong> (type <strong>UPD<\/strong> or <strong>UP2<\/strong>) instead of dialog work processes.<\/p>\n<p>Declared in SE37 with attribute <strong>&#8220;Update Module&#8221;<\/strong>.<\/p>\n<p>\u00a0Example: <code>CALL FUNCTION 'Z_UPDATE_SALES_ORDER' IN UPDATE TASK<\/code>.<\/p>\n<\/p>\n<h5>Types of Update Function Modules<\/h5>\n<p>There are <strong>two types<\/strong> of update function modules:<\/p>\n<h3 data-start=\"666\" data-end=\"703\">1. <strong>V1 Update Function Modules<\/strong><\/h3>\n<ul>\n<li>\n<p><strong>High-priority, synchronous updates<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Executed <strong>immediately after COMMIT WORK<\/strong> and must finish successfully.<\/p>\n<\/li>\n<li>\n<p>Used for <strong>critical database updates<\/strong> (e.g., FI document posting, material stock changes).<\/p>\n<\/li>\n<li>\n<p>If a V1 update fails \u2192 the LUW (Logical Unit of Work) is rolled back.<\/p>\n<\/li>\n<li>\n<p>Processed in the <strong>V1 Update work process<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<h3 data-start=\"1048\" data-end=\"1085\">2. <strong>V2 Update Function Modules<\/strong><\/h3>\n<ul>\n<li>\n<p><strong>Lower priority updates<\/strong>, executed <strong>after V1 updates<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Used for <strong>non-critical, statistical, or secondary updates<\/strong> (e.g., updating info structures, statistics, LIS, BW extraction).<\/p>\n<\/li>\n<li>\n<p>If a V2 update fails \u2192 does <strong>not rollback V1 updates<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Processed in the <strong>V2 Update work process<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Example :<\/strong><\/p>\n<p>CALL FUNCTION &#8216;Z_UPDATE_MARA&#8217;<br \/>IN UPDATE TASK<br \/>EXPORTING matnr = &#8216;MAT001&#8217;.<\/p>\n<p>COMMIT WORK. &#8221; &#8211;&gt; Triggers update task<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\n<p>If <code>Z_UPDATE_MARA<\/code> is defined as <strong>V1 update<\/strong> \u2192 executed immediately after commit in update work process.<\/p>\n<\/li>\n<li>\n<p>If defined as <strong>V2 update<\/strong> \u2192 executed later, after all V1 updates.<\/p>\n<\/li>\n<\/ul>\n<p>Summary :<\/p>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Priority<\/th>\n<th>Rollback Effect<\/th>\n<th>Usage<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>V1<\/strong><\/td>\n<td>High<\/td>\n<td>Rollback of LUW if fails<\/td>\n<td>Critical DB changes (FI, MM, SD)<\/td>\n<\/tr>\n<tr>\n<td><strong>V2<\/strong><\/td>\n<td>Low<\/td>\n<td>No rollback of V1 if fails<\/td>\n<td>Statistics, logs, reporting updates<\/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,228,177,371],"class_list":["post-7632","question","type-question","status-publish","hentry","question-category-abap","question_tags-abap","question_tags-function-module","question_tags-sap","question_tags-update-fm"],"_links":{"self":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question\/7632","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=7632"}],"wp:attachment":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7632"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion-category&post=7632"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion_tags&post=7632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}