{"id":7836,"date":"2025-09-13T01:39:17","date_gmt":"2025-09-12T20:09:17","guid":{"rendered":"https:\/\/www.sapewmhelp.com\/?question=enhancement-vs-modification-in-sap"},"modified":"2025-09-13T01:39:17","modified_gmt":"2025-09-12T20:09:17","slug":"enhancement-vs-modification-in-sap","status":"publish","type":"question","link":"https:\/\/www.sapewmhelp.com\/?question=enhancement-vs-modification-in-sap","title":{"rendered":"Enhancement vs Modification in SAP"},"content":{"rendered":"<table>\n<thead>\n<tr>\n<th>Aspect<\/th>\n<th>Enhancement \ud83d\ude80 (Safe)<\/th>\n<th>Modification \u26a0\ufe0f (Risky)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Definition<\/strong><\/td>\n<td>Extend standard SAP without changing its code<\/td>\n<td>Change SAP standard code directly<\/td>\n<\/tr>\n<tr>\n<td><strong>Upgrade Impact<\/strong><\/td>\n<td>Upgrade-safe \u2705<\/td>\n<td>Upgrade issues \u274c (need rework)<\/td>\n<\/tr>\n<tr>\n<td><strong>Where Used<\/strong><\/td>\n<td>User Exits, BAdIs, Enhancements<\/td>\n<td>Direct changes in SAP standard objects<\/td>\n<\/tr>\n<tr>\n<td><strong>Maintainability<\/strong><\/td>\n<td>Easy to maintain<\/td>\n<td>Hard to maintain<\/td>\n<\/tr>\n<tr>\n<td><strong>Example<\/strong><\/td>\n<td>Add custom field validation<\/td>\n<td>Change standard pricing logic inside SAP program<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h3 data-start=\"130\" data-end=\"177\"><strong>Scenario: Sales Order Creation (VA01)<\/strong><\/h3>\n<p><strong>Business Requirement:<\/strong><br \/>When creating a <strong>Sales Order<\/strong>, the company wants to <strong>block the order if the customer has overdue invoices<\/strong>.<\/p>\n<hr \/>\n<h3 data-start=\"330\" data-end=\"379\"><strong>Solution with Enhancement (Recommended)<\/strong><\/h3>\n<ul>\n<li>\n<p>Use a <strong>User Exit<\/strong> or <strong>BAdI<\/strong> (e.g., <code>USEREXIT_SAVE_DOCUMENT<\/code> in program <strong>MV45AFZZ<\/strong>).<\/p>\n<\/li>\n<li>\n<p>In the exit, add custom logic to check customer overdue status from <strong>tables BSID\/BSAD<\/strong>.<\/p>\n<\/li>\n<li>\n<p>If overdue invoices are found \u2192 issue an error message and stop the save.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Result:<\/strong> Standard SAP program stays intact. Upgrade-safe.<\/p>\n<\/p>\n<p>IF lv_overdue = &#8216;X&#8217;.<br \/>MESSAGE e001(zmsg) WITH &#8216;Customer has overdue invoices. Sales Order cannot be saved.&#8217;.<br \/>ENDIF.<\/p>\n<\/p>\n<h3 data-start=\"849\" data-end=\"903\"><strong>Solution with Modification (Not Recommended)<\/strong><\/h3>\n<ul>\n<li>\n<p>Directly change the standard SAP program <strong>SAPMV45A<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Insert custom code inside the <code>SAVE_DOCUMENT<\/code> routine itself to check overdue invoices.<\/p>\n<\/li>\n<li>\n<p>This alters SAP\u2019s original code.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Risk:<\/strong><\/p>\n<ul>\n<li>\n<p>After a system upgrade, SAP may overwrite your changes.<\/p>\n<\/li>\n<li>\n<p>You\u2019ll need to re-implement modifications manually, increasing maintenance cost.<\/p>\n<\/li>\n<\/ul>\n<h5><strong>Key Difference in This Example<\/strong><\/h5>\n<ul>\n<li>\n<p><strong>Enhancement:<\/strong> Code added in a <strong>user exit (safe extension point)<\/strong> \u2192 future upgrades won\u2019t break it.<\/p>\n<\/li>\n<li>\n<p><strong>Modification:<\/strong> Code inserted directly into SAP standard program \u2192 risky during upgrades.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","question-category":[158],"question_tags":[178,293,419,177],"class_list":["post-7836","question","type-question","status-publish","hentry","question-category-abap","question_tags-abap","question_tags-enhancement","question_tags-modification","question_tags-sap"],"_links":{"self":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question\/7836","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=7836"}],"wp:attachment":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7836"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion-category&post=7836"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion_tags&post=7836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}