Site icon SAP Human Resources Experts And Solutions

SAP ABAP Quality

<p>Life throws me interesting tasks&period; The other day I was thinking about ABAP code quality automation&period; There is a tool to control ABAP quality and it&&num;8217&semi;s called ATC &&num;8211&semi; ABAP Test Cockpit&period; Guess&comma; we can setup system to verify ABAP code for quality in ABAP Code Inspector where we set rules for naming&comma; code blocks&comma; conventions&comma; etc&period; We can ask the system to schedule code checks before any transport request moves forward to quality or production&period; The system will stop any transfer in case there are mistakes in code or even variables naming&period;<&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<div id&equals;"attachment&lowbar;2237" style&equals;"width&colon; 594px" class&equals;"wp-caption alignleft"><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;fault-injection-software-testing&period;jpg"><img aria-describedby&equals;"caption-attachment-2237" class&equals;"size-full wp-image-2237" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;fault-injection-software-testing&period;jpg" alt&equals;"Testing ABAP Code in SAP" width&equals;"584" height&equals;"437" &sol;><&sol;a><p id&equals;"caption-attachment-2237" class&equals;"wp-caption-text">testing ABAP code in SAP &lpar;image owner&sol;author is unknown&rpar;<&sol;p><&sol;div>&NewLine;<p><&excl;--more--><br &sol;>&NewLine;For customers&comma; I&&num;8217&semi;d recommend to include such code&sol;naming requirements in RFPs to start somehow building code development culture in your company&period; It will save a lot of cash in long-term period&period; Just don&&num;8217&semi;t forget you need to pay for quality and following your procedures&period; Want to avoid backdoors or inefficient code &&num;8211&semi; setup rules in Code Inspector which don&&num;8217&semi;t allow to transport code until supervisor manually review and approve them&period; Disallow direct SQL to avoid permissions break with direct access to data&period; Develop security policies&comma; performance policies&comma; code management policies&comma; templates&comma; and snippets &&num;8211&semi; it would save decent money for you in support and bug tracking&period;<&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<p>Transaction SCI &&num;8211&semi; Code Inspector &&num;8211&semi; lets setup rules&comma; list of objects&sol;logins to control&period; Rules of the game are simple&colon;<&sol;p>&NewLine;<ol>&NewLine;<li>Code must be &&num;8216&semi;clean&&num;8217&semi; in performance&comma; readability&comma; security&period; Otherwise&comma; refactor&period;<&sol;li>&NewLine;<li>Code must be 100&percnt; covered by Unit or Functional tests&period; Otherwise&comma; you&&num;8217&semi;ll get errors in production system&period;<&sol;li>&NewLine;<li>Bullets 1 and 2 must be documented&comma; signed and obligatory&period; No exceptions&period;<&sol;li>&NewLine;<li>In case of issues start with bullet 3&period;<&sol;li>&NewLine;<&sol;ol>&NewLine;<p>Ideally&comma; Solution Architect defines the rules&period; Test Engineer writes functional test&period; Code developers ensure successful execution of tests&period; Quality Assurance Engineer ensures code acceptance&period; All these ABAP quality gates make a customer happy&period;<&sol;p>&NewLine;<h2>Setup ABAP Quality Toolset<&sol;h2>&NewLine;<p>Let&&num;8217&semi;s open SCI transaction&period;<&sol;p>&NewLine;<p>Here we see inspections&comma; objects to control and rules &lpar;variants&rpar;&period; It&&num;8217&semi;s obvious&comma; Cap&period; Inspection has on an object to verify and rules how to verify&period; Let&&num;8217&semi;s check something from standard code&comma; for example&comma; standard staffing form T-3 with the rules vendor recommends himself&period;<&sol;p>&NewLine;<p>Define an area for verification as only one our program&period;<&sol;p>&NewLine;<div id&equals;"attachment&lowbar;2239" style&equals;"width&colon; 692px" class&equals;"wp-caption aligncenter"><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;sci&lowbar;1&period;png"><img aria-describedby&equals;"caption-attachment-2239" class&equals;"wp-image-2239 size-full" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;sci&lowbar;1&period;png" alt&equals;"SAP Code Inspector Object Set" width&equals;"682" height&equals;"557" &sol;><&sol;a><p id&equals;"caption-attachment-2239" class&equals;"wp-caption-text">SAP Code Inspector Object Set<&sol;p><&sol;div>&NewLine;<p>Create a new inspection where we specify our list of objects and one of the standard check variants&period; In this case select variant check for variables naming convention&period; If you scroll standard variants you&&num;8217&semi;ll see a lot of interesting things to use&period; They definitely worth walking through and copy as a template to your own&period;<&sol;p>&NewLine;<div id&equals;"attachment&lowbar;2240" style&equals;"width&colon; 747px" class&equals;"wp-caption alignnone"><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;sci&lowbar;2&period;png"><img aria-describedby&equals;"caption-attachment-2240" class&equals;"wp-image-2240 size-full" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;sci&lowbar;2&period;png" alt&equals;"SAP Code Inspector" width&equals;"737" height&equals;"330" &sol;><&sol;a><p id&equals;"caption-attachment-2240" class&equals;"wp-caption-text">SAP Code Inspector<&sol;p><&sol;div>&NewLine;<h2>Use ABAP Quality Toolset<&sol;h2>&NewLine;<p>I&&num;8217&semi;ll run it and go for a tea meantime&period;<&sol;p>&NewLine;<div id&equals;"attachment&lowbar;2244" style&equals;"width&colon; 1038px" class&equals;"wp-caption alignnone"><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;sci&lowbar;3&period;png"><img aria-describedby&equals;"caption-attachment-2244" class&equals;"wp-image-2244 size-full" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;sci&lowbar;3&period;png" alt&equals;"SAP Code Inspector Result Log" width&equals;"1028" height&equals;"388" &sol;><&sol;a><p id&equals;"caption-attachment-2244" class&equals;"wp-caption-text">SAP Code Inspector Result Log<&sol;p><&sol;div>&NewLine;<p>If you look closely&comma; there is nothing critical&period; In your rules&comma; you can delete checks for non-existing includes or delimit check area&period; Here SAP follows it&&num;8217&semi;s own recommendations &&num;8211&semi; no errors&period;<&sol;p>&NewLine;<p>It remains to build a process&period; From my point of view&comma; t could look this way&period; Daily scheduled  <a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;2017&sol;02&sol;13&sol;unit-test&sol;">ABAP Unit Test<&sol;a> of all code developments&period;  Release transport to integration testing system&period; At the moment of transport release&comma; ABAP Test Cockpit runs Code Inspector&period; In integration testing system we schedule <a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;2015&sol;06&sol;09&sol;testing&sol;">eCATT<&sol;a> to fill the system with data and run functional and integration test automatically&period; If succeed manual tests are ran by test-person according to test plan&period;<&sol;p>&NewLine;<p>As a result&comma; we provide almost 99&comma;9 ABAP quality-assured code and customizing fulfilling business requirements and therefore a quality of the solution which can be called industrial&period;<&sol;p>&NewLine;<p>It could save up to 30&percnt; of your TCO costs&period;<&sol;p>&NewLine;

Exit mobile version