<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://www.shortcut-it.com/blog/x5feed.php" rel="self" type="application/rss+xml" />
		<title><![CDATA[Blog]]></title>
		<link>https://www.shortcut-it.com/blog/</link>
		<description><![CDATA[Blog]]></description>
		<language>DE</language>
		<lastBuildDate>Mon, 07 Oct 2024 07:04:00 +0100</lastBuildDate>
		<generator>Incomedia WebSite X5 Evo</generator>
		<item>
			<title><![CDATA[Audit finding: productive system is modifiable!]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000001D"><div><hr></div><div><b class="fs14lh1-5"><i>It is a standard check done by many auditors to have a look into the system change options. And even if the admins did not open the system changeability or any component, sometimes there is at least one component open for modifications! How could this happen?</i></b></div><div><b class="fs14lh1-5"><i>The reason for this often is in implementing a new component with the SAINT transaction, which leaves the freshly installed component with status 'modifiable'. Also a 3rd party transport request (or from SAP) could cause this situation. </i></b></div><div><b class="fs14lh1-5"><i>This likely becomes a finding. </i></b><br></div><div><hr></div><div><br></div><div>This finding can be easily avoided by implementing an automatic closing of the global setting, the components and the namespaces.</div><div><br></div><div>Unfortunately there is no SAP standard program available that can be scheduled daily. In that cases, <span class="fs13lh1-5">this is where usually the idea comes into play of developing an ABAP program for this purpose, distributing it to all systems and scheduling it as a periodic batch job in all productive systems.</span></div><div><div><br></div><div>It can be <span class="fs13lh1-5"><b>shorter, faster and consequently cheaper.</b></span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">"Shortcut for SAP systems" comes with a <a href="https://www.shortcut-it.com/en/datacorrection#UpdateTableData" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&quot;Update table data&quot; function in Shortcut for SAP systems', width: 180});" class="imCssLink">'Update table data' function</a>, and with the <a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The &quot;Shortcut for SAP systems&quot; command line tool', width: 180});" class="imCssLink">command line tool</a> we can automate it.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">First let's have a look at the SAP function for setting the system changeability (SE03) and determine which tables are to be updated:</span></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Audit-finding-productive-system-modifiable---01.png"  title="SE03 - System changeability" alt="SE03 - System changeability" width="800" height="649" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><span class="imUl">These are the tables behind the 3 categories of the system changeability:</span></div><div><span class="imUl"><br></span></div><div>The changeability of the "Global Setting" <span class="cf1 cb1">(1)</span> is stored in a single <span class="fs13lh1-5 ff1">TADIR</span> table entry:</div><div><img class="image-5" src="https://www.shortcut-it.com/images/Audit-finding-productive-system-modifiable---02.png"  title="TADIR contains the flag for the global setting" alt="TADIR contains the flag for the global setting" width="506" height="274" /><br></div><div><br></div><div>The changeability of the Software Components <span class="cf1 cb1">(2)</span> is stored in the table <span class="fs13lh1-5 ff1">DLV_SYSTC</span>:</div><div><img class="image-6" src="https://www.shortcut-it.com/images/Audit-finding-productive-system-modifiable---03.png"  title="Table DLV_SYSTC contains the modifiable flag for the SW components" alt="Table DLV_SYSTC contains the modifiable flag for the SW components" width="645" height="387" /><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">And finally the changeability of the namespaces </span><span class="fs13lh1-5 cf1 cb1">(3)</span><span class="fs13lh1-5"> is stored in table </span><span class="fs13lh1-5 ff1">TRNSPACE</span><span class="fs13lh1-5">:</span></div><div><img class="image-7" src="https://www.shortcut-it.com/images/Audit-finding-productive-system-modifiable---04.png"  title="Table TRNSPACE contains the modifiable flag for the namespaces" alt="Table TRNSPACE contains the modifiable flag for the namespaces" width="728" height="405" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">As usually for this kind of tasks, the </span><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool - discover the possibilities!', width: 180});" class="imCssLink"><b><span class="fs13lh1-5">command line tool</span></b></a></span><span class="fs13lh1-5"> of "Shortcut for SAP systems" is useful. </span><span class="fs13lh1-5">It runs outside the GUI application on OS level. </span><span class="fs13lh1-5">This gives us the possibility to </span><span class="fs13lh1-5"><b>execute it periodically</b></span><span class="fs13lh1-5"> via an automation solution. This can be a simple (and free) solution like the </span><span class="fs13lh1-5"><i>Windows Task Scheduler</i></span><span class="fs13lh1-5"> or a more sophisticated (and more expensive) product like </span><span class="fs13lh1-5"><i>Automic Automation</i></span><span class="fs13lh1-5"> or others.</span><br></div></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">There are 2 options to use the command line tool:</span></div><div><ol><li><span class="fs13lh1-5">using a Variant (a Variant in "Shortcut for SAP systems")</span></li><li><span class="fs13lh1-5">using an XML file</span></li></ol></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">As it is here about an update of 3 tables, the 2nd option - using an XML file - is more suitable. The 1st option would require 3 variants and 3 single calls of the command line tool. With the XML file we can use a single XML file with 3 update tasks and a single call of the command line tool. </span></div><div><span class="fs13lh1-5">An <a href="https://www.shortcut-it.com/the-individual-task-types.html#UpdateTableData" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Command line tool - task type &quot;UpdateTableData&quot;', width: 180});" class="imCssLink">XML file for updating the table entries</a> would look like this:</span></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Audit-finding-productive-system-modifiable---08.png"  title="XML file for the command line tool, setting the system to non-modifiable" alt="XML file for the command line tool, setting the system to non-modifiable" width="737" height="665" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>For each of the settings (Global Setting, Software components, Namespaces) we update the records in case they do not already have the right setting (that is where the <span class="fs13lh1-5 ff1">&lt;WhereCond&gt;</span> tag is specified for).</div><div><br></div><div><span class="fs13lh1-5">In front of scheduling this periodically we call it directly on the console:</span><br></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Audit-finding-productive-system-modifiable---10.png"  title="Setting the system to non-modifiable using the command line tool" alt="Setting the system to non-modifiable using the command line tool" width="950" height="879" /><br></div><div><br></div><div>A verification in the system (SE03) showed that it worked as intended. In case the settings are already correct, the return code would be 4 - a warning, because the update did not apply on any record.</div><div><img class="image-3" src="https://www.shortcut-it.com/images/Audit-finding-productive-system-modifiable---11.png"  title="Everything is already fine - no records updated" alt="Everything is already fine - no records updated" width="722" height="313" /><br></div><div><span class="fs13lh1-5"> </span><br></div><div><span class="fs13lh1-5"><b>Now let's implement this in a periodic task.</b></span><span class="fs13lh1-5"> For this have a look into <a href="https://www.shortcut-it.com/blog/index.php?audit-finding--developer-keys-in-productive-system" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Audit-finding-developer-keys-in-productive-system.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Audit finding: developer keys in productive system&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this article</a> (which is about a very similar issue). </span></div><div><span class="fs13lh1-5"><br></span></div><div>With the implementation of a periodic run you can be sure, that system changeability in next year's auditing will not be an issue anymore. We did not have to develop an ABAP program and distribute it into every system line, followed by a job scheduling. Adding a new system for this task is quite simple via copying the lines and just use another connection for the copied lines. </div><div><br></div><div class="imTACenter"><img class="image-9" src="https://www.shortcut-it.com/images/large-2385785.jpg"  title="" alt="" width="300" height="200" /><br></div></div>]]></description>
			<pubDate>Mon, 07 Oct 2024 06:04:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-994007_thumb.jpg" length="350876" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?audit-finding-productive-system-is-modifiable</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000001D</guid>
		</item>
		<item>
			<title><![CDATA[Speed up the system refresh]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000026"><hr><div><i><span class="fs14lh1-5">Doing system refreshes of your quality / test systems is important for their quality and usability. But it could turn into a big effort, and additionally there is time pressure. After all, the systems should be available again quickly. With "Shortcut for SAP systems" and the information from the "PCA" tool, the pre- and post-processing can be automated. Read here, how you can speed up processing the data during pre- and post-processing </span><b><span class="fs14lh1-5">significantly</span></b><span class="fs14lh1-5">. </span></i></div><div><hr>This article is a continuation of <a href="https://www.shortcut-it.com/blog/index.php?pre-and-post-work-of-an-sap-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Pre--and-post-work-of-an-SAP-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;SAP system refresh, done easily and fully automatable with &quot;Shortcut for SAP systems&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this</a> one. So if doing a system refresh with "Shortcut for SAP systems" is new to you, you should first read <span class="fs13lh1-5"><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?pre-and-post-work-of-an-sap-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Pre--and-post-work-of-an-SAP-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;SAP system refresh, done easily and fully automatable with &quot;Shortcut for SAP systems&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this</a></span></span><span class="fs13lh1-5"> article.</span><br></div><div><br></div><div>The topic in this article is the speed-up of the pre- and post-processing. <span class="fs13lh1-5"><b>With this you can significantly reduce the runtime of the pre- and post-processing of the system refresh! </b></span></div><div><br></div><div><span class="fs13lh1-5"><b>There are 2 starting points:</b></span></div><div><br></div><div>1.: Between the several components are <span class="imUl">intersections of the tables</span>. Have a look for example at components SWU3 and SWU3_DATA: you will find lots of tables that are part of both components. Or components BSSUSER and USER: all tables of BSSUSER are also part of component USER. Consequently, <span class="imUl">lots of tables will be exported / imported twice</span>! Regarding optimization of the runtime a single export/import of these tables is to be preferred.</div><div><br></div><div>2.: &nbsp;<span class="imUl">Use parallelization</span>! Here we have 2 possibilities:<br></div><div><ul><li><span class="fs13lh1-5">By using a single XML file for the export and import tasks, task by task in the XML file will be processed sequentially - the next task will be started after the previous task has been finished. <br></span>But usually we have a lot of resources in the SAP system available when doing the export or import. There are no users or batch jobs active on the system in these phases. <span class="fs13lh1-5"><b>So just leverage the system by using </b></span><span class="fs13lh1-5"><b>some more work processes</b></span><span class="fs13lh1-5">.<br></span>From the PCA tool we get the information of all components and their tables, and using the program supplied with our product we also get the information about the table size. Let's use this information to divide export and import into pieces - balanced by using the size information - and start them in parallel.</li><li>Also <span class="fs13lh1-5"><b>R3trans </b></span>offers the possibility to <span class="fs13lh1-5"><b>use parallelism at the import</b></span> - big files will be splitted into portions and processed by child processes of R3trans. This usually reduces the runtime of an import with R3trans significantly.</li></ul></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">With the recent version of "Shortcut for SAP systems" and the program supplied with our product (</span><span class="fs12lh1-5 ff1">ShowPCATables.txt</span><span class="fs13lh1-5"> in the </span><span class="fs12lh1-5 ff1">ABAP</span><span class="fs13lh1-5"> folder, or downloadable <a href="https://www.shortcut-it.com/download/Z_SHOW_PCA_TABLES.zip" onmouseover="x5engine.imTip.Show(this, { text: 'ABAP program for showing PCA tables', width: 180});" class="imCssLink">here</a>) the realization of the parallelism - by using multiple work processes as well as using R3trans parallelism - becomes quite easy! Let's make a walkthrough. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">We start the program and select the "Refresh" option. Note: f</span><span class="fs13lh1-5">or a good balancing of the parallel tasks, we need the size data of the tables. The program should therefore be started on the <span class="imUl">target system</span> of the system refresh.</span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-01.png"  title="Show PCA tables" alt="Show PCA tables" width="800" height="458" /><span class="fs13lh1-5"><br></span></div><div>By default the PCA tool lists components NRIV and SNRO, both contain table NRIV (number ranges) with its full content. As we are going to do a system refresh from our productive system including all business documents, we take also the number ranges from the productive system and leave this table out here <span class="cf1 cb1">(1)</span>.</div><div><span class="fs13lh1-5">The selection screen accepts some information that is written to the XML files. </span><span class="fs13lh1-5">We create XML files for a system refresh </span><span class="fs13lh1-5 cf1 cb1">(2)</span><span class="fs13lh1-5"> and specify the connection </span><span class="fs13lh1-5 cf1 cb1">(3)</span><span class="fs13lh1-5"> we want to use. </span><span class="fs13lh1-5">It is convenient to have all data and log files in a dedicated directory </span><span class="fs13lh1-5 cf1 cb1">(4)</span><span class="fs13lh1-5">, which we also specify here.</span><span class="fs13lh1-5"> &nbsp;</span></div><div><div><br></div><div>And now it's time to optimize performance: <br><br></div><div><ul><li>With activation of the flag "Avoid multiple export/import of the same table" <span class="cf1 cb1">(5)</span> a table will be exported / imported only once - although it might be part of multiple components. So with this we cover the 1st of the above mentioned starting points to reduce the runtime. </li></ul></div></div><blockquote><blockquote><blockquote><blockquote><blockquote><div><div data-line-height="1.15" class="lh1-15"><span class="cb2"><span class="fs13lh1-15">This requires that for export and import the same components will be processed! If a table</span><span class="fs13lh1-15"> </span><i class="fs13lh1-15"><span class="fs13lh1-15">t</span></i><span class="fs13lh1-15"> </span><span class="fs13lh1-15">is part in components</span><span class="fs13lh1-15"> </span><i class="fs13lh1-15"><span class="fs13lh1-15">compA</span></i><span class="fs13lh1-15"> </span><span class="fs13lh1-15">and</span><span class="fs13lh1-15"> </span><i class="fs13lh1-15"><span class="fs13lh1-15">compB</span></i><span class="fs13lh1-15">, for one of these components the table</span><span class="fs13lh1-15"> </span><i class="fs13lh1-15"><span class="fs13lh1-15">t</span></i><span class="fs13lh1-15"> </span><span class="fs13lh1-15">will not be exported! So the data file of one of the components will be incomplete. If lateron both components will be imported, this does not matter, as table</span><span class="fs13lh1-15"> </span><i class="fs13lh1-15"><span class="fs13lh1-15">t</span></i><span class="fs13lh1-15"> </span><span class="fs13lh1-15">will be imported with one of these components!<br><br></span></span><span class="fs13lh1-15"> </span></div></div></blockquote></blockquote></blockquote></blockquote></blockquote><div><ul><li><span class="fs13lh1-5">The 2nd above mentioned starting point will be realized by specifying the amount of parallel tasks <span class="cf1 cb1">(6)</span>.<br></span><div><span class="fs13lh1-5">On my small test system I set the value to 3 - means, for export as well as for import the tasks will be distributed to 3 files, balanced as good as possible based on the data size of the components. These 3 XML files can be processed in parallel. Each execution occupies a dialog work process.<br>Feel free to leverage the system with more tasks than 3. However, you should not use all available DIA work processes of your system, finally few work processes should be reserved for being able to have a look into the system.<br><br></span></div></li><li><div><span class="fs13lh1-5">If there are components with a huge amount of data, the balance regarding the data volume (and also the runtime) might become less optimized. Think of a single component with 100 GB data volume, whereas all other components in sum have 20 GB data volume only. The export and import of this single component would dominate the runtime. When the job has been finished for all other components, this single component would still be in process.<br><span class="fs13lh1-5">With a flag at "Split big components..." </span><span class="fs13lh1-5 cf1 cb1">(7)</span><span class="fs13lh1-5"> such a big component can be splitted into several parts and with this a better balancing of the parallel tasks can be achieved.<br>You can apply this splitting option also to the USER component. But the USER component is somehow special: for this component some "shadow tables" are used for export and import, and these shadow tables require a special step in front of the export (filling the shadow tables) and a special step after the import (processing the shadow tables and adjusting its data with the user tables). Therefore this is also a special option here. If you use it, you have to consider 2 additional XML files (will be generated if this flag is set), where this shadow table processing is implemented. In this example we leave this out, because in our system the data volume of the USER component is not that big. But for systems with lots of users this is a further option to reduce the runtime in case the data volume of the USER component dominates the others.<br><br></span></span></div></li><li><span class="fs13lh1-5"><span class="fs13lh1-5">With the input field <span class="cf1 cb1">(8)</span> we can use the parallelism option of R3trans.<br></span>The best amount of parallel child processes of R3trans depends on CPU's, database capacity, I/O, location of the database server etc. <br>You can find more details in <a href="https://me.sap.com/notes/1127194/D" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'SAP note 1127194', width: 180});" class="imCssLink">SAP note 1127194</a>. There is a rule of thumb given: <span class="fs13lh1-5">setting the parallel value in the range of 1 to 2 times the number of CPUs results in the highest performance gains.<br></span> <br></span></li><li><span class="fs13lh1-5">And finally we have to consider, that export and import are running in DIA work processes. Usually there is a time limit set for DIA work processes, ensuring that </span>long-running programs do not endlessly block dialog processes (profile parameters <span class="fs12lh1-5 ff1">rdisp/max_wprun_time</span> and <span class="fs12lh1-5 ff1">rdisp/scheduler/prio_.../max_runtime</span>).<br>Here <span class="cf1 cb1">(9)</span> we have the option to extend this maximum runtime temporarily. It can be set to 3 hours or the time limit can be completely switched off. <br>Activating this option leads to either...<br>- further tasks in the XML file in case you do not use parallel tasks <span class="cf1 cb1">(6)</span> <br>or<br>- additonal XML files in case you use parallel tasks. &nbsp;<br>As this article is about optimization of a system refresh, of course we use parallel tasks and therefore we have to consider the processing of 2 additonal XML files.</li></ul></div><div> </div><div><br></div><div>After clicking on "Execute" we <span class="fs13lh1-5">will get the list of the tables according to the PCA tool and also some size information. Feel free to use the possibility of setting filters to exclude components you want to get from the source system of the system refresh, so these components are not to be exported and imported lateron. You can use the ALV layouts to store the filter settings </span><span class="fs13lh1-5">so that you do not have to set the filters every time you use the program.</span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-02.png"  title="PCA tables with size information" alt="PCA tables with size information" width="900" height="652" /><br></div><div><br></div><div>After clicking on the "XML file" button we will be asked for the location for the generated XML files. In this example we already have prepared a directory with 3 directories inside for the single phases.</div><div><img class="image-2" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-03.png"  title="XML file generation for system refresh" alt="XML file generation for system refresh" width="628" height="94" /><br></div><div><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-04.png"  title="Specify the location for generated XML files" alt="Specify the location for generated XML files" width="650" height="411" /><br></div><div><br></div><div>The program now stores 8 XML files in the directory: </div><div><ul><li>3 for the export (as we specified 3 parallel tasks)</li><li>3 for the import</li><li>1 file for extending the maximum WP runtime</li><li>1 file for setting the maximum WP runtime back to default</li></ul></div><div><div><span class="fs13lh1-5">The components with their tables were distributed to 3 XML files, with consideration of their size - as the size is an indicator for the runtime approximately needed. For optimizing the runtime, the target is to start 3 tasks in the system with similar workload. If all 3 tasks need nearly the same runtime - and finish at nearly the same time - the balancing is quite good.</span></div></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-05.png"  title="Generated XML files" alt="Generated XML files" width="608" height="259" /><br></div><div><br></div><div>After the XML file generation the program gives some summarized information about the content. </div><div><img class="image-5" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-06.png"  title="Popup with information about components / tables in the XML file(s)" alt="Popup with information about components / tables in the XML file(s)" width="554" height="234" /><br></div><div><br></div><div>As we used the option for avoiding multiple exports/imports of the same tables, we now have a smaller amount of tables in comparison to the ALV list of the tables, which has 166 more lines!</div><div><img class="image-6" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-07.png"  title="List of PCA tables, some tables used in multiple components" alt="List of PCA tables, some tables used in multiple components" width="900" height="151" /><span class="fs13lh1-5"> </span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">The XML files contain the export and import stuff for each component. &nbsp;</span></div><div><img class="image-7" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-08.png"  title="XML file with export tasks of the components" alt="XML file with export tasks of the components" width="900" height="700" /><br></div><div><br></div><div>The other 2 generated XML files are dealing with the maximum runtime for DIA WP's. One for extending the runtime - to be executed in front of the export tasks - and one for resetting the maximum runtime to its default value after processing the data. </div><div><img class="image-9" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-17.png"  title="Changing the maximum runtime of DIA WP&#39;s" alt="Changing the maximum runtime of DIA WP&#39;s" width="1000" height="332" /><br></div><div><br></div><div>Of course, in front of the export some preparations are to be done. Beside the planning and announcement, before starting the export the users are to be locked and logged off, batch jobs are to be suspended etc. &nbsp;This has to be done in advance, and we can do this similar to the export - using the command line tool with an XML file. You will find an example for this in the "XML" folder of our product. </div><div><br></div><div><span class="fs13lh1-5">Since we now use tasks in parallel, the start of the pre-processing (including user locking, suspending batch jobs, etc., and the 3 export tasks) is no longer just a single call to the command-line tool "Shortcut for SAP systems".</span><br></div><div><span class="cf1 cb1">(1)</span> &nbsp;First we consider the XML file for extending the maximum WP runtime. </div><div><span class="cf1 cb1">(2)</span> &nbsp;Then we lock the user, kick them out of the system and suspend the batch jobs. </div><div><span class="fs13lh1-5"><span class="cf1 cb1">(3)</span> &nbsp;After finishing this the 3 export tasks are to be started <span class="imUl">in parallel</span>.</span></div><div><span class="fs13lh1-5">This makes it a little bit more complicated. Starting tasks in parallel on OS level is not a big issue on a Windows computer, but we also want to know </span><span class="imUl fs13lh1-5">when the tasks have been finished</span><span class="fs13lh1-5">. </span><span class="imUl fs13lh1-5">Thinking about automation, after finishing the export of all data, the system copy tasks - including the database copy - are to be started.</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">Ideally also automatically!</span></div><div><span class="cf1 cb1">(4)</span> At the end we revert the maximum WP runtime back to its default.</div><div><br></div><div>I copied the generated XML files for the Export into a directory for the prework and renamed them with "Export_task1.xml", <span class="fs13lh1-5">"Export_task2.xml" and </span><span class="fs13lh1-5">"Export_task3.xml". &nbsp;</span></div><div><span class="fs13lh1-5">Have a look at this command file "</span><span class="fs12lh1-5 ff1">main.cmd</span><span class="fs13lh1-5">", executing the prework of the system refresh, which uses a </span><span class="imUl fs13lh1-5">Powershell script</span><span class="fs13lh1-5"> that controls start and end of the parallel tasks:</span></div><div><img class="image-10" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-12.png"  title="Command file for systemrefresh prework" alt="Command file for systemrefresh prework" width="800" height="511" /><br></div><div><br></div><div>After the prework (extending maximum work process runtime, user locking etc.), <span class="fs13lh1-5">a Powershell script "</span><span class="fs12lh1-5 ff1">StartTasksAndWait.ps1</span><span class="fs13lh1-5">" is executed. You can find this script as part of all files used in this article <a href="https://www.shortcut-it.com/download/Example_Systemrefresh_runtime_optimized.zip" onmouseover="x5engine.imTip.Show(this, { text: 'Exemplary files for execution of a runtime optimized system refresh (pre- and postprocessing)', width: 180});" class="imCssLink">here</a> or supplied with our product (folder </span><span class="fs12lh1-5 ff1">xml</span><span class="fs13lh1-5">, file "</span><span class="fs12lh1-5 ff1">Example_Systemrefresh_runtime_optimized.zip</span><span class="fs13lh1-5">".</span></div><div><span class="fs13lh1-5">It works as following:</span></div><div><ul><li>it reads a file "<span class="fs12lh1-5 ff1">ParallelTasks.txt</span>" that contains the calls of the command line tool with the XML files for the export</li><li>for each line an asynchronous task is started </li><li>it periodically checks (default: every 5 seconds) whether the tasks are still active</li><li>after all tasks have been finished, the Powershell script ends.</li></ul><div>So in addition to this we have to fill the file "<span class="fs12lh1-5 ff1">ParallelTasks.txt</span><span class="fs13lh1-5">":</span><br></div></div><div><img class="image-12" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-13.png"  title="A file with the tasks to be executed in parallel" alt="A file with the tasks to be executed in parallel" width="511" height="98" /><br></div><div><br></div><div>The single command files for the export tasks are just calls of the command line tool with the XML files for the export:</div><div><img class="image-14" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-14.png"  title="The single command files of the parallel tasks" alt="The single command files of the parallel tasks" width="733" height="194" /><br></div><div><br></div><div><span class="fs13lh1-5">It may seem a bit complicated, but it is not.</span> Once setup, you can use it again and again. </div><div><br></div><div><span class="fs13lh1-5"><b>Finally we have a single command file, executable on OS level, automatable with any suitable tool, doing the complete prework including user locking, suspending batch jobs etc. and executing the export in parallel tasks in a balanced manner, saving much runtime!</b></span></div><div><br></div><div>After starting <span class="fs12lh1-5 ff1">main.cmd</span><span class="fs13lh1-5"> the procedure starts, and if you arrange the 4 raising console windows, it will look similar to this: </span></div><div><img class="image-13" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-15.png"  title="Running system refresh with parallel tasks" alt="Running system refresh with parallel tasks" width="900" height="482" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>The upper left window <span class="fs13lh1-5 cf1"><span class="cb3">(1)</span> </span><span class="fs13lh1-5">shows the console for </span><span class="fs13lh1-5">"</span><span class="fs12lh1-5 ff1">main.cmd</span><span class="fs13lh1-5">", the other windows are the 3 tasks for the export, started in parallel. In window <span class="cf1 cb3">(1)</span> the tasks (windows <span class="cf1 cb3">(2)</span>, <span class="cf1 cb3">(3)</span>, <span class="cf1 cb3">(4)</span>) will be checked perodically. </span><span class="fs13lh1-5">Once all tasks have been finished the prework of the system refresh is done - </span><b class="fs13lh1-5"><span class="fs13lh1-5">we saved much time by not exporting tables redundantly and by using parallel tasks! </span></b></div><div data-line-height="1.15" class="lh1-15"><hr></div><blockquote><div data-line-height="1.15" class="lh1-15"><div data-line-height="1.15" class="lh1-15"><i class="fs11lh1-15 cf2">When running command files in the Windows console, you may have sometimes noticed that the script strangely hangs until you press the Enter or Esc key. </i></div><div data-line-height="1.15" class="lh1-15"><i class="fs11lh1-15 cf2">The reason for this is a click into the console window (often done by mistake) in combination with a so-called "Quick Edit" mode. Find some details for example <span><a href="https://stackoverflow.com/questions/33883530/why-is-my-command-prompt-freezing-on-windows-10" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Why is my command prompt freezing on Windows 10?', width: 180});" class="imCssLink">here</a></span>.</i></div></div><div data-line-height="1.15" class="lh1-15"><i class="fs11lh1-15 cf2">When clicking into the window, the Quick Edit mode stops further outputs to the console window. If the command line tool is already running the tasks of an XML file, it does not have an impact on the command line tool's work. However, it blocks the script from continuing after the execution of the command line tool.</i></div><div data-line-height="1.15" class="lh1-15"><i class="fs11lh1-15 cf2">To avoid this, the Quick Edit mode should be deactivated, at least temporarily. There are several methods to do this:</i></div><div data-line-height="1.15" class="lh1-15"><i class="fs11lh1-15 cf2">- execute the command prompt as Administrator, then right-click on the title bar, choose "Properties" and deactivate "Quick Edit mode" in the options dialog.</i></div><div data-line-height="1.15" class="lh1-15"><i class="fs11lh1-15 cf2">- change the value for HKEY_CURRENT_USER/Console/QuickEdit to 0 using the Registry Editor (regedit).</i></div><div data-line-height="1.15" class="lh1-15"><i class="fs11lh1-15 cf2">- change the value for HKEY_CURRENT_USER/Console/QuickEdit to 0 by using this command:</i></div></blockquote><blockquote><blockquote><blockquote><div data-line-height="1.15" class="lh1-15"><span class="fs11lh1-15 cf2 ff1"><i>reg.exe add HKCU\Console /v QuickEdit /t REG_DWORD /d <span class="cb2">0</span> /f</i></span></div></blockquote></blockquote></blockquote><blockquote><div><div data-line-height="1.15" class="lh1-15"><i><span class="cf2"><span class="fs11lh1-15">If you like to stuck on the Quick Edit mode, you can add the "</span><span class="fs11lh1-15 ff1">reg.exe add HKCU...<span class="cb2">0</span> /f</span><span class="fs11lh1-15">" command to the "main.cmd" file at the start for disabling Quick Edit and the same with "</span><span class="fs11lh1-15"><span class="ff1">...</span><span class="ff1 cb2">1</span><span class="ff1"> /f</span></span><span class="fs11lh1-15">" at the end for activating it again.</span></span></i></div></div></blockquote><div><hr></div><div><b class="fs13lh1-5"><span class="fs13lh1-5">For the post-processing phase it is the same. </span></b><b class="fs13lh1-5"><span class="fs13lh1-5">Especially for the import phase we will save a lot of time with the combination of parallel tasks (using multiple work processes in the SAP system) and the parallelism option for R3trans. It could not go any faster!</span></b></div><div><img class="image-8" src="https://www.shortcut-it.com/images/Speed-up-the-system-refresh-09.png"  title="R3trans import with 10 child processes" alt="R3trans import with 10 child processes" width="850" height="289" /><span class="fs13lh1-5"><b><br></b></span></div><div><span class="fs13lh1-5"><b><br></b></span></div><div><span class="fs13lh1-5">Find all files necessary for the pre- and postprocessing of a system refresh supplied with our product (folder </span><span class="fs12lh1-5 ff1">xml</span><span class="fs13lh1-5">, file "</span><span class="fs12lh1-5 ff1">Example_Systemrefresh_runtime_optimized.zip</span><span class="fs13lh1-5">"), easily adoptable to your needs. Alternatively you can download the ZIP file <a href="https://www.shortcut-it.com/download/Example_Systemrefresh_runtime_optimized.zip" onmouseover="x5engine.imTip.Show(this, { text: 'Exemplary files for execution of a runtime optimized system refresh (pre- and postprocessing)', width: 180});" class="imCssLink">here</a>.</span></div><div><span class="fs13lh1-5"><b> </b></span></div></div>]]></description>
			<pubDate>Tue, 27 Aug 2024 09:30:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-2197683_thumb.jpg" length="311405" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?speed-up-the-system-refresh</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000026</guid>
		</item>
		<item>
			<title><![CDATA[Stop the mess in your IDoc processing]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000025"><div><hr></div><div></div><div><i class="fs14lh1-5">Are the IDocs in your system piling up into an ever-increasing chaos? Is your database constantly growing and is it taking longer and longer to process incoming IDocs or to list them in BD87 and similar transactions?</i></div><div><i class="fs14lh1-5"><br></i></div><div><i class="fs14lh1-5">Read here how to clear up this mess.</i></div><div><hr></div><div>Recently I saw it again. <span class="fs13lh1-5"><b>The IDoc tables... what a mess!</b></span> </div><div><ul><li>Millions of IDocs that could be archived - still remaining in the system. </li><li>Lots of IDocs, queued into processing again and again, although they were created years ago.</li></ul><div><br></div></div><div><div>In the observed SAP system, the IDoc tables occupied ~700 GB in the database (without the indexes). Of course, these ~700 GB were copied to the quality system and another test system as part of a system refresh, so we are faced with a multiplied wastage of space. And as you can imagine, this is not only a waste of storage space, but also of time and money.</div></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">But more than this waste of resources and money, </span><span class="fs13lh1-5">I think that constantly processing - or attempting to process - years old IDocs is unnecessary and dangerous.</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">The hit list of these IDocs was led by an Idoc with ~230000 status records. It was created </span><span class="fs13lh1-5"><b>~8.5 years ago, and from that point in time up to 7.5 years the system tried to process this Idoc again and again</b></span><span class="fs13lh1-5">. Approx. 1 year ago, someone took pity on the IDoc and set it to status '68' so that no further processing attempts were made.</span></div><div><div>How much CPU capacity was wasted on this ancient Idoc during this time?</div></div><div><br></div><div><div>This IDoc topped the "hit list", but it was not an isolated case. Second place went to an IDoc with 170000 status records. And in total there were more than 200 IDocs, each with more than 10,000 status records. What a waste of processing time and database space!</div></div><div><br></div><div><span class="fs13lh1-5">It is clear, that processing of these old IDocs does not make sense. Ok, so what is the reason for this waste of space, time and money?</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">In a nutshell, I would say it is just a lack of care. The IDocs seem to me like </span><span class="fs13lh1-5">unloved dirty children within the data categories. </span><span class="fs13lh1-5">Unlike master data for example, where a lot of value and effort is put into correct data maintenance, there is no such awareness with IDocs. So, what went wrong here?</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">1.: It seems there is no adequate </span><span class="fs13lh1-5"><b>monitoring </b></span><span class="fs13lh1-5">for the processing of IDocs.</span></div><div><div>IDocs are a bit of a no-man's land. Since they are used in interfaces, their actual nature is technical. But they mostly contain application data. So who should take care of them - IT support or the user department? <span class="fs13lh1-5">If in doubt, then... often no one does.</span></div></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">2.: For the same reason, unfortunately, </span><span class="fs13lh1-5"><b>housekeeping </b></span><span class="fs13lh1-5">often does not take place.</span><br><span class="fs13lh1-5">From my point of view housekeeping for IDocs should contain at least these activities: </span></div><div><ol><li><div class="fs13lh1-5">Set old/obsolete Inbound IDocs to status '68' for avoiding further processing attempts and enabling archiving for these IDocs.<br><div>The 'quality' of an Idoc deteriorates with age. Should an IDoc that was created 2 weeks ago actually still be processed? Or is its content now outdated? <span class="fs13lh1-5">Has the IDoc been replaced by a newer one so that its processing would cause a double booking?</span><br></div></div></li><li>Archiving!<br>"IDoc" stands for "Intermediate Document". It is 'only' a container for data to be processed. Once the data is processed, the IDoc usually is not important anymore and can be archived (and deleted in the system afterwards). For this it is important that an IDoc has an appropriate status that allows archiving (according to table <span class="fs13lh1-5 ff1">STACUST</span>). For most of the Inbound IDocs this should be status '53' (Application document posted), for faulty IDocs status '68'. Notice: status '68' will not be set automatically by the SAP system. </li></ol><div><br></div></div><div><span class="fs13lh1-5">But with only few activities you can achieve a really big improvement for the situation regarding IDocs: </span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>1.: Assign responsibility for IDocs</b></span></div><div><span class="fs13lh1-5">This could be the most difficult part. The responsibility could take place in the user or in the IT department, depending on the IDoc message type. However, although it might be difficult to find someone who takes over the responsibility, there should be someone for each IDoc type! And the responsibles should be supported with updates about failed and not processed IDocs, </span><span class="fs13lh1-5">e.g. via scheduling </span><span class="fs13lh1-5 ff1">RSEBWE02</span><span class="fs13lh1-5"> with suitable selection criteria and mailing the list. Of course a daily check of BD87, WE02 or others is also an option. </span><span class="fs13lh1-5">Anyway, incorrect IDocs should be investigated. It may be that there are missing settings or table entries that prevent processing - this can often be fixed quickly. Or the IDocs contain incorrect data - in this case the sender should be informed and asked to correct the data.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>2.: Take old IDocs out of the race</b></span></div><div><div>The case mentioned above, in which the system was forced to process an IDoc that was several years old over and over again, is extreme (but true!). Set an age limit after which IDocs are no longer processed. Of course, this limit can also be set in the variants for the SAP standard programs <span class="fs13lh1-5 ff1">RBDAPP01</span> and <span class="fs13lh1-5 ff1">RBDMANI2</span>, but naturally there are many variants that you may not have ongoing control over.</div><div><span class="fs13lh1-5">I think 2 - 4 weeks is a reasonable age limit</span>.</div></div><div>Taking old Inbound IDocs out of the race can be done via <span class="imUl">setting the status to '68' (Error - no further processing)</span>. Possibly in your release there is an SAP report <span class="fs13lh1-5 ff1">RC1_IDOC_SET_STATUS</span><span class="fs13lh1-5"> available that can do this, but unfortunately each and every Idoc number has to be specified. So for an automatic solution this report, although it might be available, can not be used.</span></div><div><div>But it is not necessary to invest time and effort in the development of an ABAP program. </div></div><div><span class="fs13lh1-5">With "Shortcut for SAP systems" it can be done easily by using the "Update table data" function:</span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Stop-the-mess-in-your-Idoc-processing---01.png"  title="Update table data function - Set status &#39;68&#39; for outdated Idocs" alt="Update table data function - Set status &#39;68&#39; for outdated Idocs" width="781" height="805" /><span class="fs13lh1-5"><br></span></div><div>First we have to select the connection to the SAP system <span class="cf1 cb1">(1)</span> and the client <span class="fs13lh1-5 cf1 cb1">(2)</span><span class="fs13lh1-5">, then we specify the update: the table containing the current IDoc status is "EDIDC" <span class="cf1 cb1">(3)</span>, and the field "STATUS" is to be updated with '68' (Error - no further processing) <span class="cf1 cb1">(4)</span>. </span><br></div><div><span class="fs13lh1-5"> </span></div><div>We restrict the update <span class="cf1 cb1">(5)</span> to the Inbound IDocs (<span class="fs12lh1-5 ff1">DIRECT = '2'</span>) that were created a month ago or earlier (<span class="fs12lh1-5 ff1">CREDAT LT @( sy-datum - 30 )</span>) and which have a non-archivable status (<span class="fs12lh1-5 ff1">STATUS in ( select distinct STATUS from STACUST where ARCHFL = ' ' )</span>). Another option would be to select the IDocs with <span class="fs12lh1-5 ff1">STATUS in ('64','66')</span> ('64' = <span class="fs13lh1-5">IDoc ready to be passed to application, '66' = IDoc is waiting for predecessor IDoc (serialization)) - this would be the IDocs selected by SAP standard program for Inbound IDoc processing </span><span class="fs13lh1-5 ff1">RBDAPP01</span><span class="fs13lh1-5"> - or </span><span class="fs12lh1-5 ff1">STATUS in ('51','64','66')</span><span class="fs13lh1-5"> - this would also include the IDocs selected by SAP standard program </span><span class="fs13lh1-5 ff1">RBDMANI2</span><span class="fs13lh1-5"> (Repeat processing of IDocs with error status). </span></div><div><span class="fs13lh1-5">Think about it and find an agreement - preferably with the user department or whoever is responsible for the Idocs. A further criteria is the message type, so you can also use different selection criteria depending on the message type.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Once you have finished this, we should </span><span class="fs13lh1-5"><b>think about an automatism</b></span><span class="fs13lh1-5"> - finally we do not want to do this manually again and again. </span></div><div><span class="fs13lh1-5">For this you can either create a variant for the "Update table data" function</span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Stop-the-mess-in-your-Idoc-processing---02.png"  title="Saving a variant for setting status &#39;68&#39; for outdated Idocs" alt="Saving a variant for setting status &#39;68&#39; for outdated Idocs" width="779" height="695" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>or use an XML file: </div><div><img class="image-2" src="https://www.shortcut-it.com/images/Stop-the-mess-in-your-Idoc-processing---03.png"  title="XML file for Sc4SAP command line tool" alt="XML file for Sc4SAP command line tool" width="1090" height="442" /><br></div><div><br></div><div>Personally I prefer using an XML file. With an XML file it is not necessary to create a variant for the "Update table data" function - all necessary information is given in the XML file and it is quite easy to use the XML file also for another system or just extend the XML file for doing the same task in other systems. </div><div><br></div><div>Running the <a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool improves the automation in your SAP systems!', width: 180});" class="imCssLink">"Shortcut for SAP systems" command line tool</a> with the XML file would be done like this:</div><div><img class="image-3" src="https://www.shortcut-it.com/images/Stop-the-mess-in-your-Idoc-processing---04.png"  title="Command line tool, setting outdated Idocs to status &#39;68&#39;" alt="Command line tool, setting outdated Idocs to status &#39;68&#39;" width="800" height="451" /><br></div><div><br></div><div>Here we see a warning (<span class="fs12lh1-5 ff1">"Sc4SAP command line tool finished with RC 4"</span>). This is because with this execution no IDocs were updated - for today it was already done. But the next days - assuming we turn the execution of the command line tool into automation - IDocs for update will be found and with status '68' there will be no further attempts for processing of IDocs older than 30 days anymore. As the command line tool works on OS level, you can easily add this one-liner into an automatism (simplest way to do this would be the <span class="fs13lh1-5">Windows Task Scheduler, but often there are more sophisticated automation tools in use that can do this simple job).</span></div><div><br></div><div>You can also add a list of program <span class="fs13lh1-5 ff1">RSEIDOC2</span> in front of the deletion for getting some information about the IDocs to be updated. Just create a variant for <span class="fs13lh1-5 ff1">RSEIDOC2</span> with the same selection criteria as you use for the deletion and run the report in front of the deletion. This can be done in an additional task for <a href="https://www.shortcut-it.com/the-individual-task-types.html#ExecProgram" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The &quot;ExecProgram&quot; task in the Sc4SAP command line tool', width: 180});" class="imCssLink">executing a program</a> in the XML file in front of the update task or via job scheduling in the SAP system. </div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>3.: Implement IDoc archiving</b></span></div><div><span class="fs13lh1-5">Also this should be done on a regularly basis to avoid the IDoc tables from growing endlessly. Keep in mind that likely the system will be used for system refreshes of your Quality and/or test systems - copying Gigabytes of outdated and archivable Idocs does not make sense, it will cause costs for hardware and it will unnecessarily consume time in the system refresh process.</span></div><div><span class="fs13lh1-5">Find <a href="https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_752/8f3819b0c24149b5959ab31070b64058/4aa93cb705e24458e10000000a42189b.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'SAP documentation &quot;Achiving Idocs&quot;', width: 180});" class="imCssLink">here</a> the SAP documentation about IDoc archiving.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>4.: Start now - do it!</b></span></div><div><div>Although the 1st task may not be completed yet, the 2nd and 3rd task can be implemented! Every day you postpone this will result in larger Idoc tables and unnecessary space consumption in the database. You will probably never get rid of this! Since there is constant IDoc traffic in the system, reorganizing the IDoc tables resp. the tablespaces to shrink the used space in the database becomes difficult or even impossible. <br><div><span class="fs13lh1-5"><b>Once implemented, you will be rewarded with the end of permanent growth in the IDoc tables, which will benefit your SAP system and thus your users and the entire company!</b></span></div></div><div><br></div><div class="imTACenter"><img class="image-4" src="https://www.shortcut-it.com/images/large-8512014.jpg"  title="SAP hero of your company!" alt="SAP hero of your company!" width="400" height="400" /><br></div></div></div>]]></description>
			<pubDate>Tue, 06 Aug 2024 12:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Stop-the-mess-in-your-Idoc-processing_thumb.png" length="1383741" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?stop-the-mess-in-your-idoc-processing</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000025</guid>
		</item>
		<item>
			<title><![CDATA[Segregation of duties - setting / adjusting the user group]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000024"><div><div><hr></div><div><i class="fs14lh1-5">Segregation of duties is important for preventing the company from risks by misuse of authorizations. For user administrators and role assigners in SAP systems the user group - as part of the user master data - in combination with excluding the own user group in the authorizations is a way to implement this.</i></div><div><i class="fs14lh1-5"><br></i></div><div><i class="fs14lh1-5">Read in this article, how simple it can be to ensure that the right user group is assigned to user admins and role assigners.</i><br></div></div><div><i class="fs14lh1-5"><br></i></div><div><i class="fs14lh1-5">Even apart from this perhaps special use case, this article shows how easily and quickly "Shortcut for SAP systems" can be used and how the often time-consuming development and deployment of ABAP reports can be reduced!</i></div><div><hr></div><div>In a nutshell, this is the principle how to implement this segregation of duties to user admins and role assigners:</div><div>1.: Assign a specific user group to your user admins and role assigners, e.g. "SUPER_DLG1" for the 1st, "SUPER_DLG2" for the 2nd person and so on.</div><div><img class="image-1" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---01.png"  title="" alt="User group in user master data" width="600" height="350" /><br></div><div>2.: Use a specific role for each user admin / role assigner, which has a restricted range for the field CLASS in the authorization(s) for object S_USER_SAS (resp. S_USER_GRP in case you have deactivated the use of S_USER_SAS). Let's name it Z_USER_ADMIN_1 / ...2 and so on.</div><div><img class="image-2" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---02.png"  title="" alt="Excluded user group in S_USER_SAS" width="600" height="276" /><br></div><div><br></div><div>With these settings the segregation of duties for the displayed user is fine. The user group of the user admin / role assigner is excluded in the assigned role, therefore the self-maintenance is not possible. <span class="fs13lh1-5"><b>At the moment. Now. But... the role can be assigned also to another user</b></span>, and possibly the user group will not be adjusted - this is likely the case when the role is assigned via an IdM tool. Or the user group is going to be changed by mistake. <span class="fs13lh1-5"><b>If this pair of role assignment on the one hand and the assigned user group on the other hand do not match, it is possible to maintain the own account. </b></span><span class="fs13lh1-5"><b>This will be noticed at the next audit at the latest!</b></span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>So, our requirement is, that each user with a valid assignment of role Z_USER_ADMIN_1 (...2, ...3,...) must be assigned to user group SUPER_DLG1 (...2, ...3, ...) - now, next week, next month - we must be able to rely on it.</b></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">How to achieve this? Of course you can develop a program that does this. Here I would like to describe a method faster than this.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">In "Shortcut for SAP systems" we have the "Update table data" which can easily be used for this. No development of an ABAP necessary, just spend a minute or two into an SQL UPDATE statement:</span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---03.png"  title="" alt="" width="781" height="749" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Of course we have to choose the connection to the SAP system <span class="cb1">(1)</span>. Then we specify the client <span class="cb1">(2)</span> - because the function also allows data to be updated in other clients than the one used in the connection. The user group is stored in table USR02 <span class="cb1">(3)</span> in field CLASS <span class="cb1">(4)</span>, and the new value should be 'SUPER_DLG_1' <span class="cb1">(5)</span> for all users that <span class="cb1">(6)</span></div><div>- currently are not assigned to user group 'SUPER_DLG1,</div><div>- have user type 'A' or 'S' (means: dialog users)</div><div>- are currently assigned to roles Z_USER_ADMIN_1 or Z_AUTH_ASSIGN_1</div><div><br></div><div>Now let's make a test. We assign another user group to the user, after this we execute the "Update table data" function. </div><div><img class="image-3" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---04.png"  title="" alt="" width="781" height="749" /><br></div><div><br></div><div>Clicking on the "View output" button we can see that an update for 1 record was done. And consequently the user group SUPER_DLG1 is assigned to the user. </div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---05.png"  title="" alt="" width="632" height="337" /><br></div><div><br></div><div>So this works. <span class="fs13lh1-5"><b>But there is one point open: we also want users to be assigned to another group in case the role Z_USER_ADMIN_1 is no longer assigned</b></span> - finally these users are to taken out of this special user group in case the also special authorizations are not there anymore. <span class="fs13lh1-5">For this we have to execute a second update with only 3 small changes:</span></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---06.png"  title="" alt="" width="781" height="749" /> </div><div>With this we assign another user group (here: 'IT (Others)') for users currently assigned to group SUPER_DLG1, but without an assignment to the roles Z_USER_ADMIN_1 and Z_AUTH_ASSIGN_1 for the current date. This reverts these users 'back to normal users' and makes them maintainable by the current administrators.</div><div><br></div><div><span class="fs13lh1-5"><b>Up to now - in the context of setting up the procedure - we executed the updates of the user group manually. But of course is our goal to automate this.</b></span> </div><div><br></div><div>We can do this with the <a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool of &quot;Shortcut for SAP systems&quot;', width: 180});" class="imCssLink">command line tool</a> with variants...</div><div><img class="image-6" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---07.png"  title="" alt="" width="846" height="537" /><br></div><div>or by using XML files. An XML file for assigning the user group SUPER_DLG1 (for users with current assignment of the specific roles) and for removing the user group (for users which currently have user group SUPER_DLG1, but are not assigned anymore to the specific roles) would look like this: </div><div><img class="image-7" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---08.png"  title="" alt="XML file for adjustment user group of user admins / auth.assigners" width="900" height="728" /><br></div><div><br></div><div>With an XML file you do not need to specify single variants for each system you want to apply this procedure. So with respect to use this for more than one system, I personally prefer to use XML files for the command line tool instead of variants. You can easily add more tasks to the XML file - for example for doing the same for the 2nd user admin / authorization assigner or doing this for other SAP systems. </div><div><br></div><div>Ok, let's run the command line tool with the XML file. </div><div><img class="image-8" src="https://www.shortcut-it.com/images/Segregation-of-duties---setting-user-group---09.png"  title="" alt="Execution of command line tool for adjusting user group" width="900" height="630" /><br></div><div><br></div><div>Ooops, first task ran fine, but the 2nd ended with a warning! Why? </div><div>It is just because the 2nd task did not find any data to be updated. <span class="fs11lh1-5 cf1 ff1 cb2">"Done. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;updated rows"</span><br></div><div>There was no user currently assigned to user group SUPER_DLG1 but without valid assignment to the specific roles. Just nothing to do...</div><div><br></div><div><span class="fs13lh1-5"><b>As the command line tool works on OS level, this can be brought easily into an automatism, running daily on your SAP systems.</b></span> <span class="fs13lh1-5"><b>With this you can be sure that the segregation of duties for user admins and authorization assigners is ensured in the system and there are no more findings for it in the next audit.</b></span></div><div><span class="fs13lh1-5"><b><br></b></span></div><div class="imTACenter"><img class="image-9" src="https://www.shortcut-it.com/images/large-8707270.png"  title="" alt="" width="300" height="300" /><span class="fs13lh1-5"><b><br></b></span></div></div>]]></description>
			<pubDate>Mon, 08 Jul 2024 14:30:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-3188128_thumb.jpg" length="172396" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?segregation-of-duties---setting-adjusting-the-user-group</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000024</guid>
		</item>
		<item>
			<title><![CDATA[Extracting data from the SAP system - Part 3 - Output of reports]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000023"><div><div>In practice, it is often necessary to extract data from the SAP system, whether for further processing outside the SAP system, for transfer to other SAP systems, or for other purposes. <a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part1-table-data-1" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Extracting data from the SAP system - Part 1 - Table data (1)&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">Part 1 of this blog</a> was about extracting table data into a file, <a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part2-table-data-2" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system---part-2.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Extracting data from the SAP system - Part 2 - Table data (2)&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">part 2</a> explained the different formats. This part is about how to extract <span class="fs13lh1-5"><b>output from reports</b></span>.</div></div><div><br></div><div><span class="imUl">Given is the following use case:</span> as it is for compliance reason necessary to archive information of the users on the system (for a longer time, even if they were deleted), we recognize a gap in the SAP standard functionality. Lots of attributes of the user master data are captured in the change documents, but we can not find any information for the <span class="imUl fs13lh1-5">name</span> and the <span class="imUl">email address</span>. In transaction SUIM we have a report available <span class="fs12lh1-5 ff1">(RSUSR002)</span><span class="fs13lh1-5"> that offers this information. Therefore we decide to schedule the program </span><span class="fs12lh1-5 ff1">RSUSR002</span><span class="fs13lh1-5"> with a suitable ALV layout on a daily basis and extract the output into a directory.</span><br></div><div><br></div><div>Ok, let's prepare some things in the SAP system:</div><div><ol><li>Add an ALV layout (let's name it <span class="fs12lh1-5 ff1">"/NAME+EMAIL"</span>), containing the user ID, the full name and the email address.<br><img class="image-0" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---01.png"  title="Creating the ALV layout for the report" alt="Creating the ALV layout for the report" width="600" height="493" /><br></li><li>Add a variant for the report (let's name it <span class="fs12lh1-5 ff1">"4Archiving"</span>), using the ALV layout. <br><img class="image-1" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---02.png"  title="Report variant" alt="Report variant" width="600" height="453" /><br></li></ol><div>That is all we need to do in the SAP system. Done within a minute.</div><div><br></div><div>Now we switch to our application "Shortcut for SAP systems" and create a variant for the function "Execute program" for executing the report <span class="fs12lh1-5 ff1">RSUSR002</span> with the variant <span class="fs12lh1-5 ff1">"4Archiving"</span>:</div><div><img class="image-2" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---03.png"  title="Specifying the variant in Shortcut for SAP systems" alt="Specifying the variant in Shortcut for SAP systems" width="1000" height="658" /><br></div><div><br></div><div>After saving the variant ("PX1/100 user master data for archiving") we make a short test whether the result is as expected. Just click on the <span class="fs12lh1-5 ff1">Execute</span> button and after few seconds the list is available.</div><div><img class="image-3" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---04.png"  title="Result of executing the report" alt="Result of executing the report" width="1000" height="597" /><br></div><div><br></div><div><span class="fs13lh1-5">Looks good. The "Save" button in the viewer enables us to save the list in a file.</span></div><div><img class="image-7" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---08.png"  title="Saving the list in a file" alt="Saving the list in a file" width="400" height="104" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"></span><span class="imUl fs13lh1-5">But of course we do not want to do this manually each and every day.</span><span class="fs13lh1-5"> So let us implement a </span><span class="fs13lh1-5"><b>periodic run via the <a href="https://www.shortcut-it.com/sc4sapDocu/All-In/Commandlinetool.html" onclick="return x5engine.imShowBox({ media:[{type: 'iframe', url: 'https://www.shortcut-it.com/sc4sapDocu/All-In/Commandlinetool.html', width: 1920, height: 1080, description: 'The command line tool of &quot;Shortcut for SAP systems&quot;'}]}, 0, this);" class="imCssLink">command line tool</a></b></span><span class="fs13lh1-5">.</span><br></div><div><br></div><div>We use the command line tool using the saved variant ("PX1/100 user master data for archiving") and store the output list in a file which contains - beside the information of the system / client - the <span class="fs13lh1-5"><b>date</b></span> of the list. In the file containing the call of the command line tool we specify the filename using the environment variable <span class="fs12lh1-5 ff1">%date%</span>, then we call the command line tool with </div><div><ul><li>the function as 1st argument, </li><li>the variant as 2nd argument <br>and </li><li>the target file for the output as 3rd argument.</li></ul></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---05.png"  title="A command file for calling the command line tool" alt="A command file for calling the command line tool" width="875" height="254" /><br></div><div><br></div><div>Let's test it on the Windows command prompt...</div><div><img class="image-5" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---06.png"  title="Calling the command line tool via console" alt="Calling the command line tool via console" width="800" height="418" /><br></div><div><br></div><div>... and have a look into the written file:</div><div><img class="image-6" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-3---07.png"  title="Extracted data from the SAP system in a file" alt="Extracted data from the SAP system in a file" width="1000" height="560" /><br></div><div><br></div><div><span class="fs13lh1-5"><b>Good, works perfectly!</b></span> Now we can <span class="fs13lh1-5"><b>schedule this in a periodic task, using an automation software</b></span> (this ranges <span class="fs13lh1-5">from simple tools such as the Windows Task Scheduler to complex automation applications such as Automic Automation (formerly UC4), ActiveBatch, etc.). In case you use the Windows Task Scheduler, have a look into <a href="https://www.shortcut-it.com/blog/index.php?audit-finding-developer-keys-in-productive-system" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/large-4189560.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Audit finding: developer keys in productive system&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this blog article</a> </span><span class="fs13lh1-5">which describes doing this.</span></div><div><div><br></div></div></div><div><hr></div><div><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part1-table-data-1" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Extracting data from the SAP system - Part 1 - Table data (1)&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">Part 1: Extracting data from the SAP system - Part 1 - Table data (1)</a></span></div><div><div><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part2-table-data-2" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system---part-2.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Extracting data from the SAP system - Part 2 - Table data (2)&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">Part 2: Extracting data from the SAP system - Part 2 - Table data (2)</a></span></div></div></div>]]></description>
			<pubDate>Thu, 14 Dec 2023 13:02:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Extracting-data-from-the-SAP-system---part-3_thumb.png" length="61190" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?extracting-data-from-the-sap-system-part-3-output-of-reports</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000023</guid>
		</item>
		<item>
			<title><![CDATA[Extracting data from the SAP system - Part 2 - Table data (2)]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000020"><div>In practice, it is often necessary to extract data from the SAP system, whether for further processing outside the SAP system, for transfer to other SAP systems, or for other purposes. <a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part1-table-data-1" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Extracting data from the SAP system - Part 1 - Table data (1)&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">Part 1 of this blog</a> was about extracting table data into a file with the <span class="fs13lh1-5"><b>"View table data"</b></span> function. There is also another function - <span class="fs13lh1-5"><b>"Download / Upload table data"</b></span> -, offering other possibilities: <span class="fs13lh1-5"><b>data can be backed up, restored and transferred to other systems / clients</b></span>.</div><div><br></div><div>In the blog article <a href="https://www.shortcut-it.com/blog/index.php?how-to-copy-idocs-from-one-system-to-another" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Blog article &quot;How to copy Idocs from one system to another?&quot;', width: 180});" class="imCssLink">"</a><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?how-to-copy-idocs-from-one-system-to-another" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Blog article &quot;How to copy Idocs from one system to another?&quot;', width: 180});" class="imCssLink">How to copy Idocs from one system to another?"</a> it is described how to use this function for copying Idocs from the Production system to a Quality or Test system / client. To be honest, apart from what is written about the "Download / upload table data" function in that article there is not so much to add.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">But with regard to the different functions and file types, you might ask yourself what function and what file type is suitable for fulfilling your aim. Therefore, you will find help here to make the right decision. Before we deal with the file types, let us start by having a closer look to the </span><span class="fs13lh1-5"><b>functions</b></span><span class="fs13lh1-5">.</span><br></div><div><span class="fs13lh1-5"><br></span></div><div><ul><li><span class="fs13lh1-5">The "View table data" function (currently) does not offer a selection of records to be processed. </span><span class="fs13lh1-5">This is possible with the "Download / upload table data" function, using the </span><span class="fs12lh1-5 ff1">'Where condition'</span><span class="fs13lh1-5"> - a free text field where you can use the ABAP features available in the </span><span class="fs13lh1-5"><a href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenwhere_logexp.htm" onclick="return x5engine.imShowBox({ media:[{type: 'iframe', url: 'https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenwhere_logexp.htm', width: 1920, height: 1080, description: 'The logical expressions sql_cond in the WHERE condition'}]}, 0, this);" onmouseover="x5engine.imTip.Show(this, { text: 'The logical expressions sql_cond in the WHERE condition', width: 180});" class="imCssLink">logical expession in the WHERE clause of a SELECT statement</a></span><span class="fs13lh1-5">, depending on the release of the targeted SAP system. <br><br></span></li><li><span class="fs13lh1-5">Also the files created by the "View table data" function are not suitable for using them as source for an upload in the "Download / upload table data" function. <span class="imUl">When it is about downloading and uploading the data again (e.g. for a data transfer)</span>, you have to use the <span class="imUl">"Download / upload table data"</span> function.<br><br></span></li><li><span class="fs13lh1-5">When your aim is to extract data that is to be used </span>for <span class="imUl">further processing outside the SAP system</span> (or as <span class="imUl">input file for processing the data in another SAP system</span>), the "View table data" function should be used. <br><br></li></ul><div>Both the "View table data" function and the "Download / upload table data" function offer different <span class="fs13lh1-5"><b>file types</b></span>:<br><br></div><div><ul><li>The "View table data" function offers a <span class="fs13lh1-5"><b>plain text</b></span> format and a <span class="fs13lh1-5"><b>CSV</b></span> format. <br>The plain text format is a good choice when the data is to be used for further processing outside the SAP system (or for using an input file for another SAP system) - The record structure corresponds to the table definition in the Data Dictionary.<br><img class="image-2" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-2---01.png"  title="View table data - file type .txt (plain text)" alt="View table data - file type .txt (plain text)" width="750" height="294" /><br>The CSV format is a good choice for using the file in a Spreadsheet application (like Microsoft Excel). By using this format also header info about the single columns will be written into the file.<br><img class="image-3" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-2---02.png"  title="View table data - file type .csv (comma separated values)" alt="View table data - file type .csv (comma separated values)" width="900" height="341" /><br><br></li><li>The "Download / upload table data" function offers 3 file types:</li></ul></div></div><blockquote><blockquote><blockquote><div><div><ol><li><span class="fs13lh1-5"><b>"ASC" - ASCII format</b></span>. The table is transferred as text. Conversion exits are performed. The format is easily readable in a text editor. This file type is not suitable when your intention is to use the file for an upload lateron in an SAP system. <br><img class="image-4" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-2---03.png"  title="Download table data - file type &#39;ASC&#39; (ASCII)" alt="Download table data - file type &#39;ASC&#39; (ASCII)" width="750" height="333" /><br></li><li><span class="fs13lh1-5"><b>"BIN" - &nbsp;Binary format</b></span>. There is no formatting and no codepage conversion. The data is interpreted row by row; it is not formatted by columns. The readibility in a text editor is poor. <br>This format is a good choice for saving data and restore it lateron in the same system or in a system with <span class="imUl">same character set and endianess</span>. <br><img class="image-5" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-2---04.png"  title="Download table data - file type &#39;BIN&#39; (Binary format)" alt="Download table data - file type &#39;BIN&#39; (Binary format)" width="900" height="296" /><br></li><li><span class="fs13lh1-5"><b>"DAT" - Column-by-column transfer</b></span>. With this format, the data is transferred as text as with ASC. However, no conversion exits are performed and the columns are separated by tab characters. This format is a good choice for saving data and restoring / transferring it lateron <span class="imUl">in another SAP system, possibly with another character set and/or endianess</span>. The readibility in a text editor is good, <span class="imUl">enabling you also to modify the file and adjust values</span> in front of uploading it in an SAP system.<br><img class="image-6" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---part-2---05.png"  title="Download table data - file type &#39;DAT&#39; (Column-by-column transfer)" alt="Download table data - file type &#39;DAT&#39; (Column-by-column transfer)" width="750" height="364" /><br><span class="fs13lh1-5"><b>Consider the representation of dates and times, which is dependent on the settings of the user used in the connection!</b></span> Therefore, when using this format for upload again - maybe in another system - the settings of the user for the decimal notation, the date and the time format need to be the same (transaction SU01, tab "Defaults").</li></ol><div><br></div></div></div></blockquote></blockquote></blockquote><div><div>Although the "Download / upload table data" function is suitable for saving / restoring / transferring data between SAP systems: if it is about processing the <span class="imUl">whole table (all records, resp. for client dependent tables all records in a client)</span>, using <a href="https://www.shortcut-it.com/en/datacorrection.html#CopyDataWithR3trans" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Process table data using R3trans', width: 180});" class="imCssLink">"Process table data using R3trans"</a> usually is the recommended function.</div></div><div><hr><div><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part1-table-data-1" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Extracting data from the SAP system - Part 1 - Table data (1)&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">Part 1: Extracting data from the SAP system - Part 1 - Table data (1)</a></span></div><div><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part-3-output-of-reports" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system---part-3.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Extracting data from the SAP system - Part 3 - Output of reports&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink"><span class="fs13lh1-5">Part 3: </span><span class="fs13lh1-5">Extracting data from the SAP system - Part 3 - Output of reports</span></a></div></div></div>]]></description>
			<pubDate>Tue, 01 Aug 2023 08:25:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Extracting-data-from-the-SAP-system---part-2_thumb.png" length="61165" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?extracting-data-from-the-sap-system-part2-table-data-2</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000020</guid>
		</item>
		<item>
			<title><![CDATA[How to copy Idocs from one system to another?]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000021"><div><hr></div><div><i class="fs14lh1-5">Having recent data on quality, test systems and test clients is quite useful for speeding up problem fixing and development. Idocs are a common message type for business data. Read here, how easy it is to provide recent Idocs of the production system to your quality or test system.</i></div><div><hr></div><div>In the SAP community you will find lots of questions related to this problem. Usually the answer is to use WE19 for writing the Idoc data into a file. This file then can be used for inserting the Idoc in another system / client. If it is about different systems, typically you have to download the file from the source SAP system and upload it in the target SAP system. <span class="fs13lh1-5">The "Inbound File" function is to be processed for each and every Idoc you want to copy. </span><br></div><div><img class="image-0" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---01.png"  title="WE19 - Inbound file function" alt="WE19 - Inbound file function" width="704" height="357" /><br></div><div><br></div><div><div><b><span class="fs13lh1-5">For a single or a few Idocs, this may be a reasonable task. But not for a larger number of Idocs.</span></b></div></div><div><br></div><div>With the <span class="fs13lh1-5"><b>"Download / upload table data"</b></span> function of <span class="fs13lh1-5"><b>"Shortcut for SAP systems"</b></span> copying Idocs can be done very fast and flexibly. By downloading data of 3 tables you will get the data.</div><div><ul><li>EDID4 - This table keeps the data of the Idocs.</li><li>EDIDC - This table contains the control records (the header information) of the Idocs.</li><li>EDIDS - This table contains the status records for the Idocs (Idoc added, processed, processed with error etc.).</li></ul><div><br></div><div>Using the <span class="fs13lh1-5"><b>"Download / upload table data"</b></span> function for downloading Inbound Idocs of message type DESADV since January 2023 would look like this:</div></div><div><br></div><div><img class="image-2" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---02.png"  title="&quot;Download / upload table data&quot; function: downloading Idocs" alt="&quot;Download / upload table data&quot; function: downloading Idocs" width="950" height="702" /><br></div><div><br></div><div>After choosing the connection to our target system / client <span class="cf1 cb1">(1)</span>, we select the "Download" option and specify an output file (<span class="fs13lh1-5 cf1 cb1">(2)</span><span class="fs13lh1-5"> and <span class="cf1 cb1">(3)</span>).</span><br></div><div>Then <span class="cf1 cb1">(4)</span> we choose an appropriate file type. The file type depends on what we are going to do with the downloaded file. You will find some information in the documentation on the right side of the window (and also <a href="https://www.shortcut-it.com/sc4sapDocu/Data-Admin/Downloaduploadtabledata.html" onclick="return x5engine.imShowBox({ media:[{type: 'iframe', url: 'https://www.shortcut-it.com/sc4sapDocu/Data-Admin/Downloaduploadtabledata.html', width: 1920, height: 1080, description: 'Documentation &quot;Download / upload table data&quot;'}]}, 0, this);" onmouseover="x5engine.imTip.Show(this, { text: 'Documentation &quot;Download / upload table data&quot;', width: 180});" class="imCssLink">here</a>). There are the file types 'ASC', 'BIN' and 'DAT'. As we are going to upload the file in the target system, especially the file types 'DAT' and 'BIN' are of interest. In case source and target system have the same character set and endianess, 'BIN' is a good choice. But a<span class="fs13lh1-5"> 'BIN' file is poorly readable and should not be modified with an editor. </span><span class="fs13lh1-5">A file in 'DAT' format is processed slower, but does not have these disadvantages. I choosed the 'DAT' file type here.</span><br></div><div>After choosing the client <span class="cf1 cb1">(5)</span> and specifying the table <span class="cf1 cb1">(6)</span> I reduced the amount of data to my needs: I only want to get Inbound Idocs of message type 'DESADV' created from the beginning of 2023. Notice the 'where condition' <span class="cf1 cb1">(7)</span>: the information about message type, direction and creation date is in table EDIDC - by using a <a href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenwhere_logexp_subquery.htm" onclick="return x5engine.imShowBox({ media:[{type: 'iframe', url: 'https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenwhere_logexp_subquery.htm', width: 1920, height: 1080, description: 'ABAP SQL - subquery'}]}, 0, this);" onmouseover="x5engine.imTip.Show(this, { text: 'ABAP SQL - subquery', width: 180});" class="imCssLink">subquery</a> I get the Idoc numbers and can apply this selection to the table EDID4 for getting exactly the Idocs I want to copy.</div><div><i class="fs13lh1-5"><b>The free text input of the 'where conditon' may look a bit nerdy, but - as you can see here - offers in return a lot of flexibility and possibilities!</b></i></div><div><br></div><div>After clicking on the "Execute" button <span class="cf1 cb1">(8)</span> the download begins. With the "View output" button I can get some information.</div><div><br></div><div><img class="image-9" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---03.png"  title="&quot;Download / upload table data&quot;: details for the download" alt="&quot;Download / upload table data&quot;: details for the download" width="800" height="713" /><br></div><div><br></div><div>Now let's have a look into the file: </div><div><br></div><div><img class="image-1" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---04.png"  title="Table data of EDID4 in file with &#39;DAT&#39; format" alt="Table data of EDID4 in file with &#39;DAT&#39; format" width="900" height="323" /><br></div><div><br></div><div>Now we repeat this with the tables EDIDC (control records) and EDIDS (status records). All we have to do is to change the name of the file and the table. The 'where condition' fits also for these tables. Finally we have 3 files downloaded. </div><div><br></div><div>Now let's move to the target system / client and do the upload: </div><div><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---05.png"  title="&quot;Download / upload table data&quot; function: Uploading EDID4 records" alt="&quot;Download / upload table data&quot; function: Uploading EDID4 records" width="950" height="702" /><br></div><div><br></div><div>We switch the connection to our target system / client <span class="cb1"><span class="cf1">(1)</span></span> and select the "Upload" option <span class="cb1"><span class="cf1">(2)</span></span>. </div><div>There is a flag 'Overwrite existing entries' which we deactivate <span class="cb1"><span class="cf1">(3)</span></span>. If our upload would collide with already existing records (same Idoc number) in the target client, we would receive an error message and the upload would not be done. Typically the Idocs in a Quality system have their origin in the last system refresh from the production system and there is no or less Idoc processing directly on the Quality system. So, if our last system refresh is older than the creation date of the Idocs to be copied (January 2023), there is a high probability that there is no collision. However, deactivating the 'Overwrite existing entries' flag keeps us on the safe side.</div><div>Then we choose the file <span class="cf1 cb1">(4)</span> containing the EDID4 records downloaded in the previous step, the right file type <span class="cb1"><span class="cf1">(5)</span></span> and name the table <span class="cb1"><span class="cf1">(6)</span></span>. The client will be set automatically according to the chosen connection. </div><div><br></div><div>After executing the upload <span class="cf1 cb1">(7)</span> we find that the assumption regarding possible collisions was right, the upload was done without errors. We have a look at the details and see that the records were uploaded.</div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---06.png"  title="&quot;Download / upload table data&quot; function: information about uploaded records" alt="&quot;Download / upload table data&quot; function: information about uploaded records" width="800" height="701" /><br></div><div><br></div><div>After that we do the same with the tables EDIDC and EDIDS. And finally we have a look into the Idoc list in the target system / client, where we can see the uploaded Idocs. But there is still a task to do:</div><div><br></div><div><img class="image-5" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---07.png"  title="Idoc list in target system / client after upload" alt="Idoc list in target system / client after upload" width="950" height="588" /><br></div><div><br></div><div>We copied the Inbound Idocs from PX1, client 100. Therefore, the receiver information is still addressing PX1, client 100. <span class="fs13lh1-5">The header information in the control records (EDIDC) does not fit to our target system / client. We have to update them - at least if we want to work with them (which usually is the reason for the need to get Idocs from the Production system into the Quality system). </span><span class="fs13lh1-5">And, of course, a partner profile in WE20 is required to process them.</span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-6" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---08.png"  title="Logical system (of the source client) in the Idoc control data" alt="Logical system (of the source client) in the Idoc control data" width="623" height="600" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Here the "logical system" is used to identify the receiver of the Idoc. Using the logical system is a common method to add an identification to a document - either as receiver or as originator. Also after system refreshes it is an important task to replace the logical system of the source system / client with the logical system of the target system / client. There is a standard transaction to be used for this: </span><span class="fs13lh1-5"><b>BDLS</b></span><span class="fs13lh1-5">.</span><br></div><div><br></div><div><img class="image-10" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---09.png"  title="" alt="" width="632" height="619" /><br></div><div><br></div><div>In the BDLS transaction we specify the old / obsolete logical system and the new / right one. We have to update our table EDIDC <span class="fs13lh1-5">only</span><span class="fs13lh1-5"> (you can also specify EDIDS and EDID4 here, but these tables does not contain logical system information). We deactivate the </span><span class="fs12lh1-5 ff1">"Start Update of Tables with Special Handling"</span><span class="fs13lh1-5"> as it is only about our EDIDC table. After executing the BDLS, the control records look well:</span></div><div><br></div><div><img class="image-11" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---10.png"  title="The copied Idocs after the execution of BDLS" alt="The copied Idocs after the execution of BDLS" width="950" height="569" /><br></div><div><br></div><div><img class="image-12" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---11.png"  title="Updated logical system in the Idoc control record" alt="Updated logical system in the Idoc control record" width="694" height="701" /><br></div><div><br></div><div><span class="fs13lh1-5">So finally we copied the Idocs from the Production system to our Quality system. </span><span class="fs13lh1-5"><b>We did not have to develop ABAP programs and did not have to struggle with each and every single Idoc in WE19. </b></span><br></div><div><br></div><div><span class="fs13lh1-5">For having the possibility to repeat all the previously described steps in a </span><span class="fs13lh1-5"><b>one-liner-command</b> or for </span><span class="fs13lh1-5"><b>implementing some automatism</b>, we can put </span><span class="fs13lh1-5"><b>all the steps into an <a href="https://www.shortcut-it.com/the-individual-task-types.html#DownloadTableData" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'XML file - Download / upload table data', width: 180});" class="imCssLink">XML file</a> and use the <a href="https://www.shortcut-it.com/sc4sapcmd.html" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool of &quot;Shortcut for SAP systems&quot;', width: 180});" class="imCssLink" onclick="return x5engine.utils.location('https://www.shortcut-it.com/sc4sapcmd.html', null, false)">command line tool</a></b></span><span class="fs13lh1-5">. </span></div><div><span class="fs13lh1-5">In the 'xml' folder - supplied with our product - you can find an example (file </span><span class="fs12lh1-5 ff1">'Example_CopyIdocsFromProdToQuality.xml'</span><span class="fs13lh1-5">), where the above described steps are implemented. Of course it is also possible to use Variants (= variants in Shortcut for SAP systems, not those in the SAP system). Personally, especially when it is a process with more than 1 task, I prefer using XML files. </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-13" src="https://www.shortcut-it.com/images/How-to-copy-Idocs-from-one-system-to-another---12.png"  title="XML file to be executed with the command line tool" alt="XML file to be executed with the command line tool" width="950" height="630" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><span class="fs13lh1-5">Based on this you can also implement an </span><span class="fs13lh1-5"><b>automatic, daily copy</b></span><span class="fs13lh1-5"> of Idocs. Just replace the </span><span class="fs12lh1-5 ff1">'20230101'</span><span class="fs13lh1-5"> in the </span><span class="fs12lh1-5 ff1">Where condition</span><span class="fs13lh1-5"> of the "DownloadTableData" tasks with </span><span class="fs12lh1-5 ff1">@SY-DATUM</span><span class="fs13lh1-5">. and schedule the execution with the command line tool daily.</span></div></div>]]></description>
			<pubDate>Fri, 28 Jul 2023 15:18:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/How-to-copy-Idocs-from-one-system-to-another_thumb.png" length="29947" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?how-to-copy-idocs-from-one-system-to-another</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000021</guid>
		</item>
		<item>
			<title><![CDATA[Extracting data from the SAP system - Part 1 - Table data (1)]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000001F"><div>In practice, it is often necessary to extract data from the SAP system, whether for further processing outside the SAP system, for transfer to other SAP systems, or for other purposes. SAP offers several possibilities via the SAPGUI. Probably everyone has already exported a list to one's computer or downloaded a spool request. </div><div><br></div><div>This works quite well - more or less - but <span class="fs13lh1-5"><b>it is a manual task</b></span>. If you need this to be done automatically on a periodic basis, in the SAP standard you have to spend additional effort. <span class="fs13lh1-5">Typically, you then end up developing one or more ABAP programs, using some function modules and creating the file(s) with </span><span class="fs12lh1-5 ff1">OPEN DATASET</span><span class="fs13lh1-5">, </span><span class="fs12lh1-5 ff1">TRANSFER</span><span class="fs13lh1-5"> and so on. This will satisfy the need to have a file on the SAP system or on a file server, mounted to the SAP system. If you need the file on your (frontend) computer, you are a little bit lost in case you want to have an automatic process. </span><br></div><div><br></div><div><b class="fs14lh1-5">How you can automate this without developing ABAPs, you can read here.</b></div><div><hr></div><blockquote><div><span class="fs13lh1-5 cb1"><i>It is typically about <span class="imUl">content of tables</span> or of <span class="imUl">output of ABAP programs</span>. Let's have a look at <b>table content</b> first. Table content can be extracted with the <b>"View table data" function</b> as well as with the <b>"Download / Upload table data" function </b>of "Shortcut for SAP systems". This article describes how to do it using the <span class="imUl">"View table data"</span> function. The <span class="imUl"><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part2-table-data-2" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system---part-2.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Extracting data from the SAP system - part 2 - table data (2)&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">2nd part</a></span> is more about using the <span class="imUl">"Download / Upload table data"</span> function, especially about the available file formats, and in the <span class="imUl"><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part-3-output-of-reports" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system---part-3.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Extracting data from the SAP system - Part 3 - Output of reports&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">3rd part</a></span> we will deal with the <b>output of programs</b> (lists).</i></span></div></blockquote><hr><div class="imHeading4">Table content</div><div>Nearly every table in the SAP system can be accessed via transaction SE16 (there are few exceptions only, where this is explicitely deactivated). You will receive a list, depending on your settings in SE16 als plain text or as an ALV list or ALV grid.</div><div><br></div><div>Using this in background mode (as it is still our approach to automate this) has some hurdles. You can use the ABAP program for scheduling it in a job (the name will be offered in SE16 &gt; System &gt; Status. Usually it starts with '<span class="fs13lh1-5">/1BCDWB/DB', followed by the name of the table). But the report might be generated again, with other selection criteria or another selection of fields to be given out in the list. This can be triggered by any user, accessing the same table. Therefore, there is no reliability for getting the data in the same format as it was when the job was set up. If you want to have this for sure, you have to develop a dedicated ABAP program. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>Or you use "Shortcut for SAP systems". </b></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">There are several functions that can be used for it, and all of them can easily be used for automation.</span></div><div class="imHeading5">"View table data"</div><div>With the "View table data" function the whole table can be read, each field of the table will be given out in the list. </div><div><br></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---01.png"  title="&quot;View table data&quot; function" alt="&quot;View table data&quot; function" width="900" height="591" /><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">If you want, you can specify an upper limit of records to be read. A value '0' means, there is no limit, so the whole table will be read. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Using the dialog function you will receive the list in a dialog window: </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---02.png"  title="&quot;View table data&quot; function: result / table content" alt="&quot;View table data&quot; function: result / table content" width="900" height="599" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Using the "Export to file" the list can be exported to your (frontend) computer or an accessible network directory. </div><div><br></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---03.png"  title="Save the list as CSV for TXT file" alt="Save the list as CSV for TXT file" width="779" height="632" /><br></div><div><br></div><div><span class="fs13lh1-5">There are 2 file types available: CSV (comma separated values) can easily be used in spreadsheet applications like MS Excel.<br><br></span></div><div><span class="fs13lh1-5">In case you chose the CSV format, the data will be exported including header information for the fields. </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---04.png"  title="" alt="" width="1026" height="421" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Same file in a spreadsheet application: </div><div><img class="image-4" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---05.png"  title="CSV file in spreadsheet application" alt="CSV file in spreadsheet application" width="1063" height="401" /><br></div><div><br></div><div>When using the other file type - TXT - the file will look like this: </div><div><br></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---06.png"  title="Same data exported in TXT format" alt="Same data exported in TXT format" width="867" height="280" /><br></div><div><br></div><div><span class="fs13lh1-5">This format is more suitable for further computer processing. </span><span class="fs13lh1-5">The fields and their lengths correspond to the table definition and if the table definition is not changed, the structure of the data remains the same.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Ok, so far we used the GUI application of "Shortcut for SAP systems". </span><span class="fs13lh1-5"><b>Now let's see how we can automate</b></span><span class="fs13lh1-5"><span class="fs13lh1-5"><b> this data extraction.</b></span> For this we can use the supplied </span><b class="fs13lh1-5">command line tool</b><span class="fs13lh1-5">. It is located in the same directory and is named </span><span class="fs12lh1-5 ff1">"Sc4SAPCmd.exe"</span><span class="fs13lh1-5">.</span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-6" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---07.png"  title="Shortcut for SAP systems command line tool" alt="Shortcut for SAP systems command line tool" width="376" height="451" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Nearly each function available in the GUI application (= each function where this makes sense) can also be processed using the command line tool. There are 2 methods to call the command line tool:</div><div><br></div><div>1) &nbsp;<span class="fs13lh1-5">Calling </span><span class="fs12lh1-5 ff1">sc4sapcmd.exe</span><span class="fs13lh1-5"> with </span><span class="fs13lh1-5"><b>function and variant</b></span><span class="fs13lh1-5"> as arguments (variant = variant in Sc4SAP).</span></div><div><span class="fs13lh1-5"><br></span></div><div><div>When storing the values for the function in a Variant...</div><div><img class="image-7" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---08.png"  title="Creating a Variant" alt="Creating a Variant" width="700" height="554" /><br></div><div><span class="fs13lh1-5">naming it </span><span class="fs12lh1-5 ff1">"PX1/100 - table AGR_USERS"</span><span class="fs13lh1-5"> and wanting to receive the data in a file </span><span class="fs12lh1-5 ff1">"PX1 role assignments.csv"</span><span class="fs13lh1-5">, &nbsp;the call of the command line tool would be as following:</span><br></div><div><img class="image-10" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---09.png"  title="Calling the command line tool with function, variant and output file" alt="Calling the command line tool with function, variant and output file" width="897" height="16" /><br></div><div>For getting the data in a TXT file we would use file extension <span class="fs12lh1-5 ff1">.txt</span>.</div><div><span class="fs13lh1-5"><b>This one-liner can be used in a batch file, in an automation software or whatever.</b></span><span class="fs13lh1-5"> The command line tool will be executed on OS level without any further requirements, execute the "View table data" and write the data into the given file.</span><br></div><div>Let's test this by using the console: </div><div><img class="image-11" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---10.png"  title="Output of the command line tool" alt="Output of the command line tool" width="850" height="290" /><br></div><div><br></div></div><div><div><span class="fs13lh1-5">The </span><span class="fs13lh1-5"><b>2nd option</b></span><span class="fs13lh1-5"> to call the command line tool:</span></div><div><br></div><div><span class="fs13lh1-5">2) &nbsp;Calling</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">sc4sapcmd.exe</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">with an</span><span class="fs13lh1-5"> </span><b><span class="fs13lh1-5">XML file as argument, containing all information of the function to be executed.</span></b></div><div><span class="fs13lh1-5">This offers more flexibility than using variants. We don't have to specify a variant, the XML file can be created either with a text editor or also by another application (for example a Chatbot can create an XML file for unlocking a user as a result from a chat with him). All information needed for doing the job is in the XML file.</span></div><div><span class="fs13lh1-5">The above used data, put into an XML file, would look as following:</span></div><div data-line-height="1"><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1">&lt;ExecutionChain&gt;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&lt;Task&gt;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;ViewTableData StopOnError="false"&gt;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Comment&gt;<span class="cf1">Get the role assignments of PX1/100 in a file</span>&lt;/Comment&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Connection&gt;<span class="cf1">PX1/100, SYS_BC_01</span>&lt;/Connection&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Table&gt;<span class="cf1">agr_users</span>&lt;/Table&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;MaxRows&gt;<span class="cf1">0</span>&lt;/MaxRows&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;OutputFile&gt;<span class="cf1">E:\SAP\Reports\PX1 Role assignments.csv</span>&lt;/OutputFile&gt;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;/ViewTableData&gt;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1"> &nbsp;&lt;/Task&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs12lh1 ff1">&lt;/ExecutionChain&gt;</span></div></div><div><br></div><div><div><b><span class="fs13lh1-5">Again we have a one-liner that can be used in a batch file, in an automation software or whatever.</span></b><span class="fs13lh1-5"> </span></div></div><div>After calling the command line tool with the XML file as argument <span class="fs13lh1-5">we will receive similar output to the one created by using function and variant:</span></div></div><div><img class="image-12" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---11.png"  title="Output of the command line tool (using an XML file)" alt="Output of the command line tool (using an XML file)" width="855" height="380" /><br></div><div><br></div><div>After the execution the XML file will be enriched with some information regarding the success of the execution and the result:</div><div><img class="image-8" src="https://www.shortcut-it.com/images/Extracting-data-from-the-SAP-system---12.png"  title="Result information in the XML file after execution" alt="Result information in the XML file after execution" width="900" height="345" /><br></div><div><br></div><div><span class="fs13lh1-5"><b>So, this is a fast solution to extract table data into a CSV or a TXT file from the SAP system to your frontend or a network storage location. You do not have to develop ABAP reports, it can be easily implemented and scheduled on a regular basis.</b></span></div><div><hr></div><div><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part2-table-data-2" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system---part-2.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Extracting data from the SAP system - part 2 - table data (2)&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">Part 2: Extracting data from the SAP system - Part 2 - Table data (2)</a></div><div><div><a href="https://www.shortcut-it.com/blog/index.php?extracting-data-from-the-sap-system-part-3-output-of-reports" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Extracting-data-from-the-SAP-system---part-3.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Blog article &quot;Extracting data from the SAP system - part 3 - output of reports&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink"><span class="fs13lh1-5">Part 3:</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">Extracting data from the SAP system - Part 3 - Output of reports</span></a></div></div></div>]]></description>
			<pubDate>Mon, 24 Jul 2023 14:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Extracting-data-from-the-SAP-system_thumb.png" length="61032" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?extracting-data-from-the-sap-system-part1-table-data-1</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000001F</guid>
		</item>
		<item>
			<title><![CDATA[Merging users of the production system and the QA system]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000001E">Recently I found this <a href="https://blogs.sap.com/2021/11/18/faq-abap-post-copy-automation/" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'https://blogs.sap.com/2021/11/18/faq-abap-post-copy-automation/', width: 180});" class="imCssLink">article</a> in the SAP community:<div><img class="image-0" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---01.png"  title="Question for combining users from Prod and QA system" alt="Question for combining users from Prod and QA system" width="950" height="472" /><br></div><div><br></div><div><div>A legitimate question. After all, a QA system should have the greatest possible similarity to the productive system after a system refresh. Not only for material master data, FI documents, etc., but also for the users. In case there is a big difference in the amount of users on the Production system compared to the QA system, <span class="fs13lh1-5">programs and transactions working with user master data and/or authorizations could run fine in the QA environment and bad and slowly in the Production environment. </span><span class="fs13lh1-5">This is not what a Quality system is meant for!</span></div></div><div><br></div><div>Coming back to the question for having a combination of the users from Production and Quality system: unfortunately the answer from SAP is correct and this is not possible in the SAP standard. Regarding users and their handling in a system refresh (as well as in a client copy) it is always "all or nothing". In the SAP standard <span class="fs13lh1-5"><b>you have to decide which users finally you want to be there in the QA system</b></span>: </div><div><ul><li>the users of the QA system before the system refresh took place <br> &nbsp;&nbsp;&nbsp;<span class="fs13lh1-5"><b>or </b></span></li><li>the users of the Production system. </li></ul><span class="fs13lh1-5">In the first case you have to save the users of the QA system before the system refresh and restore them afterwards. </span></div><div><span class="fs13lh1-5">In the second case you have to spend additional effort regarding the system users. System users and their passwords are typically specific to the system (despite there may be an intersection of few system users). If you just use the users as they were copied from the Production system, your interfaces to the QA system will not work anymore (</span><span class="fs13lh1-5">accompanied by many short dumps on the connected systems).</span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>With the <span><a href="https://www.shortcut-it.com/en/copyusers.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The &quot;Copy user&quot; function', width: 180});" class="imCssLink">"Copy user" function</a></span> from "Shortcut for SAP systems" you have the possibility to keep the users from the QA system as well as the users from the Production system, and it even can be done with different approaches: </b></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="cb1"><span class="fs13lh1-5"><b>First approach:</b></span><span class="fs13lh1-5"> keep the users from the QA system and copy non-existing users afterwards from the Production system</span></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Typically in the context of a system refresh the users will be saved in front of the system refresh and restored afterwards. In the "PCA" tool (where the above mentioned question is related to) the component "USERS" with all related tables will be exported / imported using R3trans, consequently all users after the system refresh will be the same as before. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">With the "Copy user" function you can transfer all <span class="imUl">missing</span> users from the Production system to the Quality system: </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---02.png"  title="Copy users from Production to Quality system" alt="Copy users from Production to Quality system" width="950" height="664" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>The "Copy user" function can copy users from an SAP client to another one (this can be a client on the same system as well as on another system) as well as from an SAP client into a file and vice versa. Here we copy the users <span class="imUl">directly from the Production system to the Quality system</span>. By leaving out the flag in the <span class="imUl">"Overwrite existing users?"</span> field only those users will be copied that are not existing in the target client. Users already existing will not be touched.</div><div><br></div><div>There are lots of flags for the individual segments of the user master data and role / profile assignments. Here all segments and role / profile assignments are used. There is a button "more..." near to the "License" flag. By using this you can specify that the users are already charged on the Production system - depending on how you deal with the license costs, this might make it easier and/or save you money.</div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---03.png"  title="Copy user function - set chargeable SID and client" alt="Copy user function - set chargeable SID and client" width="950" height="655" /><br></div><div><br></div><div><div><span class="fs13lh1-5"><b>That's it! It seems almost too easy, doesn't it? But in fact there is nothing more to do.</b></span> You can do this manually after the system refresh via the GUI application (as shown here) or via the <a href="https://www.shortcut-it.com/sc4sapcmd.html" onmouseover="x5engine.imTip.Show(this, { text: 'The Sc4SAP command line tool - enabling you to execute nearly all functions on OS level and automate them.', width: 180});" class="imCssLink" onclick="return x5engine.utils.location('https://www.shortcut-it.com/sc4sapcmd.html', null, false)">command line tool</a>, if necessary also integrated in existing automations for the system refresh.</div></div><div><span class="fs13lh1-5"><br></span></div><div><div><span class="cb1"><b><span class="fs13lh1-5">Second approach:</span></b><span class="fs13lh1-5"> </span><span class="fs13lh1-5">keep the users coming from the Production system and add missing users, existing on the QA system before the system refresh was done.</span></span></div></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">For this you did not process the 'USERS' component according to the PCA tool. After the system refresh you have the same users on the QA system as on the Production system. </span><span class="fs13lh1-5">But you can't leave it like that - at least the system users with their passwords (used in interfaces from other systems) must be restored, just as they were before the system refresh. And then there are other users that may need to be restored on the QA system: there may be dedicated / anonymous test users or a project team with extended permissions.</span><span class="fs13lh1-5"> </span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">For this you can also use the "Copy user" function, but - as it is about restoring users - you have to consider this in the pre-work of the system refresh. Just copy all users to be restored into a file: </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---04.png"  title="Save SAP users in a file" alt="Save SAP users in a file" width="950" height="664" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">You can also store the full amount of users into a file and reduce the amount of users to be restored afterwards. Here the selection of the users was done in advance. The small button left from the input field for the users is very useful for this!</span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-6" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---05.png"  title="Copy user function - user selection" alt="Copy user function - user selection" width="950" height="643" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>As mentioned, of course this has to be done before the QA system is overwritten from the Production system. After it is overwritten, just restore the users from the file:</div><div><br></div><div><img class="image-7" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---06.png"  title="Restore SAP users from a file" alt="Restore SAP users from a file" width="870" height="763" /><br></div><div><br></div><div>Decide, if existing users are to be overwritten or not. Typically some system users exist on both QA and Production system. If they have the same authorizations it makes no difference if they will be overwritten or not. If they have different authorizations (e.g. for RFC), it can be necessary to overwrite them from the data stored in the file. </div><div><br></div><div>After this the system users are back again - but not with the correct password. The "Initial password" field points to this. You can specify an initial password or - if you leave it empty - a password will be generated. In both cases it will not be the right one, that was assigned before the system refresh. </div><div>For adjusting the passwords you can use the "Set password" function: </div><div><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---07.png"  title="Set passwords for system users" alt="Set passwords for system users" width="950" height="697" /><br></div><div><br></div><div><span class="fs13lh1-5"><b>There is no suitable mass function for assigning passwords to users available in the SAP standard.</b></span> With SU10 you can generate a password for selective users, but this is not what we need. Assigning given individual passwords to users is possible in the SAP standard by maintaining each user individually only. <br><img class="image-9" src="https://www.shortcut-it.com/images/large-4824367_unw0q4ls.png"  title="" alt="" width="100" height="80" /><span class="fs13lh1-5"> </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Here we got the data for our system users out of an Excel file, where we stored the information. The users on the left, the passwords on the right, both line by line. Once inserted, you can also save them in a Variant: </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-12" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---08.png"  title="Variant with users and passwords" alt="Variant with users and passwords" width="950" height="708" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>After clicking on "Execute" the passwords will be assigned in seconds: </div><div><br></div><div><img class="image-11" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---09.png"  title="Assigning passwords - mass function" alt="Assigning passwords - mass function" width="700" height="220" /><br></div><div><br></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Merging-users-of-the-production-system-and-the-QA-system---10.png"  title="" alt="" width="100" height="100" /><br></div><div><span class="fs13lh1-5"><b>And again: that's it.</b></span> The first approach - keeping the users from the QA system and add others afterwards by copying them from the Production system - seems to be easier, but is based on the export and import of the users from the PCA tool. Or, if you do not have the required license for using the PCA tool, you can achieve the same - as described <a href="https://www.shortcut-it.com/blog/index.php?pre-and-post-work-of-an-sap-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Pre--and-post-work-of-an-SAP-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Pre- and post-work of an SAP system refresh&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">here</a>. However, this is more common than the second approach - taking the users from the Production system and restore / adjust users (mainly system users). But also this is easily possible! <span class="fs13lh1-5"><b>Both user copy and password assignment can be performed fully automatically with the <a href="https://www.shortcut-it.com/sc4sapcmd.html" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool', width: 180});" class="imCssLink" onclick="return x5engine.utils.location('https://www.shortcut-it.com/sc4sapcmd.html', null, false)">command line tool</a>.</b></span></div><div><span class="fs13lh1-5"><b><br></b></span></div><div><div>Before I forget: Of course, you don't have to wait until the next system refresh to complete your QA system users. Copying the users of course also works completely independent of a system refresh and can be done at any time. </div></div></div>]]></description>
			<pubDate>Fri, 14 Jul 2023 13:30:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Merging-users-of-the-production-system-and-the-QA-system_thumb.png" length="463171" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?merging-users-of-the-production-system-and-the-qa-system</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000001E</guid>
		</item>
		<item>
			<title><![CDATA[Audit finding: developer keys in productive system]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000027"><div><span class="fs13lh1-5">It is a standard check done by many auditors: have a look into the table DEVACCESS in a 'Production' system and check whether there are entries. If there are any, this might become a finding - and it does not matter to the auditor whether your system is not changeable according to the settings in SCC4 and SE03. </span><br></div><div><br></div><div>This can be easily avoided. <span class="fs13lh1-5">And if you have already received a finding, you can delete the developer keys quickly and easily.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>There is no table maintenance dialog available for table DEVACCESS</b></span><span class="fs13lh1-5">, so you have to delete existing entries using another method. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">For example, you can do this via transaction SE14:</span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---01.png"  title="SE14 - delete table data" alt="SE14 - delete table data" width="736" height="683" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>This would <span class="fs13lh1-5">satisfy the auditor's requirement. But it is a task to be done </span><span class="fs13lh1-5"><b>manually</b></span><span class="fs13lh1-5">. You have to </span><span class="fs13lh1-5"><b>do it for each (productive) system</b></span><span class="fs13lh1-5">, and you can not take it for granted, that the finding will not occur in next year's audit. It is unlikely, but not impossible, that developer keys somehow find their way into your productive system... </span><span class="fs13lh1-5"><b>but with the following method you can be sure that this problem will no longer be a reason for an audit finding</b></span><span class="fs13lh1-5">.</span></div><div><span class="fs13lh1-5"><br></span></div><div><div>Typically, this is where the idea comes into play of developing an ABAP program for this purpose, distributing it to all systems and scheduling it as a periodic batch job in all productive systems.</div><div><br></div><div><span class="fs13lh1-5"><b>Here I want to show a shorter, faster and consequently cheaper approach.</b></span> <span class="fs13lh1-5">"Shortcut for SAP systems" comes with a 'Delete table data' function that is useful for granting that this issue will never occur in your system. Using the dialog function, solving the problem would look like this:</span></div></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---02.png"  title="Delete table data: developer keys in table DEVACCESS" alt="Delete table data: developer keys in table DEVACCESS" width="756" height="670" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>The entries in table DEVACCESS are to be deleted for all users not beginning with 'EM_'. Here this is for excluding developer keys from an emergency user. Personally, if there are developer keys for the emergency user I would keep them - however, if the auditor also claims about developer keys of emergency user, you can leave this out for deleting all records in the table. </div><div><br></div><div><span class="fs13lh1-5"><b>Up to here, pressing the "Execute" button, we have a one-time solution for this problem.</b></span> <span class="fs13lh1-5"><b>But our aim is to </b></span><span class="fs13lh1-5"><b>do this on a regularly basis</b></span>, maybe every week, to ensure that possibly created entries will be deleted again on short notice. <span class="fs13lh1-5"><b>And we want to do this on <span class="imUl">every</span> 'Production' system.</b></span></div><div><br></div><div>"Shortcut for SAP systems" contains a <span class="fs13lh1-5"><a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool - discover the possibilities!', width: 180});" class="imCssLink"><b>command line tool</b></a></span> that we are going to use for this task. It runs outside the GUI application on OS level. <span class="fs13lh1-5">This gives us the possibility to </span><span class="fs13lh1-5"><b>execute it periodically</b></span><span class="fs13lh1-5"> via an automation solution. This can be a simple (and free) solution like the </span><span class="fs13lh1-5"><i>Windows Task Scheduler</i></span><span class="fs13lh1-5"> or a more sophisticated (and more expensive) product like </span><span class="fs13lh1-5"><i>Automic Automation</i></span><span class="fs13lh1-5"> or others.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">There are 2 options to use the command line tool:</span></div><div><ol><li><span class="fs13lh1-5">using a Variant (a Variant in "Shortcut for SAP systems")</span></li><li><span class="fs13lh1-5">using an XML file</span></li></ol></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Personally, I like this XML stuff. </span><span class="fs13lh1-5">It doesn't need any variants and offers maximum flexibility. </span><span class="fs13lh1-5">An <a href="https://www.shortcut-it.com/the-individual-task-types.html#DeleteTableData" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Command line tool - task type &quot;DeleteTableData&quot;', width: 180});" class="imCssLink">XML file for deleting the entries</a> in DEVACCESS would look like this:</span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---03.png"  title="An XML file for the command line tool, deleting developer keys in productive systems" alt="An XML file for the command line tool, deleting developer keys in productive systems" width="554" height="552" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>In front of scheduling this periodically we call it directly on the console:</div><div><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---04.png"  title="Deleting developer keys via command line tool in the console" alt="Deleting developer keys via command line tool in the console" width="899" height="900" /><br></div><div><br></div><div>In opposite to the first task the next 3 tasks ended with return code 4. This is because in these systems there are no records to be deleted (the ABAP statement <span class="fs12lh1-5 ff1">DELETE dbtab</span> also sets <span class="fs12lh1-5 ff1">SY-SUBRC</span> to <span class="fs12lh1-5 ff1">4</span> in that case). It is a warning that there are no records fitting to the criteria (here: the condition with <span class="fs12lh1-5 ff1">UNAME NOT LIKE 'EM_%'</span>). We can ignore this - obviously we had the issue with the developer keys in the first system only. </div><div><br></div><div><span class="fs13lh1-5"><b>Now let's implement this in a periodic task.</b></span> Here I use the Windows Task Scheduler for this. After clicking on "Create Task..." (1) we enter a name (2) and a description (3). Here I changed the user (4) - I want to have this independent from my personal user, like I prefer to schedule jobs in SAP also with a system user instead of my personal user - and specified that the task has to be executed independently from a login of the user. </div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---05.png"  title="Windows Task Scheduler - create a new task" alt="Windows Task Scheduler - create a new task" width="1090" height="555" /><br></div><div><br></div><div>After clicking OK (6) we move to the next tab. A trigger (1) is to be created (2) for running the task. Here I specified that the task has to be run weekly (3) starting on next Monday at 06:30 (4). </div><div><br></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---06.png"  title="Windows Task Scheduler - weekly task" alt="Windows Task Scheduler - weekly task" width="1064" height="652" /><br></div><div><br></div><div>In the "Actions" tab we enter the call of the command line tool and enter the XML file as argument.</div><div><br></div><div><img class="image-6" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---07.png"  title="Windows Task Scheduler - calling the command line tool" alt="Windows Task Scheduler - calling the command line tool" width="1034" height="652" /><br></div><div><br></div><div>After closing the "Actions" tab we click on OK. And that's it!</div><div><br></div><div><img class="image-7" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---08.png"  title="" alt="" width="1090" height="681" /><br></div><div><br></div><div>The command line tool writes the result of the tasks back into the XML file. By viewing it, you can check whether (and when) it has been executed. </div><div><br></div><div><img class="image-8" src="https://www.shortcut-it.com/images/Audit-finding-developer-keys-in-productive-system---09.png"  title="" alt="" width="980" height="744" /><br></div><div><br></div><div>With the implementation of a regular deletion of developer keys you can be sure, that developer keys in next year's auditing will not be an issue anymore. We did not have to develop an ABAP program and distribute it into every system line, followed by a job scheduling. Adding a new system for this task is quite simple via adding some lines in the XML file.</div><div><br></div><div class="imTACenter"><img class="image-9" src="https://www.shortcut-it.com/images/large-2385785.jpg"  title="" alt="" width="300" height="200" /><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>]]></description>
			<pubDate>Thu, 13 Jul 2023 08:04:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-4189560_thumb.jpg" length="169049" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?audit-finding--developer-keys-in-productive-system</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000027</guid>
		</item>
		<item>
			<title><![CDATA[Pre- and post work of an SAP System refresh]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000001C"><div>It is a recurring task for the SAP Basis: the data of the quality and test systems become outdated, are thus less and less useful and must therefore be periodically updated with data from the productive system. For the SAP Basis, this is a high effort, and also under time pressure. After all, the systems should be available again quickly. With "Shortcut for SAP systems", most of the pre- and post-processing can be automated.</div><div><br></div><div><div><div><span class="fs13lh1-5">The (simplified) sequence in a system refresh is this:</span></div><div></div><div></div></div><blockquote><span class="fs13lh1-5">Step 1: Export the data to be kept (mostly system-specific configuration data) on the target system</span><blockquote><div></div></blockquote></blockquote><blockquote><div><div><span class="fs13lh1-5">Step 2: Database copy from source to target system</span></div></div><span class="fs13lh1-5">Step 3: Cleanup of some data in the target system</span><div><div><span class="fs13lh1-5">Step 4: Import data (exported in step 1) back into the target system</span></div></div></blockquote><div data-line-height="1.15"><span class="fs13lh1-5">In this article we deal with steps 1, 3 and 4. The database copy (step 2) is not considered here.</span></div><div><br></div></div><div><div><b><span class="fs13lh1-5">In many how-to's that you can find in the web, you are advised to create screenshots and then configure the system based on the created screenshots.</span></b><b><span class="fs13lh1-5"> </span><span class="fs13lh1-5">This is sooooo outdated!</span></b><span class="fs13lh1-5"> </span><span class="fs13lh1-5">It requires a lot of manual work both in preparation and in post-processing, with all the resulting disadvantages, e.g.:</span></div><div><span class="fs13lh1-5">- If something is forgotten during preparation - e.g. a screenshot - it may not be possible to correct it during the post processing.</span></div><div><span class="fs13lh1-5">- Manual activities are prone to errors.</span></div><div><span class="fs13lh1-5">- The processing times for manual activities are longer than for restoring saved data.</span></div><div><span class="fs13lh1-5">- The manual activities may have to be carried out at "inconvenient" working times, which may again increase the susceptibility to errors.</span></div><div><b><span class="fs13lh1-5">Therefore, the approach with manual activities should be left behind as far as possible and as much of the pre- and post-processing as possible should be done by backup / restore.</span></b></div><div><br></div></div><div><div><span class="fs13lh1-5">In this article I would like to point to the "PCA" tool and how we can use it. "PCA" stands for "Post Copy Automation" and was developed by SAP for supporting system copies / refreshes. However, you need a "SAP Landscape Virtualization Management (LVM), enterprise edition license" (see </span><span class="fs13lh1-5"><a href="https://launchpad.support.sap.com/#/notes/1589175/E" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'SAP note 1589175', width: 180});" class="imCssLink">SAP note 1589175</a></span><span class="fs13lh1-5">) to use it. If this is given, you may follow the </span><span class="fs13lh1-5"><a href="https://help.sap.com/doc/37e468f227374f2d91b48b2dd26b956b/latest/en-US/ABAP_Post-Copy_Automation_Configuration_Guide.pdf" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'ABAP_Post-Copy_Automation_Configuration_Guide.pdf', width: 180});" class="imCssLink">installation guide</a></span><span class="fs13lh1-5"> and use the Task Manager (transaction STC01) for doing the pre work and the post work.</span><br></div></div><div><br></div><div><span class="fs13lh1-5"><b>If you do not have the required license, you will see in this article, how information from the PCA tool can be used and the pre- and post work can be done using "Shortcut for SAP systems". </b></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">So let's see </span><span class="fs13lh1-5">what the PCA tool can do for us. Hmm... I already wrote that we need a licence for this, so what else can we expect here? </span><span class="fs13lh1-5">With the PCA tool we can get the information of the tables to be backed up (and restored after the system refresh). Even if the license may not be there and the configuration of the PCA tool requires additional effort, we can use it for getting the information about the relevant tables.</span></div><div><span class="fs13lh1-5"></span></div><div><span class="fs13lh1-5">There is a report </span><span class="fs13lh1-5">SCTC_LIST_TABLES available in every(?) SAP NetWeaver system, that is useful for showing the relevant tables.</span></div><div><div><img class="image-2" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---02_8j7cd6zr.png"  title="SCTC_LIST_TABLES - PCA-Tool" alt="SCTC_LIST_TABLES - PCA-Tool" width="700" height="340" /><br></div></div><div>Ok, there are some values to be given as input: a choice between "Refresh" and "Data Cleanup" and an obligatory "Component". Unfortunately there is no F4 list available for the "Component". However, to shorten this: the execution of this report causes some problems. We do not know the "Component" up to now, and even if we would (try "RFC" for example), we would be faced with an error message:</div><div><img class="image-1" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---02.png"  title="PCA tool - license missing" alt="PCA tool - license missing" width="493" height="40" /><br></div><div>Despite the program is not running, we can still use it for getting the information. A look into the source code shows that the information about the relevant components is hard-coded in function module <span class="fs13lh1-5">SCTC_GET_ALL_COMPONENTS and from there the information about the assigned tables is in Include </span><span class="fs13lh1-5">SCTC_SC_INCL_COMPONENTS.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">You can use</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/download/Z_SHOW_PCA_TABLES.zip" onmouseover="x5engine.imTip.Show(this, { text: 'Z_SHOW_PCA_TABLES - get system-specific tables from PCA tool', width: 180});" class="imCssLink">this program</a> </span><span class="fs13lh1-5">instead. You can find it also supplied with our product in the folder 'ABAPs' (file 'ShowPCATables.txt'). Just create it in the customer name space of the development system. Most of the PCA tables are hard-coded in ABAP source codes, some are determined from the TADIR table (R3TR TABL from (also hard-coded) packages).</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Let's have a look at the selection screen of the program:</span><br></div><div><img class="image-8" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---03.png"  title="Get the relevant tables for system refresh pre- and postwork" alt="Get the relevant tables for system refresh pre- and postwork" width="850" height="642" /><br></div><div><br></div><div><span class="fs13lh1-5">First part with "Refresh" and "Data Cleanup" is similar to the SAP program. What is this "Refresh" and "Data Cleanup" about?<br><br></span></div><div><ul><li><span class="fs13lh1-5">The "Refresh" option belongs to tables that are to be exported in front of the system refresh and to be imported after the system refresh.</span></li><li><span class="fs13lh1-5">The "Data Cleanup" option belongs to tables that are to be emptied after the system refresh. For example, the tables containing data for spool requests, asynchronous updates and background RFC processing are part of the "Data Cleanup".</span></li></ul><div><span class="fs13lh1-5"><br></span></div></div><div><span class="fs13lh1-5">Ok, f</span><span class="fs13lh1-5">or now, let's ignore the other input fields on the selection screen and look at the tables. We </span><span class="fs13lh1-5">execute the program with the "Refresh" option - to see the tables that should be backed up before (step 1) and restored after the system refresh </span><span class="fs13lh1-5">(step 4)</span><span class="fs13lh1-5">:</span></div><div><img class="image-19" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---04.png"  title="The list of PCA tables" alt="The list of PCA tables" width="950" height="782" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">You will find in the list all components and their tables, that are handled in the PCA tool: ALE stuff, Batch Input, SAP Office, printer, operation modes etc. - lots of stuff that possibly you are already aware of and dealed with it more or less cumbersome by taking screenshots before and repeating the configuration tasks after the system refresh. And maybe there is some stuff you were not aware of in the past. </span><br></div><div><span class="fs13lh1-5">In addition to the original SAP program SCTC_LIST_TABLES you will also find some information about the table size, the amount of rows, whether the table is client dependent or not and a button enabling you to jump to the Data Dictionary information for the tables (SE11).</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Ok, so now we have the information about the components and their tables which are worth to be managed in the context of a system refresh. How can we use this information now?</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Have a look at the "XML file" button at the top of the list. </span><span class="fs13lh1-5">Such a small button, but it can save us soooo much work.</span></div><div><img class="image-20" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---05.png"  title="Create an XML file" alt="Create an XML file" width="484" height="63" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>The generated XML file is for using it with the <a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool of Shortcut for SAP systems.', width: 180});" class="imCssLink">"Shortcut for SAP systems" command line tool</a>. The command line tool enables you to execute nearly all functions of "Shortcut for SAP systems" outside of the GUI application, <span class="imUl">executable on OS level</span>.</div><div><br></div><div>Let's try it. We are asked about a location for the file:</div><div><img class="image-21" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---06.png"  title="Location for generated XML file(s)" alt="Location for generated XML file(s)" width="800" height="591" /><br></div><div><br></div><div>After saving the file, a popup with some information comes up:</div><div><img class="image-4" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---07.png"  title="Info about components and tables" alt="Info about components and tables" width="546" height="169" /><br></div><div><div><span class="fs13lh1-5">There is a difference of 'Total tables' to 'Distinct tables'. This is because some tables are listed in more than one component (e.g. the components</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">ARCHIVE</span><span class="fs13lh1-5">,</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">ARCHIVE_ADK</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">and</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">ARCHIVE_CUST</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">have some intersections regarding their tables, same is for components</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">CRM</span><span class="fs13lh1-5">,</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">CRMINERP</span><span class="fs13lh1-5">,</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">PI_BASIS_CRM</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">and some more</span><span class="fs13lh1-5">).</span></div><div><br></div></div><div><span class="fs13lh1-5">Let's have a look into the XML file. There are 2 of them: </span><span class="fs13lh1-5">one file was created for exporting the data - to be done before the system refresh takes place - and one file for the import - to be done after the system refresh, to recover the saved data.</span><br></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---08.png"  title="Generated XML files for Export and Import" alt="Generated XML files for Export and Import" width="643" height="100" /><br></div><div>And what's inside? In the "Export" file we see lots of tasks, one for each component and all their tables from the list:<br><img class="image-7" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---09.png"  title="Generated XML file for Export" alt="Generated XML file for Export" width="1015" height="569" /><br></div><div><br></div><div>So this is the export of the data, and accordingly in the "Import" file we see the corresponding import of the data.</div><div><img class="image-15" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---10.png"  title="Generated XML file for Import" alt="Generated XML file for Import" width="1007" height="567" /><br></div><div><br></div><div>For exporting/importing "R3trans" is used. "<span class="fs13lh1-5">R3trans" is an SAP utility and is mainly used in the Transport Management System (TMS) environment. R3trans can be used to read, save and import table data from the SAP system - and even independently of the database. Also the PCA tool uses R3trans.</span><span class="fs13lh1-5"> </span></div><div><br></div><div><span class="fs13lh1-5">In the file we find some information from the selection screen, e.g. the connection data ("+++ Enter the connection here +++"). So let's go one step back and have a more detailed look on the selection screen. </span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---11.png"  title="" alt="" width="850" height="622" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>In the first elements of the selection screen you find the differentiation between "Refresh" and "Cleanup", already mentioned earlier in this article. There is also a flag "Without components NRIV and SNRO". For these <span class="fs13lh1-5">components</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">all records of the</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">NRIV</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">table would be considered.</span><div><span class="fs13lh1-5">Our aim is to get recent data of the productive system via system refresh - including all the business documents, where lots of them have a document number, received from the number range method based on the</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">NRIV</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">table. If we export the whole</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">NRIV</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">table - the last given number for each number range object is part of it - and restore it after the system refresh, we will run into problems when it is about creating new documents. Assuming that on our Quality system currently there are less documents than on the Productive system, the last given number in the</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">NRIV</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">table is already occupied.</span></div><span class="imUl fs13lh1-5">In a nutshell: leave the flag set and with this leave out the components</span><span class="imUl fs13lh1-5"> </span><span class="imUl fs12lh1-5 ff1">SNRO</span><span class="imUl fs13lh1-5"> </span><span class="imUl fs13lh1-5">and</span><span class="imUl fs13lh1-5"> </span><span class="imUl fs12lh1-5 ff1">NRIV</span><span class="imUl fs13lh1-5">.</span> &nbsp;</div><div><span class="imUl"><br></span></div><div><span class="imUl">For the XML files the area below is of interest</span>: you can create XML files for backing up system specific data or for using them in the context of a system refresh <span class="cf1 cb1">(2)</span>, which we do here. In the next input field <span class="cf1 cb1">(3)</span> we enter the connection to our target system. In field <span class="cf1 cb1">(4)</span> we specify a directory for the data files (preferably a dedicated directory for this purpose). <span class="imUl">This directory has to exist resp. created</span> and of course it has to be accessible from the SAP system. As it is here about a system refresh (where usually "only" the database files are copied from the source to the target system), it seems to be a good idea to use a directory directly on the SAP server.</div><div>The fields below deal with performance aspects of the export / import. In <a href="https://www.shortcut-it.com/blog/index.php?speed-up-the-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Speed-up-the-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Speed up the system refresh!&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this article</a> you will find more information. </div><div><br></div><div>Now let's execute the program and generate the XML files again.</div><div><img class="image-17" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---12.png"  title="Generating XML files" alt="Generating XML files" width="850" height="560" /><br></div><div><br></div><div>Again we have an XML file for export and another one for import. Both now they contain the given connection. Of course we could have achieved the same result by just editing the line with the <span class="fs12lh1-5 ff1">&lt;DefaultConnection&gt;</span> tag in the XML files - it is "only" XML and can be modified with a text editor.</div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">For our system refresh we miss the "Cleanup" part up to now, so we go again one step back and generate the XML file for the cleanup.</span></div><div><img class="image-9" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---13.png"  title="Get PCA tables for the cleanup" alt="Get PCA tables for the cleanup" width="850" height="465" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Again clicking on the "XML file" button for generating the files: </div><div><br></div><div><img class="image-24" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---14.png"  title="Generating XML file for cleanup" alt="Generating XML file for cleanup" width="850" height="562" /><br></div><div><br></div><div>The amount of components and tables is smaller than for export / import.</div><div><img class="image-25" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---15.png"  title="Info about components and tables of cleanup" alt="Info about components and tables of cleanup" width="534" height="160" /><br></div><div><br></div><div>So now we have these 3 XML files: </div><div><ol><li><span class="fs12lh1-5 ff1">QX1_SystemRefresh_Export.xml</span></li><li><span class="fs12lh1-5 ff1">QX1_SystemRefresh_Remove.xml</span></li><li><span class="fs12lh1-5 ff1">QX1_SystemRefresh_Import.xml</span></li></ol></div><div><br></div><div>I move the files to a dedicated directory <span class="fs12lh1-5 ff1">"E:\SAP\scripts"</span>. Now l<span class="fs13lh1-5">et's do the export of the data and call the command line tool for processing the XML file for export. </span></div><div><img class="image-26" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---16.png"  title="Calling the command line tool for exporting the data" alt="Calling the command line tool for exporting the data" width="600" height="119" /><br></div><div><br></div><div><span class="fs13lh1-5">During the execution of the tasks you can have a look into the specified target directory and see the files being created:</span><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---17_oz5389k4.png"  title="Processing the export / creation of the files" alt="Processing the export / creation of the files" width="1000" height="450" /><br></div><div><br></div><div>After few minutes (which is of course depending on the amount of data in your system) the execution finished.</div><div><img class="image-29" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---18.png"  title="" alt="" width="700" height="209" /><br></div><div><br></div><div>The XML file is now enriched by detailed information for each task. And at the end of the XML file we find a summary:</div><div><img class="image-30" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---19.png"  title="XML file with task summary" alt="XML file with task summary" width="859" height="367" /><br></div><div><br></div><div>Lots of tasks finished with returncode 4 - a warning. <span class="fs13lh1-5">Having again a look into AL11 we find for every R3trans file also a log file. Let's have a look into one of them:</span></div><div><img class="image-31" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---20.png"  title="Log file from R3trans" alt="Log file from R3trans" width="574" height="604" /><br></div><div><br></div><div data-line-height="1.15" class="lh1-15"><span class="fs13lh1-15 cb2"><i>R3trans works in general with a "control file" (containing the R3trans command, the specification of the client etc.) and - optionally - with a "command file", which is in fact a transport request. The tables to be processed can be specified in the control file and/or in the command file. For enabling R3trans to use parallelization (performance often becomes an issue for system refreshes), the tables are to be specified in a command file. The warning here results out of the use of a command file. When using the PCA tool, you will find the same warning. Not for every component a command file is used, therefore some tasks ended with RC 0. </i></span></div><div><br></div><div><span class="fs13lh1-5">Ok, it worked. </span><span class="fs13lh1-5"><b>With this we have done the export of the data in front of the system refresh.</b></span><br></div><div><br></div><div><hr></div><div><br></div><div class="imTACenter"><img class="image-16" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---17.png"  title="System refresh - database copy from source to target system" alt="System refresh - database copy from source to target system" width="600" height="263" /><br></div><div><br></div><div>Now let's make a jump to the time when the systems database is overwritten with the one from the source system. As you know some data has to be adjusted - lots of settings like SAP Connect, the server groups, CCMS configuration, TMS configuration, logical paths and files, the SAP license, logon groups, operation modes etc. etc. etc. </div><div>We are going to do this by restoring the saved data. All of the mentioned topics are covered in the tables we saved in front of the system refresh - so by restoring these data we will have the same status in the overwritten system as before. </div><div><br></div><div><hr>At this point in time you are faced with this situation: <span class="fs13lh1-5"><b>your refreshed SAP system currently has the wrong RFC destinations and an invalid license</b></span>. Both are those from the source system and does not fit to your refreshed SAP system. </div><div><ul><li><span class="fs13lh1-5">Without a valid license operating in the SAP system will be rejected.</span></li><li><span class="fs13lh1-5">And after having a valid license again, possibly jobs and queue processing will start immediately, using RFC destinations taken from a productive system!</span></li></ul></div><div><br></div><div>The solution for this:</div><div><ol><li>start only the database, not the SAP system</li><li>import the license via R3trans on OS level</li><li>import the RFC destinations via R3trans on OS level</li></ol></div><div> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img class="image-6" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---28.png"  title="" alt="" width="607" height="280" /><span class="fs13lh1-5"> &nbsp;&nbsp;&nbsp;&nbsp;</span></div><div>After that, you can start the SAP system again. </div><div><br></div><div><span class="fs13lh1-5"><i>The files 'RestoreLicense.cmd' and 'RestoreRFC.cmd' contain the calls of R3trans for restoring the data already exported in the export phase. You can find them supplied with our product in the 'xml' folder. Adjust the paths and store them either in the directory used for the R3trans files or another suitable directory. </i></span></div><div><hr></div><div><br></div><div>After the database of the target SAP system has been overwritten with the one from the source SAP system, we start with the "Cleanup" task. We already have our XML file for the command line tool, so it is just about executing the command line tool with the file as argument.</div><div><img class="image-23" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---21.png"  title="Calling the command line tool for cleanup" alt="Calling the command line tool for cleanup" width="650" height="93" /><br></div><div><br></div><div>Again there are tasks ended with return code 4 (a warning). <span class="fs13lh1-5">The log files show the reason of it:</span></div><div><img class="image-27" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---22.png"  title="Cleanup data, some tasks with RC 4" alt="Cleanup data, some tasks with RC 4" width="700" height="175" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><img class="image-32" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---23.png"  title="R3trans - Warning in case nothing was done" alt="R3trans - Warning in case nothing was done" width="536" height="603" /><br></div><div><br></div><div>Here a warning was given because all tables were already empty. R3trans had nothing to do, so it quitted with a warning. </div><div>There were some more return codes 4, and all of them had the same reason. </div><div><br></div><div>If you have a look into the SAP system, you will find some impacts of the data cleanup. For example, in STMS you will see the message "TMS not configured for this SAP System", the logon groups in SMLG and RZ12 are gone, SM13 and SM35 are empty, same with ST22.</div><div><br></div><div>The Data cleanup part took <span class="fs13lh1-5">~1 minute only </span><span class="fs13lh1-5">on the system. As it is about deletion of data and the amount of tables is smaller than for the previously done 'Export' part, also the needed time is less.</span></div><div><br></div><div>Now let's do the last step (and the most exciting of all): importing the saved data again. As we already have our XML file, it is again just about executing the command line tool.</div><div><img class="image-33" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---24.png"  title="Calling the command line tool for the import" alt="Calling the command line tool for the import" width="700" height="101" /><br></div><div><br></div><div><span class="fs13lh1-5">Again there are tasks with RC 4, so have a look into the log files.</span><br></div><div><img class="image-34" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---25.png"  title="XML file after import" alt="XML file after import" width="1000" height="430" /><br></div><div><br></div><div><img class="image-35" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---26.png"  title="R3trans warnings at import" alt="R3trans warnings at import" width="570" height="137" /><br></div><div><br></div><div><span class="fs12lh1-5 ff1">"source system == target system."</span> Yes, that is exactly what we did - export and import on the same system. <span class="fs13lh1-5">We can ignore these warnings, they are the same for every task.</span></div><div><br></div><div>The import tasks needed significantly more time than the export tasks: ~27 minutes on my small system. This is because updating the tables in general needs more time than just reading the data. Beside others indexes are to be considered, rollback segments are to be managed by the database etc.</div><div>The log files look a little bit different from the 'export' ones, pointing to the fact that it is here about update / insertion instead of simple reading: </div><div><img class="image-36" src="https://www.shortcut-it.com/images/Pre--and-post-work-of-an-SAP-system-refresh---27.png"  title="R3trans import log" alt="R3trans import log" width="700" height="479" /> &nbsp;</div><div><br></div><div>Let's have a look into the system now. <span class="fs13lh1-5">The TMS looks fine again, also the batch input sessions and the SAP Connect settings in transaction SCOT look like before the system refresh.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"></span><span class="fs13lh1-5"><b>All the configuration settings are the same as before the system refresh. This is a </b></span><span class="fs13lh1-5"><span class="fs13lh1-5"><b>huuuuge gain of saved time in comparison to do the pre and post processing manually, using screenshots and do lots of configuration stuff to get the status of the system back as it was before the system refresh. </b></span></span><b class="fs13lh1-5"><span class="fs13lh1-5"> </span><span class="fs13lh1-5">And, if you up to now used a documentation with lots of manual activities, I guess dealing with system specific data using the above described method is much more complete than doing this using your documentation, isn't it?</span></b></div><div class="imTACenter"><img class="image-28" src="https://www.shortcut-it.com/images/great-job.png"  title="Great job!" alt="Great job!" width="200" height="200" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><div><span class="fs13lh1-5">Once you have finished the adjustment of the XML files for pre-work (Export) and post-work (Data cleanup and Import), you can use it easily to do the pre- and post-processing as often as you like - so, if there is the demand to do the system refresh every month or even every week, there is no need to be afraid of the previously huge amount of work anymore! </span><span class="fs13lh1-5"><b>At the end it is about 3 calls of the command line tool.</b></span></div></div><div><span class="fs13lh1-5">As this is working on OS level, you can also easily schedule these tasks or integrate it in already existing automation solutions. </span><span class="fs13lh1-5">Have your weekends been messed up for this in the past? That can now come to an end.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Finally I would like to give some hints on this topic:</span><br></div><div><span class="fs13lh1-5"><br></span></div><div><ul><li><span class="fs13lh1-5">Of course it is on you to decide which components and tables are to be considered. If you do not want to deal with the full scope of data, </span><span class="fs13lh1-5"><b>you can filter the list</b></span><span class="fs13lh1-5"> of the program Z_SHOW_PCA_TABLES </span><span class="fs13lh1-5"><b>and / or de-select tables</b></span><span class="fs13lh1-5">. Possibly you want to get the batch input sessions from the source system, then just leave out the BATCH_INPUT component for Export, Data Cleanup and Import. Just take the list of the program, think about it, discuss and agree with your colleagues and/or the user department, which components are to be considered and which not.</span><br><span class="fs13lh1-5">Filter and selection in the list of Z_SHOW_PCA_TABLES will be considered when generating the XML file - means, components and tables that are filtered out or de-selected will not be considered in the generation of the XML file. Certainly, you can also modify the XML file in a text editor and take out some tasks or add others.</span><br><br></li><li><div><b><span class="fs13lh1-5">In the 'xml' folder of "Shortcut for SAP systems" you will find XML examples for pre- and post work of a system refresh.</span></b><span class="fs13lh1-5"> </span><span class="fs13lh1-5">Have a look into it, they show some additions: in the pre-work locking and kicking out of users is integrated as well as suspending batch jobs in front of data saving. And in addition to the tables shown by the PCA tool, also the ALV layouts are considered. Consequently this is also implemented in the post-processing example.</span></div><span class="fs13lh1-5">So you can inform the users about the upcoming system refresh and schedule the command line tool with the pre-processing XML file e.g. for Friday evening - no need to do it on your own and stay in the office. Turn this into an automatism. </span><br><br></li><li>You can <span class="fs13lh1-5"><b>significantly </b></span><span class="fs13lh1-5"><b>speed up</b></span> the process (especially the import, which consumes the most time) by using <span class="fs13lh1-5"><b>parallelization</b></span>. Find detailed information how to do so in <a href="https://www.shortcut-it.com/blog/index.php?speed-up-the-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Speed-up-the-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Speed up the system refresh!&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this article</a>.<br> &nbsp;</li><li>By default also the users are considered in the PCA tables. If you do not want this, leave out the USERS component. For some reasons it makes sense to receive all users and their role assignments from the source system, just like you receive material master data, FI documents etc. from the source system - finally, it is the aim of a system refresh to get data close to the productive environment. <br><span class="fs13lh1-5"><b>However, the system users have to be the same as before the system refresh</b></span>, otherwise interfaces would not work anymore. And possibly project teams etc. are also to be kept. <br>You also have the possibility to keep all users in the target system (by exporting / importing the USERS component) and copy additional users from the source system to the target system with the "Copy user" function.<br>Have a look at these blog articles regarding this topic: <br><div class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?copying-users" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Copying users', width: 180});" class="imCssLink">https://www.shortcut-it.com/blog/index.php?copying-users</a><br><div><a href="https://www.shortcut-it.com/blog/index.php?merging-users-of-the-production-system-and-the-qa-system" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Merging users of the production system and the QA system', width: 180});" class="imCssLink">https://www.shortcut-it.com/blog/index.php?merging-users-of-the-production-system-and-the-qa-system</a></div></div><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?how-to-assign-new-passwords-to-lots-of-users" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'How to assign passwords to lots of users', width: 180});" class="imCssLink">https://www.shortcut-it.com/blog/index.php?how-to-assign-new-passwords-to-lots-of-users</a></span> <br><div>Copying users and setting passwords can also be done in the XML files, so you no longer have to do this manually either.</div></li></ul></div></div>]]></description>
			<pubDate>Mon, 26 Jun 2023 12:06:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Pre--and-post-work-of-an-SAP-system-refresh_thumb.png" length="382341" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?pre-and-post-work-of-an-sap-system-refresh</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000001C</guid>
		</item>
		<item>
			<title><![CDATA[Copying data from one system to another]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000001A"><div>Sometimes it is useful to copy a table or a bunch of tables from one system to another. For example, to update data in the Quality system, in a test client on the development system or in a sandbox with data from the Production system. </div><div>Doing this would either be a task to be done on database level or - to keep moving on the SAP level - <span class="fs13lh1-5">you will be referred to the possibility with a "Transport of copies" and use the Transport Management System. </span><span class="fs13lh1-5">For one-time use, this may be sufficient. Doing this with a "Transport of copies" is a task to be done manually, it can not be automated. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">If the copy is to take place on a </span><span class="fs13lh1-5"><b>regular basis</b></span><span class="fs13lh1-5">, possibly daily, the procedure with a "Transport of copies" </span><span class="fs13lh1-5">is out of the picture. </span><span class="fs13lh1-5">Do not expect anyone to be willing to bother with this.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Among others "Shortcut for SAP systems" (Sc4SAP) offers also for this problem a solution. In this article you will find a description how easy it can be to update some data on your Quality / sandbox / training system with data from the Production system - </span><span class="fs13lh1-5"><b>f</b></span><span class="fs13lh1-5"><b>ully automated and on a regular basis</b></span><span class="fs13lh1-5">.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">We can use the "Process table data using R3trans" function in Shortcut for SAP systems (Sc4SAP). In this example we are going to distribute the contents of an own-developed table 'ZCUST_BLACKLIST' from the Production system PX1 to the Quality system QX1. </span><span class="fs13lh1-5">The advantage is better possibilities in solving problems, troubleshooting, debugging, testing, etc.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>Doing it one-time</b></span><span class="fs13lh1-5"><span class="fs13lh1-5"><b>, by using the GUI</b></span>, it is a quite clear thing:</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">1.: &nbsp;Export the data into a file</span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Copying-data-from-one-system-to-another---01.png"  title="Export of the table from Production system into a file" alt="Export of the table from Production system into a file" width="798" height="619" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">2.: Clear the table in QX1</span></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Copying-data-from-one-system-to-another---02.png"  title="Emptying the table in the Quality system" alt="Emptying the table in the Quality system" width="798" height="619" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">3.: &nbsp;Import the data into QX1</span></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Copying-data-from-one-system-to-another---03.png"  title="Import of the data into the Quality system" alt="Import of the data into the Quality system" width="798" height="619" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>We received a warning, so let's have a look what was the reason for it.</div><div><img class="image-4" src="https://www.shortcut-it.com/images/Copying-data-from-one-system-to-another---04.png"  title="Warning from R3trans" alt="Warning from R3trans" width="798" height="619" /><br></div><div><br></div><div>Ok, let's have a look into the log file: </div><div><img class="image-0" src="https://www.shortcut-it.com/images/Copying-data-from-one-system-to-another---05.png"  title="Viewing the log file of R3trans" alt="Viewing the log file of R3trans" width="798" height="619" /><br></div><div><br></div><div>This warning was given as we specified the table to be imported. R3trans can do an import also without any table specification, in that case all data of all tables in the R3trans file will be imported - and then no warning will be given. However, we can ignore it, the result in the database is the same. </div><div><br></div><div>I used a file on the frontend in this example. Using a server file would be also possible, but this would require that both systems, PX1 and QX1, have access to the directory. This can not be taken as granted, and unless this is not implemented, I am on the safe side using a directory accessible on my frontend. But of course in this case a user with dialog capabilites has to be used in the connection (type 'A' or 'S'). &nbsp;</div><div><br></div><div>So, after doing these 3 steps - Export from PX1 &gt; Remove in QX1 &gt; Import in QX1 the data of the table in QX1, client 100 is exactly the same as in PX1, client 100. If the requirement is to do this one-time, we have finished it. But in our case the requirement is to do a daily synchronisation of the table from PX1 to QX1, therefore it is about automation - as I already mentioned we can do this <span class="fs13lh1-5"><b>f</b></span><span class="fs13lh1-5"><span class="fs13lh1-5"><b>ully automated and on a regular basis</b></span>.</span></div><div><br></div><div>Sc4SAP comes with a <span class="fs13lh1-5"><b>command line tool</b></span> (Sc4SAPCmd.exe), which allows to do nearly every function on OS level with a one-liner. There are 2 methods to use the command line tool:<br><br></div><div><ol><li>Calling sc4sapcmd.exe <span class="fs13lh1-5"><b>with function and variant as arguments</b></span> (variant = variant in Sc4SAP)<br>Assumed we have saved variants for the 3 steps, the calls would look like this:<br><span class="fs11lh1-5 ff1"> &nbsp;&nbsp;&nbsp;sc4sapcmd.exe r3trans "PX1 export ZCUST_BLACKLIST"</span><br><span class="fs11lh1-5 ff1"> &nbsp;&nbsp;&nbsp;sc4sapcmd.exe r3trans "QX1 remove ZCUST_BLACKLIST"</span><br><span class="fs11lh1-5 ff1"> &nbsp;&nbsp;&nbsp;sc4sapcmd.exe r3trans "QX1 import ZCUST_BLACKLIST"</span><br><div><span class="fs13lh1-5 ff2">Putting these 3 calls in a simple file, let's name it </span><span class="fs11lh1-5 ff1">'<span class="fs11lh1-5">Copy Customer blacklist from PX1 to QX1</span><span class="fs11lh1-5">.cmd'</span></span><span class="fs13lh1-5">, and scheduling this file to execute it regularly (e.g. with the Windows Task Scheduler) does the job. </span><span class="fs13lh1-5">A recommendation at this point when using variants with the command line tool: make a note in the variant about this, it might prevent you from changing or deleting if one day you get the urge to clean up the variants.</span><div class="fs13lh1-5 ff2"><div><img class="image-6" src="https://www.shortcut-it.com/images/Copying-data-from-one-system-to-another---06.png"  title="Mention the use with command line tool in the variant" alt="Mention the use with command line tool in the variant" width="600" height="314" /></div><br></div></div></li><li><span class="fs13lh1-5">Calling sc4sapcmd </span><span class="fs13lh1-5"><b>with an XML file as argument, containing all information of the function to be executed</b></span><br>This offers more flexibility than using variants. We don't have to specify a variant, the XML file can be created either with a text editor or also by another application (for example a Chatbot can create an XML file for unlocking a user as a result from a chat with him). &nbsp;<br></li></ol><div><div class="fs14lh1-5 ff3"><br></div></div>For using XML files with the command line tool you can find some information <a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" class="imCssLink">here</a>. You can also find some examples in the subfolder '<span class="fs12lh1-5 ff1">xml</span>', supplied with Sc4SAP. Also this case - copying data of table ZCUST_BLACKLIST from PX1 to QX1 - is covered in an example file (<span class="fs11lh1-5 ff1">'Example_CopyTableFromProdToQuality.xml'</span><span class="fs13lh1-5">).</span></div><div><span class="fs13lh1-5"><br></span></div><div data-line-height="1" class="lh1"><div data-line-height="1" class="lh1"><div data-line-height="1" class="lh1"><span class="fs10lh1 cf1 ff4">&lt;</span><span class="fs10lh1 cf2 ff4">ExecutionChain</span><span class="fs10lh1 cf1 ff4">&gt;</span><br></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">Copy customer blacklist from PX1 to QX1</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Task</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">R3trans</span><span class="fs10lh1 ff4"> </span><span class="fs10lh1 cf3 ff4">StopOnError</span><span class="fs10lh1 ff4">=</span><span class="fs10lh1 cf4 ff4">"true"</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">Extract customer blacklist from PX1</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Connection</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">PX1/100, SRV_SC4SAP</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Connection</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Export</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Table</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">ZCUST_BLACKLIST</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Table</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Client</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">100</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Client</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">LocalFile</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">E:\\SAP\\Transfer\\PX1 Customer Blacklist.r3trans.bin</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">LocalFile</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">Export</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">R3trans</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">Task</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Task</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">R3trans</span><span class="fs10lh1 ff4"> </span><span class="fs10lh1 cf3 ff4">StopOnError</span><span class="fs10lh1 ff4">=</span><span class="fs10lh1 cf4 ff4">"false"</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">Remove customer blacklist in QX1</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Connection</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">QX1/100, SRV_SC4SAP</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Connection</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Remove</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Table</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">ZCUST_BLACKLIST</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Table</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Client</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">100</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Client</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">LocalLogFile</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">E:\\SAP\\Transfer\\QX1 Customer Blacklist remove.log</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">LocalLogFile</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">Remove</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">R3trans</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">Task</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Task</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">R3trans</span><span class="fs10lh1 ff4"> </span><span class="fs10lh1 cf3 ff4">StopOnError</span><span class="fs10lh1 ff4">=</span><span class="fs10lh1 cf4 ff4">"false"</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">Import customer blacklist from PX1 into QX1</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Comment</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Connection</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">QX1/100, SRV_SC4SAP</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Connection</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Import</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Table</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">ZCUST_BLACKLIST</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Table</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">Client</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">100</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">Client</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span class="fs10lh1 cf2 ff4">LocalFile</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4">E:\\SAP\\Transfer\\PX1 Customer Blacklist.r3trans.bin</span><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">LocalFile</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">Import</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&nbsp;&nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">R3trans</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff4"></span><span class="fs10lh1 cf1 ff4"> &nbsp;&lt;/</span><span class="fs10lh1 cf2 ff4">Task</span><span class="fs10lh1 cf1 ff4">&gt;</span><span class="fs10lh1 ff4"> &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf1 ff4">&lt;/</span><span class="fs10lh1 cf2 ff4">ExecutionChain</span><span class="fs10lh1 cf1 ff4">&gt;</span></div></div></div><div data-line-height="1" class="lh1"><br></div><div>If you have seen XML files before (or HTML files, which have a similar structure using this &lt;tag&gt; ... &lt;/tag&gt; notation), it is not so difficult to understand it, isn't it? The root element is the <span class="fs12lh1-5 ff1">ExecutionChain</span>, in it is at least one <span class="fs12lh1-5 ff1">Task</span> (here there are three) with their specific tags. For using R3trans we used the task type <span class="fs12lh1-5 ff1">R3trans</span> tag with its specific tags <span class="fs12lh1-5 ff1">Export</span>, <span class="fs12lh1-5 ff1">Remove </span>and <span class="fs12lh1-5 ff1">Import</span>.</div><div><br></div><div>After calling the command line tool with such an XML file (let's name it <span class="fs11lh1-5 ff1">'</span><span class="fs11lh1-5 ff1">Copy Customer blacklist from PX1 to QX1</span><span class="fs11lh1-5 ff1">.xml'</span><span class="fs13lh1-5">)</span><br></div><blockquote><span class="fs11lh1-5 ff1">sc4sapcmd.exe "</span><span class="fs11lh1-5 ff1">Copy Customer blacklist from PX1 to QX1</span><span class="fs11lh1-5 ff1">.xml"</span><br></blockquote><div><span class="fs13lh1-5">the XML file will be enriched with some information in </span><span class="fs12lh1-5 ff1">Result</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">tags, on task level as well as on the level of the whole execution chain - similar to what we can see using the GUI.</span><br></div><div><br></div><div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1">&lt;ExecutionChain&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&lt;Comment&gt;Copy customer blacklist from PX1 to QX1&lt;/Comment&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&lt;Task&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;R3trans StopOnError="true"&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Comment&gt;Extract customer blacklist from PX1&lt;/Comment&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Connection&gt;PX1/100, SRV_SC4SAP&lt;/Connection&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Export&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Table&gt;ZCUST_BLACKLIST&lt;/Table&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Client&gt;100&lt;/Client&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LocalFile&gt;E:\\SAP\Transfer\\PX1 Customer Blacklist.r3trans.bin&lt;/LocalFile&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Export&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Result&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Processed&gt;2023-06-01T11:56:50.444&lt;/Processed&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ReturnCode&gt;0&lt;/ReturnCode&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Message&gt;1st step (preparation) finished.&lt;/Message&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Message&gt;Now execute R3trans and afterwards download data and log file...&lt;/Message&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Message&gt;2nd step (execution of R3trans) finished. Have a look into the log file, please.&lt;/Message&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Result&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;/R3trans&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&lt;/Task&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&lt;Task&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;R3trans StopOnError="false"&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Comment&gt;Remove customer blacklist in QX1&lt;/Comment&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Connection&gt;QX1/100, SRV_SC4SAP&lt;/Connection&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Remove&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Table&gt;ZCUST_BLACKLIST&lt;/Table&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Client&gt;100&lt;/Client&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LocalLogFile&gt;E:\\SAP\Transfer\\QX1 Customer Blacklist remove.log&lt;/LocalLogFile&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Remove&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Result&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Processed&gt;2023-06-01T11:56:53.227&lt;/Processed&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ReturnCode&gt;0&lt;/ReturnCode&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Message&gt;1st step (preparation) finished.&lt;/Message&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Message&gt;Now execute R3trans and afterwards download the log file...&lt;/Message&gt;</span></b></span></div><div data-line-height="1" class="lh1"><div data-line-height="1" class="lh1"><b><span class="fs9lh1 cf5 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Message&gt;2nd step (execution of R3trans) finished. Have a look into the log file, please.&lt;/Message&gt;</span></b></div></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Result&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;/R3trans&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&lt;/Task&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&lt;Task&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;R3trans StopOnError="false"&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Comment&gt;Import customer blacklist from PX1 into QX1&lt;/Comment&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Connection&gt;QX1/100, SRV_SC4SAP&lt;/Connection&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Import&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Table&gt;ZCUST_BLACKLIST&lt;/Table&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Client&gt;100&lt;/Client&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LocalFile&gt;E:\\SAP\\Transfer\\PX1 Customer Blacklist.r3trans.bin&lt;/LocalFile&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Import&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><span class="cf5"><b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Result&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><span class="cf5"><b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Processed&gt;2023-06-01T11:56:53.804&lt;/Processed&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;ReturnCode&gt;4&lt;/ReturnCode&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;1st step (preparation) finished.&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;Now upload the data file, afterwards execute R3trans, then download the log file...&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;R3trans execution done with warning!&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;See following information&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;&amp;gt;&amp;gt;&amp;gt; Using R3trans &amp;lt;&amp;lt;&amp;lt;&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;R3trans location:&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;/usr/sap/NPL/D00/exe/R3trans&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;Datafile :&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;/tmp/080027B7210A1EEE808C5455D6B0FA0A.tmp&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;Now calling R3trans:&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;/usr/sap/NPL/D00/exe/R3trans -w /tmp//080027B7210A1EEE808C5454D465DA0A.log /tmp//080027B7210A1EEE808C5454D465DA0A.tmp&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;R3trans call ended with RC 4&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;-&amp;gt; see log file for details.&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;R3trans execution ( Import ) successful!&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;Downloaded (bytes): 3.148&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;Uploaded (bytes): 421&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><span class="cf5"><b>&lt;Message&gt;2nd step (execution of R3trans) finished. Have a look into the log file, please.&lt;/Message&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><span class="cf5"><b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Result&gt;</b></span></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;/R3trans&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"> &nbsp;&lt;/Task&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&lt;Result&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&lt;Processed&gt;2023-06-01T11:56:53.804&lt;/Processed&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&nbsp;&nbsp;&lt;ReturnCode&gt;4&lt;/ReturnCode&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1"><b><span class="cf5"> &nbsp;&lt;/Result&gt;</span></b></span></div><div data-line-height="1" class="lh1"><span class="fs9lh1 ff1">&lt;/ExecutionChain&gt;</span></div></div><div><span class="fs13lh1-5"><br></span></div><div>The XML schema is also provided in the <span class="fs12lh1-5 ff1">'xml'</span> subfolder of Sc4SAP (file <span class="fs12lh1-5 ff1">'Sc4SAPCmd.xsd'</span>). A huge advantage of the possibility using XML files with the command line tool is its flexibility. XML files can be created either with a text editor or by any application. This makes it possible to use Sc4SAP e.g. by a user self service for unlocking the own user or by a Chatbot, creating an XML file as a result of the users input that he/she is locked. </div><div><br></div><div>So finally, depending on which method we prefer to use, we have a either a command file with 3 calls of the command line tool (using the variants for Export, Remove, Import) or a single XML file with 3 tasks. Both can be used to <span class="fs13lh1-5">execute it periodically. For scheduling it the Windows Task Scheduler can be used or a more complex product for process automation (like </span><span class="fs13lh1-5"><i>Automatic Automation</i></span><span class="fs13lh1-5">, former </span><span class="fs13lh1-5"><i>UC4</i></span><span class="fs13lh1-5">). </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Copying-data-from-one-system-to-another---07.png"  title="" alt="" width="800" height="460" /><span class="fs13lh1-5"><br></span></div><div><i class="fs11lh1-5">Scheduling of the table data copy via Windows Task Scheduler - here by using an XML file</i></div><div><br></div><div>Whatever you choose - the method using the variants or the method with the XML file -, <span class="fs13lh1-5"><b>in both cases the data can be easily copied from one system to another, fully automated and on a regular basis</b></span>. <span class="fs13lh1-5">Isn't this a nice way to avoid such tedious and time-consuming tasks as banging around with a Transport of copies, day after day?</span></div><div class="imTACenter"><img class="image-7" src="https://www.shortcut-it.com/images/large-2939344.jpg"  title="" alt="" width="350" height="238" /><span class="fs13lh1-5"><br></span></div><div><br></div></div>]]></description>
			<pubDate>Thu, 08 Jun 2023 09:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Copying-data-from-one-system-to-another_thumb.png" length="78330" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?copying-data-from-one-system-to-another</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000001A</guid>
		</item>
		<item>
			<title><![CDATA["We need this information for each system"]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000019">With an increasing system landscape you might loose the details for each system: is the system still in use, is someone really working on it? Do we really still need this system or could it be closed to save capacity / effort / money? <div><br><div><span class="fs13lh1-5">Recently this question came up at an SAP customer, who has a quite huge SAP system landscape.</span><span class="fs13lh1-5"> The amount of test systems raised up to a number of ~300. </span><span class="fs13lh1-5">Wow, that's really a lot!</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">There are quality systems, sandboxes, project specific systems, systems built up as temporary replacements of others etc. etc. Many of them with more than one client (beside 000), so </span><span class="fs13lh1-5">the number of clients affected is therefore much higher, maybe ~500.</span><span class="fs13lh1-5"> </span><br></div><div><span class="fs13lh1-5">Of course the operation of this huge landscape consumes a lot of hardware, time, people, effort... and consequently money. So the simple demand was: let's try to reduce the amount of systems and check whether the systems are still in use. We are sure, that there are some that can be closed!</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Easily said, sounds not like a challenging task. </span><span class="fs13lh1-5">Having a look into the last login dates would give the information whether the system is in use. The user information system in SAP (transaction SUIM) offers this information.</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">But doing this for ~500 clients?</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">This makes this supposedly simple task quite time-consuming and expensive. </span><span class="fs13lh1-5">Delegating this task to a single person is not conducive to making that person happy </span><img class="image-0" src="https://www.shortcut-it.com/images/large-3943389_vqnbb7jv.png"  title="" alt="" width="25" height="28" /><span class="fs13lh1-5">. </span></div><div><span class="fs13lh1-5">Apart from just executing a SUIM report it would cause additional effort to enable the person to do this job - it is unlikely that the user and the authorizations are given in all systems and clients. So, it will become necessary to request a user and suitable authorizations on lots of systems. Possibly the whole task would take a month or more to be completed. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Let's think about another approach: forward the request for information to the system responsibles. Create a small manual what has to be done, determine the system responsibles and ask them to </span><span class="fs13lh1-5">complete the task and return the result. There is a list of system responsibles, </span><span class="fs13lh1-5">so the amount of people to be bothered with it is known. Finally ~60 people would be harassed. Hmm, some are on holiday or ill, others have to ask colleagues or project leaders, some would have questions, ... boah, also this approach would take time and causes a lot of effort. </span></div><div><span class="fs13lh1-5"><br></span></div><div>Perhaps a more central approach after all: can we somehow schedule the background execution of the SUIM report in all systems? There is a job scheduling system in use, there is also a team responsible for this, ...but scheduling the job in ~500 clients and managing the result of the report <span class="fs13lh1-5">seems to save neither time nor effort compared to the other solutions. </span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">And how about the program to be scheduled - or executed manually, i</span><span class="fs13lh1-5">n case the scheduling option is dropped out?</span><span class="fs13lh1-5"> &nbsp;</span><br></div><div><span class="fs13lh1-5">There is a report in SUIM with a title promising to offer exactly what we need.</span><br></div><div><img class="image-9" src="https://www.shortcut-it.com/images/Get-information-across-systems---01.png"  title="SUIM - User list by logon data and password change" alt="SUIM - User list by logon data and password change" width="586" height="267" /><br></div><div><i class="fs11lh1-5">Transaction SUIM, report "User by Logon Data and Password Change" (RSUSR200)</i></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Ok, this program offers a list of the users with their last login date. We can reduce the selection to user type "Dialog". However, this program is designed to get the people that have not logged in for a long time. For our purpose it would be better to have a list of users that have recently logged in, for example within the last 90 days, and containing only these users and not the others haven't logged in for a long time. </span><span class="fs13lh1-5">Too bad, this is not possible with this program. Of course we could use the program, but finally we would get a list of all dialog users with their login date. We would have to execute this program for all ~500 clients and then analyze each and every list. Some of the clients have huge amounts of users (more than 40000), so some of the lists would be quite big.</span></div><div><img class="image-16" src="https://www.shortcut-it.com/images/Get-information-across-systems---02.png"  title="List of users with logon date" alt="List of users with logon date" width="1032" height="843" /><span class="fs13lh1-5"><br></span></div><div><i class="fs11lh1-5">Output of program RSUSR200</i></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">To summarize: possible, but not an ideal approach for our purpose. </span><span class="fs13lh1-5">Finally there is no program available working cross-client, and all result lists of all users with their login dates would end in big lists. </span><span class="fs13lh1-5">It would be better to get a result fitting more to our needs. Thus, let's think about an own developed, new program. </span><span class="fs13lh1-5">In fact, our requirement is quite simple and can be met with a small ~60 line <a href="https://www.shortcut-it.com/download/Z_GET_LAST_LOGIN_DATES.zip" class="imCssLink">ABAP program</a>.</span></div><div><span class="fs13lh1-5"><br></span></div><div data-line-height="1" class="lh1"><span class="cf1"><span class="fs10lh1 ff1">*&amp;---------------------------------------------------------------------*</span><br></span></div><div data-line-height="1" class="lh1"><div data-line-height="1" class="lh1"><span class="fs10lh1 cf1 ff1">*&amp; Report z_get_last_login_dates &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf1 ff1">*&amp;---------------------------------------------------------------------*</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf1 ff1">*&amp; Get some information about last login dates of users, cross-client. *</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf1 ff1">*&amp;---------------------------------------------------------------------*</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"><span class="cf2">report </span>z_get_last_login_dates <span class="cf2">no standard page heading line-size 1023</span>.</span></div><div data-line-height="1" class="lh1"><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"><span class="cf2">parameters</span>: pDays <span class="cf2">type </span>i <span class="cf2">default 90</span>.</span></div></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"><span class="cf2">types: begin of</span> TLastLoginData<span class="cf2">,</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client <span class="cf2">type </span>mandt<span class="cf2">,</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastLogin <span class="cf2">type </span>usr02-trdat<span class="cf2">,</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userIds <span class="cf2">type </span>string<span class="cf2">,</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"><span class="cf2"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end of</span> TLastLoginData<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"><span class="cf2">data:</span> lastLoginDataTab <span class="cf2">type standard table of</span> TLastLoginData,</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastLoginData <span class="cf2">type </span>TLastLoginData<span class="cf2">,</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userId <span class="cf2">type </span>usr02-bname<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf2 ff1">start-of-selection.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf1">" Get last login dates of each client (except 000),</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf1 ff1"> &nbsp;" excluding DDIC and myself.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf2">select</span> mandt <span class="cf2">as </span>Client, <span class="cf2">max(</span> trdat <span class="cf2">)</span> <span class="cf2">as </span>LastLogin <span class="cf2">from </span>USR02</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="cf2">client specified</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">where </span>mandt <span class="cf2">&lt;&gt;</span> <span class="cf3">'000'</span> <span class="cf2">and </span>ustyp <span class="cf2">=</span> <span class="cf3">'A'</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">and </span>bname <span class="cf2">&lt;&gt;</span> <span class="cf3">'DDIC'</span> <span class="cf2">and </span>bname <span class="cf2">&lt;&gt;</span> <span class="cf2">@</span>sy-uname</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">group by</span> mandt <span class="cf2">order by</span> mandt</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">into table @data(</span>loginDates<span class="cf2">).</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf1">" Get users which have logged in on that date.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf2">loop at </span>loginDates <span class="cf2">assigning field-symbol(</span>&lt;login&gt;<span class="cf2">).</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;<span class="cf2">clear </span>lastLoginData<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">lastLoginData-client <span class="cf2">=</span> &lt;login&gt;-client<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">lastLoginData-lastLogin <span class="cf2">=</span> &lt;login&gt;-lastlogin<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">select </span>bname <span class="cf2">from </span>usr02</span><br></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">client specified</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">where</span><span class="fs10lh1 ff1"> mandt </span><span class="fs10lh1 cf2 ff1">= @</span><span class="fs10lh1 ff1">&lt;login&gt;-client</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">and </span><span class="fs10lh1 ff1">ustyp </span><span class="fs10lh1 cf2 ff1">=</span><span class="fs10lh1 ff1"> 'A'</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">and </span><span class="fs10lh1 ff1">trdat </span><span class="fs10lh1 cf2 ff1">=</span><span class="fs10lh1 ff1"> </span><span class="fs10lh1 cf2 ff1">@</span><span class="fs10lh1 ff1">&lt;login&gt;-lastLogin</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">into table @data(</span><span class="fs10lh1 ff1">userIds</span><span class="fs10lh1 cf2 ff1">).</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">loop at </span>userIds <span class="cf2">into </span>userId<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">if (</span> sy-tabix <span class="cf2">=</span> 1 <span class="cf2">).</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">lastLoginData-userIds </span><span class="fs10lh1 cf2 ff1">=</span><span class="fs10lh1 ff1"> userId</span><span class="fs10lh1 cf2 ff1">.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">else.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">concatenate </span><span class="fs10lh1 ff1">lastLoginData-userIds </span><span class="fs10lh1 cf3 ff1">','</span><span class="fs10lh1 ff1"> userId</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">into </span><span class="fs10lh1 ff1">lastLoginData-userIds</span><span class="fs10lh1 cf2 ff1">.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;</span><span class="fs10lh1 cf2 ff1">endif.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 cf2 ff1">endloop.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">append </span>lastLoginData <span class="cf2">to </span>lastLoginDataTab.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf2">endloop.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf1">" Now print the result.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;</span><span class="fs10lh1 cf2 ff1">write:/</span> <span class="fs10lh1 cf3 ff1">'SID'</span><span class="fs10lh1 cf2 ff1">,</span> <span class="fs10lh1 cf3 ff1">'Client'</span><span class="fs10lh1 cf2 ff1">,</span> <span class="cf3"><span class="fs10lh1 ff1">'Last logi</span><span class="fs10lh1 ff1">n'</span></span><span class="fs10lh1 ff1"><span class="cf2">,</span> <span class="cf3">'In use?'</span><span class="cf2">,</span> <span class="cf3">'User Ids'</span></span><span class="fs10lh1 cf2 ff1">.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf2">data: </span>inUseLimit<span class="cf2"> type </span>syst-datum<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;inUseLimit</span><span class="fs10lh1 cf2 ff1"> =</span><span class="fs10lh1 ff1"> sy-datum </span><span class="fs10lh1 cf2 ff1">-</span><span class="fs10lh1 ff1"> pDays</span><span class="fs10lh1 cf2 ff1">.</span><br></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;<span class="cf2">data:</span> inUse <span class="cf2">type </span>char1<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;</span><span class="fs10lh1 cf2 ff1">loop at</span><span class="fs10lh1 ff1"> lastLoginDataTab </span><span class="fs10lh1 cf2 ff1">into </span><span class="fs10lh1 ff1">lastLoginData</span><span class="fs10lh1 cf2 ff1">.</span><br></div><div data-line-height="1" class="lh1"><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">clear </span>inUse<span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">if (</span> lastLoginData-lastLogin <span class="cf2">&gt;=</span> inUseLimit <span class="cf2">).</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">inUse <span class="cf2">=</span> <span class="cf3">'X'</span><span class="cf2">.</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">endif.</span></span></div></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"><span class="cf2">write:/ </span>sy-sysid <span class="cf2">under </span><span class="cf3">'SID'</span><span class="cf2">,</span></span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">lastLoginData-client </span><span class="fs10lh1 cf2 ff1">under </span><span class="fs10lh1 cf3 ff1">'Client'</span><span class="fs10lh1 cf2 ff1">,</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">lastLoginData-lastLogin </span><span class="fs10lh1 cf2 ff1">under </span><span class="fs10lh1 cf3 ff1">'Last login'</span><span class="fs10lh1 cf2 ff1">,</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">inUse</span><span class="fs10lh1 cf2 ff1"> under </span><span class="fs10lh1 cf3 ff1">'In use?'</span><span class="fs10lh1 cf2 ff1">,</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;</span><span class="fs10lh1 ff1">lastLoginData-userIds </span><span class="fs10lh1 cf2 ff1">under </span><span class="fs10lh1 cf3 ff1">'User Ids'</span><span class="fs10lh1 cf2 ff1">.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf2 ff1"> &nbsp;endloop.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf2 ff1"> &nbsp;delete report sy-repid.</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 cf2 ff1"><br></span></div></div><div><span class="fs13lh1-5">It determines the last login dates of all dialog users (except DDIC and the user executing the program) in each client of the system, gets the user ID's that have logged in on that date and check whether the usage was within the last x (default: 90) days. Notice the last line: after execution the program deletes itself.</span></div><div><img class="image-11" src="https://www.shortcut-it.com/images/Get-information-across-systems---03.png"  title="Last login of dialog user - list output" alt="Last login of dialog user - list output" width="700" height="256" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Ok, works. Due to the fact that the program works cross-client, we can get our information with a single execution of the program in any client of the system. </span><span class="fs13lh1-5">Now the question is how to get this program into any system.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">The ~300 systems, that have to be analyzed, are in lots of different transport domains. We can create a transport request for our small program, but again it seems that a lot of people have to be contacted to import the transport request into their systems. Data and cofile are to be copied into the transport directory, the transport request has to be added into the importqueue and finally the import has to be done. Sounds again like a task bringing a lot of effort with it and needs a lot of time.</span></div><div><img class="image-4" src="https://www.shortcut-it.com/images/large-3898008.png"  title="" alt="" width="80" height="64" /> &nbsp;<span class="fs13lh1-5">Tired of reading why all these approaches are slow, costly and overall annoying?</span></div></div><div><br></div><div><div><div>With "Shortcut for SAP systems" you can perform <span class="fs13lh1-5"><b>queries across systems</b></span><span class="fs13lh1-5"><b>, quickly, </b></span><b><span class="fs13lh1-5"><span class="fs13lh1-5">v</span>ery flexibly, on short notice and completely on your own, without bothering many people</span></b>. </div><div><br></div><div>Take a look at the function "Insert / modify program".</div></div><div><img class="image-12" src="https://www.shortcut-it.com/images/Get-information-across-systems---04.png"  title="Insert a program and execute it" alt="Insert a program and execute it" width="787" height="558" /><span class="fs13lh1-5"><br></span></div><div><i class="fs12lh1-5">Function "Insert / modify program"</i></div><div><br></div><div>Having the source code of a program in a text file on your computer, you can insert it and execute it directly after it has been inserted. <span class="fs13lh1-5">In combination with the command line tool, you can run a script that goes through all systems and gets a single, final list of required information!</span></div><div><img class="image-13" src="https://www.shortcut-it.com/images/Get-information-across-systems---05.png"  title="Insert a program and execute it - output" alt="Insert a program and execute it - output" width="818" height="548" /><br></div><div><i class="fs12lh1-5">After inserting and immediately executing a program also the output of the executed program is available.</i></div><div><br></div><div>We can see that the system S22 is in use, but there are 2 clients 200 and 300 which are obviously not in use anymore. So, despite we have to keep the system, it is likely that these 2 clients can be deleted, which would save us database space.</div><div><br></div><div>The insertion of a program works independently of client settings or the system changeability. We can use it in every system and do not have to take preparations in the SAP systems. What I have to do for this is to create a variant (meaning a variant in "Shortcut for SAP systems", not in the SAP systems) for each system and create a single script, combining the calls of the command line tool for each variant. <span class="fs13lh1-5">Having a look at the previous screenshot you will notice that program name and title are not specific for the current request (of getting last login dates of the users). Instead I used a generally applicable name and title. </span><span class="fs13lh1-5">This allows us to use the variants and script for other requirements for cross-system queries. </span></div><div><span class="fs13lh1-5">For example:</span><br></div><div><ul><li><span class="fs13lh1-5">Our colleague </span><span class="fs13lh1-5"><i>Laurel Leaving</i> will be moving to one of our competitors. We need to know on which SAP systems he has a user master record and authorizations that we need to delete on short notice. </span><span class="fs11lh1-5"><a href="https://www.shortcut-it.com/download/Z_CHECK_USER_EXISTS.zip" class="imCssLink"><i>(ABAP program)</i></a></span><br></li><li><span class="fs13lh1-5">We will change one of our central print servers and need to know on which systems there is an RFC connection to it that has to be adjusted. </span><span class="fs11lh1-5"><a href="https://www.shortcut-it.com/download/Z_CHECK_RFC_EXISTS.zip" class="imCssLink"><i>(ABAP program)</i></a></span></li><li><span class="fs13lh1-5">We have received a request from the antitrust authorities for information on all business transactions with our supplier </span><span class="fs13lh1-5"><i>Otis</i></span><span class="fs13lh1-5">. In which systems do we manage this supplier and have business data with him?</span></li></ul><div><div>For each of these requests, a small ABAP program could provide the desired information. If a suitable SAP standard program already exists, the following procedure can be applied to the "Execute a program" function in the same way.</div></div></div><div><br></div><div><span class="fs13lh1-5">Let's proceed with the creation of the variants.</span> For each system we save a variant - quickly done by changing the connection, click on the "Save variant..." button, clicking on one of the already created variants (which puts the name and description into the input fields) and just adjusting the SID in the name of the variant. </div><div><img class="image-14" src="https://www.shortcut-it.com/images/Get-information-across-systems---06.png"  title="Insert a program and execute it - Save new variant" alt="Insert a program and execute it - Save new variant" width="771" height="568" /><br></div><div><br></div><div>Now let's move to the command line tool. For executing the function with the command line tool and writing the result into a file, it has to be called like this:</div><div><span class="fs12lh1-5 ff1">sc4sapcmd insertprogram &lt;variant&gt; &lt;output file&gt;</span></div><div><span class="fs13lh1-5">Using this command</span><br></div><div><div><span class="fs12lh1-5 ff1">sc4sapcmd insertprogram <span class="cb1">-listvariants</span> <span class="cb1">&gt;</span> <span class="cb1">c:\temp\insertpgmvariants.txt</span></span></div></div><div>we can get a list of all variants, written into file <span class="fs12lh1-5 ff1">"C:\temp\insertpgmvariants.txt"</span>.</div><div><img class="image-15" src="https://www.shortcut-it.com/images/Get-information-across-systems---07.png"  title="Cross system query - a variant for each system" alt="Cross system query - a variant for each system" width="821" height="580" /><br></div><div><br></div><div><div>With this file in a text editor, we can easily create a single command file that calls the command line tool for all variants.</div></div><div><br></div><div><img class="image-10" src="https://www.shortcut-it.com/images/Get-information-across-systems---08.png"  title="Cross system query - building a single script" alt="Cross system query - building a single script" width="817" height="527" /><br></div><div><br></div><div><div>For each insertion / execution the output will be stored in a separate file. To get one big list with all the results, we add a simple <span class="fs12lh1-5 ff1">copy</span> command at the end:</div></div><div><br></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Get-information-across-systems---09.png"  title="Cross system query - all results in a single file" alt="Cross system query - all results in a single file" width="646" height="95" /><br></div><div><br></div><div>Now let's execute the script:</div><div><br></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Get-information-across-systems---10.png"  title="Cross system query - executing the program in each system" alt="Cross system query - executing the program in each system" width="832" height="438" /><br></div><div>...</div><div><img class="image-3" src="https://www.shortcut-it.com/images/Get-information-across-systems---11.png"  title="Cross system query - executing the program in each system finished" alt="Cross system query - executing the program in each system finished" width="832" height="198" /><br></div><div><br></div><div><div>Tataaa! That's it - an ad hoc query with the desired information across all systems, in a single list:</div></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Get-information-across-systems---12.png"  title="Cross system query - all results in a single file" alt="Cross system query - all results in a single file" width="723" height="420" /><br></div><div><br></div><div><hr></div><div><div><span class="cb1"><i><span class="fs13lh1-5">Edit: With version &gt;= 1.2.1 of the command line tool there is the possibility to use </span><span class="fs13lh1-5"><b>XML files</b></span><span class="fs13lh1-5"> so that a separate Variant does not have to be created for each system. Just create one Variant only and name it "Cross system query". In the XML file (let's name it "Cross system query.xml") place a task for each system and override the connection and the output file from the Variant:</span></i></span></div></div><div><i><span class="fs13lh1-5"><br></span></i></div><div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1">&lt;ExecutionChain&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&lt;Comment&gt;Cross system query: get users with last login in the last 90 days </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;in every client in the sandbox systems to find systems that can be </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;(possibly) deleted.&lt;/Comment&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&lt;Task&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;InsertProgram StopOnError="false"&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Variant&gt;Cross system query&lt;/Variant&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Connection&gt;S22/100, SYS_BC_01&lt;/Connection&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;OutputFile&gt;C:\temp\Query S22.txt&lt;/OutputFile&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;/InsertProgram&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&lt;/Task&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&lt;Task&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;InsertProgram StopOnError="false"&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Variant&gt;Cross system query&lt;/Variant&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Connection&gt;S23/100, SYS_BC_01&lt;/Connection&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;OutputFile&gt;C:\temp\Query S23.txt&lt;/OutputFile&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&nbsp;&nbsp;&lt;/InsertProgram&gt; </span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&lt;/Task&gt; &nbsp;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1"> &nbsp;&lt;!-- &nbsp;and repeat the &lt;Task&gt; for each system ... --&gt;</span></div><div data-line-height="1" class="lh1"><span class="fs10lh1 ff1">&lt;/ExecutionChain&gt;</span></div></div><div><i><span class="fs13lh1-5"><br></span></i></div><div><i><span class="fs13lh1-5">Then call the command line tool with the XML file as argument: </span></i></div><div><i><span class="fs13lh1-5"><br></span></i></div><div><span class="fs12lh1-5 ff1 cb2"><span class="cf4">c:\Programs\Sc4SAP\Sc4SAPCmd.exe "C:\Programs\Sc4SAP\scripts\Cross system query.xml"</span></span></div><div><i><span class="fs13lh1-5"><br></span></i></div><div><hr></div><div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Offering the whole thing in an Excel file is a piece of cake.</span> I could do it alone, not have to bother many colleagues or delegate the task to someone else (who would then be an enemy for life if he had to do it manually for each system / client).</div><div><img class="image-8" src="https://www.shortcut-it.com/images/large-4824367.png"  title="" alt="" width="150" height="120" /> </div><div><br></div><div><span class="fs13lh1-5">Do we need an update of the information after 2 weeks? No problem, this would not create any effort at all. Doing the same with using 180 days in the past as the limit for the last login? Also no problem, just replace the '90' by '180' in the text file containing the ABAP program and start the script again. </span><span class="fs13lh1-5">If another question across systems comes up, I can think about another small ABAP program and still use the same script and the same variants. </span><span class="fs13lh1-5">By having the script available at the OS level, I can even schedule it to run regularly.</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">What a saving of capacity, time, ultimately money, and what a gain in speed to achieve the desired result!</span></div></div></div><div class="imTACenter"><img class="image-7" src="https://www.shortcut-it.com/images/large-2634379.png"  title="" alt="" width="200" height="200" /><span class="fs13lh1-5"><br></span></div></div>]]></description>
			<pubDate>Tue, 18 Jan 2022 10:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-1872665_thumb.jpg" length="70741" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?get_information_across_systems</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000019</guid>
		</item>
		<item>
			<title><![CDATA[Saving system specific tables - part 2]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000017"><div><span class="fs13lh1-5">In a </span><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?saving-system-specific-tables-using-r3trans" target="_blank" class="imCssLink">previous article</a></span><span class="fs13lh1-5"> we described a method to save your system specific data of your SAP system - data, which can not be taken from another system as it is unique for your SAP system, for example RFC connections and a lot of configuration data belonging to ALE, SAP Office, SAP Connect, the Security Audit Log and many more. In case something goes wrong with this data, it could be a hard task or nearly impossible to restore / reconfigure these settings - </span><span class="fs13lh1-5"><b>there is no other system with the same data, so you do not have any possibility to have a look or create a transport request</b></span><span class="fs13lh1-5">.</span><br></div><div class="mt1">Recently I found this in the SAP community forum <span class="fs8lh1-5">(</span><span class="fs8lh1-5">https://community.sap.com/t5/enterprise-resource-planning-q-a/sicf-accidently-activated-the-entire-tree/qaq-p/12537899</span><span class="fs8lh1-5">)</span><span class="fs13lh1-5">:</span><br></div><div><a href="https://community.sap.com/t5/enterprise-resource-planning-q-a/sicf-accidently-activated-the-entire-tree/qaq-p/12537899" onclick="return x5engine.imShowBox({ media:[{type: 'iframe', url: 'https://community.sap.com/t5/enterprise-resource-planning-q-a/sicf-accidently-activated-the-entire-tree/qaq-p/12537899', width: 1920, height: 1080, description: ''}]}, 0, this);" class="imCssLink inline-block"><img class="image-14" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---02.png"  title="SICF - Accidently activated the entire tree" alt="SICF - Accidently activated the entire tree" width="834" height="433" /></a><br></div><div>A simple wrong click (which might happen every day, <span class="fs13lh1-5">no one is safe from this)</span><span class="fs13lh1-5">, and now there is a big problem to get back to the previous settings!</span><br></div><div>The answer to the question - in a nutshell - is: no, there is no way. There are some tools available in the area of the service definition, like exporting the active services and a mass activation tool, but typically there is no export file, <span class="fs13lh1-5">and consequently nothing on which you can start the recovery. </span><span class="fs13lh1-5">And the mentioned tools are specific to the service definitions, so you have to know about them and use them, and in this case it would be necessary to do that manually (because the export feature can be used in a dialog session only - no way to schedule it so that it will be executed periodically and automatically).</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>But with "Shortcut for SAP systems" you can use a generic approach</b></span><span class="fs13lh1-5">, fitting to the service definitions as well as to many other settings. As written above we described this in another blog article - focused on the dialog function "Process table data using R3trans", dealing with the tables for the RFC connection. If we want to backup all system specific data periodically - including SICF settings as well as many others -, using the <a href="https://www.shortcut-it.com/sc4sapcmd.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'The command line tool of &quot;Shortcut for SAP systems&quot;', width: 180});" class="imCssLink">command line tool</a> is the preferable solution. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">So here is a description of how you can </span><span class="imUl"><span class="fs13lh1-5"><b>set up a daily backup of system-specific data</b></span><span class="fs13lh1-5"> for being able to </span><span class="fs13lh1-5"><b>restore corrupted settings within a few minutes if necessary</b></span></span><span class="fs13lh1-5">.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Ok, but which tables contain the system-specific data? </span><span class="fs13lh1-5">Difficult to figure out... fortunately the SAP system gives us this information! We can use the "PCA tool" (<span class="imUl">P</span>ost <span class="imUl">C</span>opy <span class="imUl">A</span>utomation). This tool is </span><span class="fs13lh1-5">part of the SAP Landscape Management, enterprise edition software and SAP Landscape Management Cloud software. To use the full scope of its functions, you must either own an SAP Landscape Management, enterprise edition license or an SAP Landscape Management Cloud subscription. If this does not fit to your situation, you can not use it and likely not all software parts of the PCA tool are available in your system. But the good news is, that in every case we can use it to determine the tables which are worth to consider them in a backup.</span><br></div><div><br></div><div><span class="fs13lh1-5"><b>1st step:</b></span><span class="fs13lh1-5"> Use the program </span><span class="fs12lh1-5 ff1">Z_SHOW_PCA_TABLES</span><span class="fs13lh1-5"> supplied with our product (folder </span><span class="fs12lh1-5 ff1">ABAPs</span><span class="fs13lh1-5">, file '</span><span class="fs12lh1-5 ff1">ShowPCATables.txt</span><span class="fs13lh1-5">', or download it <a href="https://www.shortcut-it.com/download/Z_SHOW_PCA_TABLES.zip" onmouseover="x5engine.imTip.Show(this, { text: 'Program Z_SHOW_PCA_TABLES - get system-specific tables from the PCA tool', width: 180});" class="imCssLink">here</a>) to get the complete list. This is the selection screen:</span><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---01.png"  title="Selection screen for listing the PCA tables" alt="Selection screen for listing the PCA tables" width="900" height="494" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>The main usage of the PCA tool is in the context of system refreshes. With the "Refresh" option <span class="cf1 cb1">(1)</span> we will get a complete list of the tables, that the PCA tool would export in front of a system refresh and import it afterwards in the post-processing. In other words, we will get a list of tables containing the system-specific configuration data. </div><div>The block <span class="fs13lh1-5"><i>"Data for XML file generation"</i></span> is about the options for generating an XML file to be used with the <span class="fs13lh1-5"><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/sc4sapcmd.html" onmouseover="x5engine.imTip.Show(this, { text: 'The Sc4SAP command line tool', width: 180});" class="imCssLink">"Shortcut for SAP systems" command line tool</a></span></span><span class="fs13lh1-5">. The command line tool enables you to execute nearly all functions of "Shortcut for SAP systems" outside of the GUI application,</span><span class="fs13lh1-5"> </span><span class="imUl fs13lh1-5">executable on OS level</span><span class="fs13lh1-5">. And it is not only about executing a single function - the command line tool allows us to execute multiple tasks with a single call. This is where we want to go to.</span></div><div><hr></div><div><i class="fs13lh1-5"><b>BTW, you can also do the <span class="cb2">complete pre- and post-work in the context of a system refresh</span>. Read more about this <a href="https://www.shortcut-it.com/blog/index.php?pre-and-post-work-of-an-sap-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Pre--and-post-work-of-an-SAP-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Pre- and post work of an SAP System refresh&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">here</a> and <a href="https://www.shortcut-it.com/blog/index.php?speed-up-the-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Speed-up-the-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Speed up the system refresh!&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">here</a>.</b></i></div><div><hr></div><div><span class="fs13lh1-5">As we want to create a backup of the system-specific configuration data we set the flag at the corresponding field <span class="cf1 cb1">(2)</span>. </span></div><div><span class="fs13lh1-5">In the input field <span class="cf1 cb1">(3)</span> we enter the connection to the SAP system. Input field <span class="cf1 cb1">(4)</span> is for the target directory where the backup data is to be stored. Here we use a dedicated directory for this purpose (which is recommendable).</span></div><div><div><br></div></div><div>Now let's execute the program. We will receive a list of components and their related tables:</div><div><img class="image-5" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---02_h2la76nv.png"  title="List of system specific tables from the PCA tool" alt="List of system specific tables from the PCA tool" width="950" height="805" /><br></div><div><br></div><div><span class="fs13lh1-5">So this is the overall amount of components and tables that would be handled by the PCA tool (if you have the necessary license) in the context of a system refresh.</span><br></div><div>Above the table, you will find a <span class="fs13lh1-5"><b>button "XML file"</b></span>. With this button the ABAP program can generate an XML file that can be used by "Shortcut for SAP systems" command line tool for <span class="fs13lh1-5"><b>backing up the tables in files</b></span>. </div><div>If you want, you can use the ALV filter and/or the selection mark in the 1st row to reduce the amount of components and/or tables. As this article is about backing up system specific data, we simply take all of the components and tables. </div><div><br></div><div><span class="fs13lh1-5"><b>2nd step</b></span><span class="fs13lh1-5"><span class="fs13lh1-5"><b>:</b></span> Click on the "XML file" button</span><br></div><div><img class="image-6" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---03.png"  title="Generate an XML file for &quot;Shortcut for SAP systems&quot;" alt="Generate an XML file for &quot;Shortcut for SAP systems&quot;" width="750" height="211" /><br></div><div><span class="fs13lh1-5"><br></span></div><div>After this you will be asked for directory and filename of the XML file.</div><div><img class="image-7" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---04.png"  title="Location and filename for XML file" alt="Location and filename for XML file" width="800" height="609" /><br></div><div><br></div><div><span class="fs13lh1-5">After generating and storing the XML file, you will get some information about the content of the generated XML file.</span><br></div><div><img class="image-9" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---05.png"  title="Content description of the XML file" alt="Content description of the XML file" width="542" height="163" /><br></div><div><br></div><div><div><span class="fs13lh1-5">There is a difference of 'Total tables' to 'Distinct tables'. This is because some tables are listed in more than one component (e.g. the components</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">ARCHIVE</span><span class="fs13lh1-5">,</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">ARCHIVE_ADK</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">and</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">ARCHIVE_CUST</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">have some intersections regarding their tables, same is for components</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">CRM</span><span class="fs13lh1-5">,</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">CRMINERP</span><span class="fs13lh1-5">,</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">PI_BASIS_CRM</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">and some more</span><span class="fs13lh1-5">).</span></div></div><div><br></div><div>Ok, let's have a look into the generated XML file. </div><div><img class="image-10" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---06.png"  title="The generated XML file" alt="The generated XML file" width="950" height="651" /><br></div><div><br></div><div>For every component we will find a <span class="fs12lh1-5 ff1">&lt;Task&gt;</span> tag, addressing the <span class="fs13lh1-5"><a href="https://www.shortcut-it.com/datacorrection.html#CopyDataWithR3trans" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Process table data using R3trans', width: 180});" class="imCssLink"><span class="fs13lh1-5">"Process table data using R3trans" function</span></a></span> <span class="fs13lh1-5">in "Shortcut for SAP systems". In the </span><span class="fs12lh1-5 ff1">&lt;DefaultConnection&gt;</span><span class="fs13lh1-5"> tag we find the connection given in the selection screen and in the </span><span class="fs12lh1-5 ff1">&lt;ServerFile&gt;</span><span class="fs13lh1-5"> tags the path from the selection screen is used.</span></div><div><br></div><div>As written before the XML file is intended to be processed by the command line tool. So, let's execute it.</div><div><img class="image-11" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---07.png"  title="Running the command line tool with the XML file" alt="Running the command line tool with the XML file" width="914" height="84" /><br></div><div><br></div><div>With this one-liner the content of all PCA components with their tables will be written into files in the SAP system:</div><div><img class="image-13" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---08.png"  title="Created files in the specified directory" alt="Created files in the specified directory" width="1000" height="394" /><br></div><div><br></div><div><div><span class="fs13lh1-5">It takes a few minutes. At the end you can see in the last message from the command line tool whether errors occurred or everything is fine.</span></div><div><img class="image-21" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---09.png"  title="Command line tool finished with the backup" alt="Command line tool finished with the backup" width="850" height="579" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>RC 4... a warning. Let's have a look at the reason for this. <span class="fs13lh1-5">You can also have a look into the XML file - the command line tool updates it and writes some information into it. At the end you will find a summary, and also each </span><span class="fs12lh1-5 ff1">&lt;Task&gt;</span><span class="fs13lh1-5"> tag was enriched by a </span><span class="fs12lh1-5 ff1">&lt;Result&gt;</span><span class="fs13lh1-5"> tag.</span></div><div><img class="image-31" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---10.png"  title="XML file after execution - summary at the end" alt="XML file after execution - summary at the end" width="810" height="378" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><img class="image-32" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---11.png"  title="XML file with information out of each executed task" alt="XML file with information out of each executed task" width="950" height="640" /><br></div><div><br></div><div><span class="fs13lh1-5">Having a look into the directory in the SAP system you can see lots of files. For each R3trans file you will also find a log file.</span></div></div><div><img class="image-33" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---12.png"  title="Exported data and log files" alt="Exported data and log files" width="648" height="484" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>The log files were created by R3trans and contain some information about the tables and the amount of processed records. Here we can find the reason for the warning:</div><div><img class="image-34" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---13.png"  title="R3trans log file" alt="R3trans log file" width="693" height="424" /><br></div><div><br></div><div>Here some information about a transport request comes up. Why?</div><blockquote><div><span class="fs13lh1-5">R3trans works in general with a "control file" (containing the R3trans command, the specification of the client etc.) and - optionally - with a "command file", which is in fact a transport request. The tables to be processed can be specified in the control file and/or in the command file. For enabling R3trans to use parallelization (expecially for system refreshes the performance often becomes an issue), the tables are to be specified in a command file. The warning here results out of the use of a command file. When using the PCA tool for system refreshes, you will find the same warning. Not for every component a command file is used, therefore some tasks ended with RC 0.</span></div></blockquote><div><br></div><div><span class="fs13lh1-5"><b>More or less that's all!</b></span><span class="fs13lh1-5"> Using the command line tool and the XML file we can </span><span class="fs13lh1-5"><b>schedule a daily backup</b></span><span class="fs13lh1-5"> of this data. This can be done using a lean solution like the Windows Task Scheduler or a full-blown automation solution like UC4©. </span></div><div><span class="fs13lh1-5"><b>In a nutshell, there is very little effort to set it up: </b></span></div><div><ol><li><span class="fs13lh1-5">create a backup directory on the SAP server</span></li><li><span class="fs13lh1-5">create the XML file with the supplied ABAP program (this should be done individually for each system line on the development system, because the amount of tables depends on the SAP release and installed software components). </span></li><li><span class="fs13lh1-5">schedule the one-liner (calling the command line tool with the XML file as argument) periodically.</span></li></ol></div><div><span class="fs13lh1-5"><b>In total: 5 minutes per SAP system? What little effort for such a huuuuge gain in security in your SAP operations.</b></span><span class="fs13lh1-5"><span class="fs13lh1-5"><b> </b></span> </span><br></div><div><span class="fs13lh1-5"><br></span></div><div><hr></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">If we get into the situation that by mistake the whole SICF tree was activated (like the unlucky guy mentioned above), </span><span class="fs13lh1-5"><b>we can easily restore the data in a minute</b></span><span class="fs13lh1-5">. Just use the "Process table data using R3trans" function for "Import" and use the file containing the data.</span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---14.png"  title="Using the backup for restoring the data" alt="Using the backup for restoring the data" width="1090" height="524" /><br></div><div><br></div><div>After taking over the data from the XML file and clicking on the Execute button the data will be restored in few seconds. </div><div><img class="image-8" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---15.png"  title="Restoring the SICF data with the GUI application" alt="Restoring the SICF data with the GUI application" width="838" height="742" /><br></div><div><br></div><div>There is a warning given. The reason for this is visible in the log file:</div><div><img class="image-15" src="https://www.shortcut-it.com/images/Saving-system-specific-tables---part-2---16.png"  title="R3trans log file of importing SICF data" alt="R3trans log file of importing SICF data" width="736" height="195" /><br></div><div><br></div><div><span class="fs13lh1-5">R3trans found that the data file was created on the same system. Yes, that's typical for a backup. </span><br></div><div><br></div><div>In case the "Buffer synchronization" was not set, due to table buffering it may take few minutes after executing the import (you may have a look into the open synchronizations by using transaction AL12), but finally the SICF tree will be the same as at the time the backup was made! </div><div><br></div><div><hr><br></div><div><span class="fs13lh1-5"><b>So, this would be an easy way to get more security in the operability of your SAP systems.</b></span> In my opinion this should be done for every productively used system. Even if there are doubts that a simple import of the stored data might not be the best approach to fix a recent problem with lost data, <span class="imUl">the data is there and could also be used to restore it on another system</span> - as an intermediate system where the data can be verified and adjusted if necessary. <span class="fs13lh1-5">Once the data is available and usable, the possibilities are correspondingly diverse. Is the user department missing an important variant for a report which can not be recreated easily? Ok, let's make a backup of the variants on a test system, then restore the variants data from the backup of our productive system on the test system, put the variant into a transport request, release the transport request and finally restore the variants on the test system. Likely you will be the hero of the day.</span></div><div><span class="fs13lh1-5"> </span><img class="image-12" src="https://www.shortcut-it.com/images/large-2478978.jpg"  title="SAP Admin - Hero of the day" alt="SAP Admin - Hero of the day" width="150" height="195" /></div><div>The alternative to this easily done backup of system specific data is a point-in-time recovery of the whole system - if you exactly know the point in time when the data got lost. <span class="fs13lh1-5">In practice, this would be a disaster and the very last way out and likely would create more problems than solving it - I never noticed that this really has been done on a productive system. You could also think about a point-in-time recovery on another (test) system, but also this option has some hurdles: you need to have the hardware resources and it is quite time-consuming. Likely it would take days instead of some minutes. The above described backup method can be set up with </span><span class="fs13lh1-5"><b>less effort</b></span><span class="fs13lh1-5"> and </span><span class="fs13lh1-5"><b>provides a tremendous increase in the ability to quickly fix a problem in your SAP systems</b></span><span class="fs13lh1-5">.</span></div></div>]]></description>
			<pubDate>Mon, 03 Jan 2022 10:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Saving-system-specific-tables---part-2---01_thumb.png" length="321401" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?saving-system-specific-tables-part-2</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000017</guid>
		</item>
		<item>
			<title><![CDATA[Automation, automation...]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000016"><div><span class="fs13lh1-5"><i>“I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” &nbsp;</i></span><span class="imTARight fs13lh1-5">(Bill Gates)</span></div><div class="imTALeft"><br></div><div class="imTALeft">With respect to this statement from Bill Gates (and he is for sure not the only one with this opinion), let's see how we can move into this direction - <span class="fs13lh1-5">towards to laziness, avoiding many repetitive, boring, time-consuming and annoying tasks. </span></div><div class="imTALeft"><span class="fs13lh1-5">Automation is one of the key factors to a well-running IT landscape and it </span><span class="fs13lh1-5">accommodates both our need for laziness and safety in operations.</span></div><div class="imTALeft"><span class="fs13lh1-5"><br></span></div><div class="imTALeft"><div>Although many things are possible in SAP, there are still some gaps that make life unnecessarily difficult, especially for administrators. <span class="fs13lh1-5">So if you are an SAP administrator and/or interested in making your life easier during system copies or go-lives, here are ways to make some tasks easier.</span></div><div>Think about:</div><div><ul><li>Re-creating the system users after a system copy</li><li>Setting passwords for them<br></li><li>Dealing with the system-specific data before / after a system copy<br><br></li></ul><div><hr><div><i><span class="fs13lh1-5 cb1">Edit: With version 1.2.1 of the command line tool this article is a little bit outdated, especially regarding the work for a system refresh. Have a look at this blog article:</span></i></div><div><blockquote><div><i><span class="fs13lh1-5 cb1"><a href="https://www.shortcut-it.com/blog/index.php?pre-and-post-work-of-an-sap-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Blog article &quot;Pre- and post work of an SAP System refresh&quot;', width: 180});" class="imCssLink">Pre- and post work of an SAP System refresh</a></span></i></div></blockquote></div><div><span class="cb1"><i><span class="fs13lh1-5">When using XML files you do not need variants anymore.</span></i><br></span></div><div><i><span class="fs13lh1-5 cb1">In the subfolder 'xml' you will also find example files for doing the pre work in front of a system refresh (identically to saving the system specific data) and for doing the post work (cleaning some tables and re-importing the saved data). The also supplied ABAP program (subfolder 'ABAPs', file 'ShowPCATables.txt') makes it so easy to generate XML files for the purpose of backing up system specific data as well as for automatism of pre- and post-processing in the context of a system refresh. Also user locking, unlocking and logging off, copying users and setting passwords can be automated.</span></i></div></div></div><div><hr></div><div><br></div><div>Let's start with saving the system users before and re-creating them after the system copy. </div><div>We can use the "Copy user" function to store the system users in a file in front of the system copy and to re-create them out of the file after the system copy. <span class="fs13lh1-5">To implement this in an automated process we can use the command line tool, which comes with our product. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">First we have to specify the system users to be stored in the file. Some users are not necessary to store and re-create them (for instance the DDIC user and the one used for the TMS), but most of the system users are used exclusively on the system and would get lost if we do not save them. Beside the system users there could be some others to be kept, for instance an emergency user. </span></div><div><br></div><div><div><img class="image-3" src="https://www.shortcut-it.com/images/Automation---01.png"  title="Copy user" alt="Copy user function" width="736" height="705" /><br></div></div><div><br></div><div>We save these values in a variant using the <img class="image-2" src="https://www.shortcut-it.com/images/Automation---02.png"  title="" alt="" width="48" height="23" /> <span class="fs13lh1-5">button at the upper right of the window:</span></div><div><img class="image-6" src="https://www.shortcut-it.com/images/Automation---03.png"  title="Copy user function - variant" alt="Saving a variant for the Copy user function" width="491" height="540" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Now it is on creating another variant for re-creating the users (reading them out of the file and creating them in the system). If the file does not exist yet, we have to execute the copy process now - otherwise we could not create the variant for re-creating them because the function claims that the file does not exist. </div><div>Once we executed the "store" part we can create the variant for restoring the users out of the file. Switch the "From" and "To" data and store the settings in a second variant:</div><div><img class="image-4" src="https://www.shortcut-it.com/images/Automation---04.png"  title="Copy user function" alt="Copy user function - variant for restoring the users" width="736" height="629" /><br></div><div><br></div><div>Now we have the variants for storing and restoring the system users. Let us move to the command line tool. It is located in the same folder and is named with "Sc4SAPCmd.exe". </div><div>Opening the console and executing it offers some information how to use it:</div><div><img class="image-1" src="https://www.shortcut-it.com/images/Automation---05.png"  title="Sc4SAP command line tool" alt="Sc4SAP command line tool" width="692" height="694" /><br></div><div>In a nutshell: 1st parameter is the function, 2nd parameter is the variant. Thus, for copying the users into the file it is this:</div><div><span class="fs12lh1-5 ff1">sc4sapcmd copyuser "QX1/100 syscopy store"</span></div><div><div><span class="fs13lh1-5">If I would have given a non-existing variant, the command line tool would claim about this. But I did it correctly, and so the copy user function was executed: </span></div></div><div><img class="image-18" src="https://www.shortcut-it.com/images/Automation---06.png"  title="Sc4SAP command line tool" alt="Sc4SAP command line tool - output after storing the users in a file" width="678" height="395" /><span class="fs13lh1-5"><br></span></div><div data-line-height="1" class="lh1"><span class="fs13lh1"><br></span></div><div data-line-height="1.5" class="lh1-5"><span class="fs13lh1-5">Similar to what we have seen using the GUI application. Ok, it worked. </span><br></div><div data-line-height="1.5" class="lh1-5"><span class="fs13lh1-5">Because I did not set the "Overwrite existing users?" flag, I can also test the 2nd step. I expect that it works in general, but no users are to be overwritten, so finally it does not cause any change in my system:</span></div><div><div data-line-height="1.5" class="lh1-5"><span class="fs12lh1-5 ff1">sc4sapcmd copyuser "QX1/100 syscopy <span class="imUl">re</span>store"</span></div></div><div><img class="image-7" src="https://www.shortcut-it.com/images/Automation---07.png"  title="Sc4SAP command line tool" alt="Sc4SAP command line tool - output after restoring the users in a file" width="678" height="395" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>...</b></span></div><div><img class="image-8" src="https://www.shortcut-it.com/images/Automation---08.png"  title="Sc4SAP command line tool" alt="Sc4SAP command line tool - output after restoring the users in a file" width="678" height="253" /><br></div><div data-line-height="1.5" class="lh1-5"><span class="fs13lh1-5"><br></span></div><div data-line-height="1.5" class="lh1-5"><span class="fs13lh1-5">After a system copy the situation will be different and missing users will be re-created. </span></div><div data-line-height="1.5" class="lh1-5"><span class="fs13lh1-5"><span class="imUl">There is one issue I have to take into account: the user used in the connection has to be valid even after the system copy!</span> If there is one with the same login data that I can use, fine! If not, I have to ensure that the connection to the system used for the re-creation of the users also works after the system copy is done. </span></div><div data-line-height="1.5" class="lh1-5"><span class="fs13lh1-5"><br></span></div><div data-line-height="1.5" class="lh1-5"><span class="fs13lh1-5">After the system users have been re-created, the passwords are to be set. I use the "Set password" function to do so, the fields for the users and the passwords can easily be filled via clipboard. Saving the data in a variant enables me to execute it via the command line tool. </span></div><div><img class="image-20" src="https://www.shortcut-it.com/images/Automation---10.png"  title="Set password function" alt="Set password function - variant for setting passwords of system users" width="741" height="671" /><span class="fs13lh1-5"><br></span></div><div><br></div><div data-line-height="1.5" class="lh1-5">Back again to the console, using the command line tool:</div><div data-line-height="1.5" class="lh1-5"><div data-line-height="1.5" class="lh1-5"><span class="fs12lh1-5 ff1">sc4sapcmd setpassword "QX1/100 systemuser</span><span class="fs12lh1-5 ff1">"</span></div></div><div><img class="image-10" src="https://www.shortcut-it.com/images/Automation---11.png"  title="Sc4SAP command line tool" alt="Sc4SAP command line tool - output after setting the passwords" width="678" height="395" /><span class="fs12lh1-5 ff1"><br></span></div><div><span class="fs13lh1-5"><b>...</b></span></div><div><img class="image-19" src="https://www.shortcut-it.com/images/Automation---12.png"  title="Sc4SAP command line tool" alt="Sc4SAP command line tool - output after setting the passwords" width="678" height="138" /><br></div><div><br></div><div><span class="fs13lh1-5">For me as an admin using the command line tool is not easier than using the GUI application.</span><br></div><div>But, and this is the real benefit, it enables me to offer <span class="fs13lh1-5"><b>simple executable scripts</b></span> to save and restore the users during a system copy process and set the correct passwords. <b><span class="fs13lh1-5">In automation solutions such small one-liners can be integrated in existing automatisms to be executed at any time.</span></b></div><div><hr></div><div><span class="fs13lh1-5">Now let's have a look at another task mentioned above: </span><span class="fs13lh1-5"><b>dealing with system-specific data before and after a system copy</b></span><span class="fs13lh1-5">. There are lots of them, e.g. the RFC tables, the TMS configuration, the license key and many more. Maybe you have already some scripts or similar to ease your life for some of these, but usually there is still some gap where you have to prepare or finish the system copy by manual tasks. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">I would like to draw your attention to the "Process data using R3trans" function, which can make life much easier regarding system copies. I prepared some variants to save system-specific tables in front of a system copy. As in the scope of a system copy only the database is copied and not the whole filesystem of the application server, I used the DIR_HOME directory to store all the data files. </span></div><div><img class="image-21" src="https://www.shortcut-it.com/images/Automation---21.png"  title="Process table data using R3trans" alt="Process table data using R3trans - variants for system copy" width="896" height="535" /><span class="fs13lh1-5"><br></span></div><div>Regarding the granularity I did it similar to the grouping of tables in the "PCA" tool (you can find some information in <a href="https://www.shortcut-it.com/blog/index.php?saving-system-specific-tables-using-r3trans" target="_blank" class="imCssLink">this blog article</a>). <span class="fs13lh1-5">However, you can also use fewer variants with more tables and group them as you like.</span></div><div><div><blockquote><div><i><br><span class="fs13lh1-5 cf1">Some basic components of the PCA tool are available in all(?) SAP systems with an ABAP stack. You can execute the program SCTC_LIST_TABLES to show tables of a component.</span><span class="fs13lh1-5 cf1"> </span><span class="fs13lh1-5 cf1">However, due to license issues (the use of the PCA tool requires some prerequesites) the program might deny your request. In that case you can try</span><span class="fs13lh1-5 cf1"> </span><span class="fs13lh1-5 cf1"><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/download/Z_SHOW_PCA_TABLES.zip" target="_blank" class="imCssLink">this</a></span></span><span class="fs13lh1-5 cf1"> </span><span class="fs13lh1-5 cf1">program instead, showing all components managed by the PCA tool and their related tables in one big list. And</span><span class="fs13lh1-5 cf1"> </span><span class="fs13lh1-5 cf1"><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/download/PCA tables NW AS ABAP 752.xlsx" target="_blank" class="imCssLink">here</a></span></span><span class="fs13lh1-5 cf1"> </span><span class="fs13lh1-5 cf1">is the output of the program taken from my local SAP system (NW AS ABAP 7.52).</span></i></div></blockquote></div><div><br></div></div><div>Having all these variants prepared I made a small script file on OS level and stored it in a subdirectory "scripts": </div><div><img class="image-5" src="https://www.shortcut-it.com/images/Automation---22.png"  title="Using the Sc4SAP command line tool" alt="File for exporting all data in front of the system copy" width="815" height="540" /><br></div><div><span class="fs13lh1-5">Starting this file on OS level launches the command line tool with function "Process data using R3trans" with the given variants and saves the data of all the tables in files on the application server.</span><br></div><div><img class="image-13" src="https://www.shortcut-it.com/images/Automation---23.png"  title="Sc4SAP command line tool" alt="Running the export of data in front of the system copy" width="853" height="494" /><br></div><div><span class="fs13lh1-5"><b>...</b></span></div><div><img class="image-12" src="https://www.shortcut-it.com/images/Automation---24.png"  title="Sc4SAP command line tool" alt="Export of data in front of the system copy finished" width="853" height="281" /><br></div><div><br></div><div>In AL11 we can see all the created files, containing the data that is to be kept and restored for the system copy. </div><div><img class="image-11" src="https://www.shortcut-it.com/images/Automation---27.png"  title="File list" alt="AL11 - list of files containing exported data" width="654" height="597" /><br></div><div><br></div><div>Based on the export variants, the variants for importing the data again in the <span class="fs13lh1-5"><b>post-work</b></span> phase can be created quite easily: just take the variants and for each of the variant just change the R3trans action from "Export" to "Import" and store it as "...import..." variant.</div><div><br></div><div><img class="image-15" src="https://www.shortcut-it.com/images/Automation---26.png"  title="Process table data using R3trans" alt="Variant for importing the data after the system copy" width="833" height="687" /><br></div><div><br></div><div><span class="fs13lh1-5">Between exporting and importing the data again some tables are preferrably to be emptied. In the PCA tool there is a differentiation between "Refresh" and "Truncate". Whereas the "Refresh" option belongs to the tables to be exported before the system copy and imported again after the system copy, the "Truncate" option belongs to tables that are to be emptied in front of the import. The list of tables is much smaller than by using the "Refresh" option. For example, the T000 table will not be removed - because if this table is emptied, no login into the system would be possible anymore. Also the RFC tables are not listed, due to similar reasons (without some basic RFC connections, e.g. SAPGUI_QUEUE, lots of shortdumps would occur and simple functions using the SAPGUI would abort).</span></div><div><br></div></div><div class="imTALeft"><div><img class="image-14" src="https://www.shortcut-it.com/images/Automation---25.png"  title="Options in the PCA tool" alt="Options in the PCA tool" width="369" height="177" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><img class="image-16" src="https://www.shortcut-it.com/images/Automation---28.png"  title="PCA tables" alt="PCA tables - &quot;Truncate&quot; scope" width="781" height="542" /><br></div><div><br></div><div>So, let's choose all of the given tables and create variants for removing the contents of these tables.</div><div><br></div><div><div><span class="fs13lh1-5">Then combine all the "Remove / Clientremove" commands in a script as already done for the "Export" variants and do the same for the "Import" commands. In sum you should have 3 single command files, one for "Export", one for "Remove / Clientremove" and one for "Import" (the last 2 files can also be combined into one). </span><span class="fs13lh1-5">With this you can </span><span class="fs13lh1-5">do the pre-work and the post-work of a system copy via one-liners! And to go one step further, the availability of the functions on OS level even makes it possible to integrate the script files into automatic procedures that you might have already in use for system copies.</span></div></div><div><br></div><div><span class="fs13lh1-5">Isn't this much smarter as doing the same manual administrative stuff like TMS configuration, SAP Connect settings etc. again and again, consuming more time, possibly (rather old-fashioned) based on some screenshots you had to do before the system copy </span><span class="fs13lh1-5">and with the possible error rate that inevitably accompanies manual work</span><span class="fs13lh1-5">? It saves me </span><span class="fs13lh1-5">manual (and thus error-prone) work at potentially inconvenient hours, and on top of that, the time savings are enormous! </span><span class="fs13lh1-5">The command line tool also makes it possible to integrate these tasks into an automated process, thus avoiding the typical break between automated and manual operations at this point in the flow of a system copy. In this way, manpower and also processing time can be saved. </span><span class="fs13lh1-5">And, to come back to the intention mentioned at the beginning of this article, I can be a little lazier again....</span><br></div></div></div>]]></description>
			<pubDate>Thu, 11 Nov 2021 10:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Automation_thumb.jpg" length="207694" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?automation</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000016</guid>
		</item>
		<item>
			<title><![CDATA[How to assign new passwords to lots of users]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000015">If you have to assign new passwords to lots of users (or just the old ones to lots of system users after a system copy), it seems you are a little bit lost in the scope of possibilities in the SAP standard. <div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">There is a mass function (transaction SU10), </span><span class="fs13lh1-5">but it still does not allow you to</span><div><ul><li>assign the same password to lots of users<br></li><li>assign already given, indiviual passwords to lots of users. <br></li></ul></div><div>In transaction SU10 the only possibility regarding passwords is to either maintain every user individually (which is nearly the same as you would do it in SU01) or to generate an individual password for each user in the selection. </div><div><br></div><div>This leaves us with a lack of functionality for several use cases. Think about these situations: <br><br></div><div><ol><li>Your quality or test system will be overwritten with a system copy of the productive system. <br><br>This happens quite often - the need for recent data in a test system to offer better possibilities for testing makes it necessary to do this more or less frequently. <br>With a client copy or export in front of the system copy you can save the users, and after the system copy you can do the client copy again back into the overwritten client of your quality or test system. But you need another system or some space in the filesystem to do this, and - as written in <a href="https://www.shortcut-it.com/blog/index.php?copying-users" class="imCssLink">another blog article</a> - it is every time "all or nothing", means you can not have users and authorizations from the productive system mixed with the project team, some test users and the system users of the quality or test system. Not in the SAP standard. <br><br>But for test purposes it could make sense to have the regular users and their authorizations from the productive system, especially when there is a need to consider also some authorization tests. But, as written before, the mix is not possible via SAP standard tools.<br><br><span class="imUl">In any case it is necessary to keep at least the system users</span> in the quality or test system. Usually they are system-specific, the passwords are individually assigned and after the system copy all these users with the correct passwords have to be available again. Otherwise the interfaces with the connected systems will not work anymore. That's why in most cases the strategy is to keep all users of the overwritten system and the above mentioned client copy or export and import tasks have to be done. This takes time and increases the pressure on the admins to work as quickly as possible to offer the system as early as possible. <br><br></li><li>There are lots of new users in the system which need an initial password. <br><br>Maybe the initial password is the same for each of the new user (not the best approach, isn't it?), maybe the initial password(s) is/are already published. This could be the case on a training client. There might be users like <span class="fs12lh1-5 ff1">STUD_001</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">with initial password</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">havefun_001</span><span class="fs13lh1-5">,</span> <span class="fs12lh1-5 ff1">STUD_002</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">with initial password</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">havefun_002</span><span class="fs13lh1-5">,</span> and so on. <br><br>Or these lots of new users should get generated initial passwords. From security point of view this would be the best option. And this use case is covered in the SAP standard. In transaction SU10 you can select lots of users and generate individual passwords for them. You will receive a list of the users and their passwords.<br><img class="image-0" src="https://www.shortcut-it.com/images/How-to-assign-passwords---01.png"  title="SU10 - generated passwords" alt="SU10 - generated passwords" width="669" height="254" /><br><br>Ok, this is usable, isn't it? But...there is still one thing where our product offers additional value. We will see it later. </li></ol></div><div><br></div><div>With "Shortcut for SAP systems" we offer a flexible and fast possibility to assign the same password or agreed individual or generated passwords to lots of users. Let's have a look on it: </div><div><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/How-to-assign-passwords---02.png"  title="Set password function" alt="Set password function" width="603" height="522" /><br></div><div><br></div><div>There are 2 tabs: "Same password to users" and "Individual passwords to users". Here you see the finished assignment of the same password to 24 test users. A typical use case is the start of a test phase where the teams were already informed about the test users and their passwords. Doing this with the SAP standard functions would make it necessary to maintain each of the 24 users individually. Possible... yes, but annoying, boring, time consuming. </div><div><br></div><div>If it is on assigning individual passwords to lots of users, we have to look at the other tab. </div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/How-to-assign-passwords---03.png"  title="Set password function - individual passwords" alt="Set password function - individual passwords" width="603" height="536" /><br></div><div><br></div><div><div><span class="fs13lh1-5">Here you can see the finished assignment of the individual passwords to 36 system users. Without our tool, password assignment would require maintaining each of these system users individually. The passwords for the system users are very cryptic and complicated, due to the use of the password generator feature when they were created (well done, this is how passwords for system users should be given). Entering them manually without errors would be a challenge, so without our product's "Set password" feature, this would be a copy'n paste task via the clipboard - in this case 36 times. </span><span class="fs13lh1-5">Looks really like an interesting task, doesn't it</span><span class="fs13lh1-5">? </span><img class="image-6" src="https://www.shortcut-it.com/images/large-3943389.png"  title="" alt="" width="20" height="22" /></div></div></div><div><span class="fs13lh1-5">Using the "Set password" feature you can do this in a single step, done in few seconds. The text fields for users and their passwords can be filled via the clipboard, </span><span class="fs13lh1-5">and as admins usually have lists of system users and their passwords, the whole task can be done in a minute.</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">This is much easier and much less error-prone.</span><span class="fs13lh1-5"> </span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">And, especially in the context of system copies, we can go one step further: by using the </span><span class="fs13lh1-5"><b>command line tool</b></span> <span class="fs13lh1-5">this can also be integrated into automated processes, so you don't have to do it manually. Find some information about our command line tool in <a href="https://www.shortcut-it.com/blog/index.php?automation" class="imCssLink">this blog article</a>.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">There is another button available after the assignment of password(s) is done: "View details". Hmm, what details?</span></div><div><span class="fs13lh1-5">Let's come back to the above mentioned 2nd use case: </span><span class="imUl fs13lh1-5">There are lots of new users in the system which need an initial password.</span></div><div><span class="fs13lh1-5">If this initial password should be a generated one, this is the use case that is covered in the SAP standard. You can select the users in SU10 and assign a generated passwords for them, and after this is done you will get a list with the password information. This list can be used to inform the users individually about their initial password - after you have determined the email addresses of the users. And this is the catch. </span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/How-to-assign-passwords---04.png"  title="SU10 - list of generated passwords" alt="SU10 - list of generated passwords" width="807" height="351" /><span class="fs13lh1-5"><br></span></div><div>You can do the same with the "Set password" function, and, to come back to the "View details" button", you will be rewarded with a list containing all the necessary user information to shorten the task of informing the users. </div><div><img class="image-5" src="https://www.shortcut-it.com/images/How-to-assign-passwords---05.png"  title="Set password function - Detail list for serial email" alt="Set password function - Detail list for serial email" width="1030" height="472" /><br></div><div>Other than in the SAP standard you will get the information of the email address of the SAP user. You can use the "Export to file" button to get a CSV file that can be used for a serial email. With "Shortcut for SAP systems" also an ABAP program is supplied, that can be used in any SAP system with a configuration for sending emails to inform the users about their initial passwords (subfolder <span class="fs12lh1-5 ff1">ABAPs</span>, file <span class="fs12lh1-5 ff1">PasswordMailer.txt</span>). Just select the CSV file, adjust some parts of the serial email and execute the program - very easy!</div><div><img class="image-2" src="https://www.shortcut-it.com/images/How-to-assign-passwords---06.png"  title="Informing about a new password - a password mailer" alt="Informing about a new password - a password mailer" width="1030" height="474" /><br></div><div><br></div><div>But of course also a serial email with email clients and/or Office software is possible. Here you can find some information how to do this</div><div><ul><li>with MS Office (<a href="https://support.microsoft.com/de-de/office/verwenden-des-seriendrucks-zum-senden-von-massen-e-mails-0f123521-20ce-4aa8-8b62-ac211dedefa4" target="_blank" class="imCssLink">german</a> / <a href="https://support.microsoft.com/de-de/help/318118/how-to-use-the-mail-merge-feature-in-word-to-create-and-to-print-form" target="_blank" class="imCssLink">english 1</a>, <a href="https://www.howto-outlook.com/howto/mailmerge.htm#mail_merge_from_word_with_another_source" target="_blank" class="imCssLink">2</a>)<br></li><li>with LibreOffice (<a href="https://www.otto.de/updated/ratgeber/libreoffice-serienbrief-erstellen-so-funktionierts-65811/" target="_blank" class="imCssLink">german</a>)<br></li><li>with Mozilla Thunderbird (<a href="https://code-bude.net/2016/11/04/serienmails-mit-thunderbird-erstellen/" target="_blank" class="imCssLink">german</a>)</li></ul></div><div><div>Once set up and saved, it is easily reusable. </div></div><div><br></div><div><div>In the end, with the "Set password" feature of our product there are ways to save a lot of time and reduce the probability of errors as well as duration and time pressure. </div></div></div>]]></description>
			<pubDate>Mon, 01 Nov 2021 14:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-2781614_thumb.jpg" length="358079" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?how-to-assign-new-passwords-to-lots-of-users</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000015</guid>
		</item>
		<item>
			<title><![CDATA[What a waste of time...]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000014">Yesterday I saw it again. Indeed, I see it nearly every day or at least every week. <div><br><div><div>In the ticket system a request raised up for an emergency user. The reason was <span class="fs13lh1-5"><b>"... to delete entries in table xyz using SE16."</b></span></div><div>The ticket was raised yesterday at 8:16 and closed today at 7:55. <span class="fs13lh1-5"><b>It took nearly 24 hours to adjust the data, just because there was no maintenance dialog available.</b></span> One can assume that during this time frame some functions did not work, extra effort was necessary, business processes were out of order or in a delay and had a negative impact on customers side etc. etc...</div></div><div><br></div><div><span class="fs13lh1-5"><b>Most cases of these kind of tickets are related to productive systems, but also some were created for test or quality systems.</b></span> I don't know the details about lots of the named tables, but of course the experts know them. But <span class="fs13lh1-5">they did not find a way to correct the data because in the SAP system there is no function available for maintaining the data of this table. Or maybe there is one, but the system and client settings related to changeability pretend them to use it. This could be an omission from SAP or not. If everything is fine, it is not necessary to have a maintenance possibility for every table. But in reality we don't have the situation that everything is fine and all IT systems run well and error free. In that case lots of us would not have a job.</span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-4" src="https://www.shortcut-it.com/images/What-a-waste-of-time---00.png"  title="Urgent data correction - The barriers" alt="Urgent data correction - The barriers" width="575" height="291" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>Avoiding the above mentioned barriers and </b></span><span class="fs13lh1-5"><b>fixing those issues in an SAP system is still the same since 20 years or more.</b></span></div><div><span class="fs13lh1-5">I guess some or most of you know the trick: use SE16 to display the records of the table, jump into the details of a single record, switch on debugging, press Enter and after replacing the value of the variable CODE with 'EDIT' or 'DELE' in the debugger you can maintain resp. delete the record. Or you use transaction SE16N, which offers </span><span class="fs13lh1-5">similar possibilities </span><span class="fs13lh1-5">- dependent from the SAP release (it is not available in every SAP system) and some SAP notes dealing with the deactivation or reactivation of the EDIT function. </span></div><div><span class="fs13lh1-5">With the debug+replace authorization (S_DEVELOP with object type 'DEBUG' and activitiy '02) you can switch SE16 and/or SE16N into the 'EDIT' mode, but of course this authorization is typically given very restrictively. The emergency user should have this authorization, that's why all these tickets come up. If you have some kind of "firefighter" tool in use this is an alternative to the emergency user, however, the procedure and also the overhead is similar or the same. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>Come on... has there really been no progress </b></span><b class="fs13lh1-5"><span class="fs13lh1-5">in the process of data correction </span></b><b class="fs13lh1-5">for decades? Even with test and quality systems, are time-consuming ticket workflows necessary for the team to correct some data? </b></div><div><b class="fs13lh1-5">Doesn't this really bother anyone, this waste of time and resources? </b></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>With "Shortcut for SAP systems" you can eliminate this burning of time and money.</b></span> <span class="imUl fs13lh1-5">You will get an editor for every table in the system, independently from an existence of a maintenance function, the table definition and the system and client settings.</span> <span class="fs13lh1-5">And there is also a solution in case the required data correction overtaxes manual table maintenance due to the amount of data to be corrected.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Let's make a short tour and start with the table editor. You can find this function in the "Table data" section. </span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/What-a-waste-of-time---01.png"  title="Maintain table data in SAP" alt="Maintain table data in SAP" width="770" height="661" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>After specifying the table name you can press the "Edit the data" button to start the table editor. You can enter any table here - no matter whether the table maintenance is allowed in the settings (SE11) or there was no table maintenance dialog generated or the system or client settings regarding changeability would pretend you from editing the data via SE16 or SM30.</div><div><br></div><div>If the table contains lots of records you can select the relevant ones using the "Selection criteria" table and the elements below that table. Just choose a field, specify a value / range / pattern and press the "Add" button to populate the selection criteria table. &nbsp;</div><div><br></div><div>In this case this is not necessary, the table used for this demonstration (USRFLDVAL) contains only few records. As the table maintenance uses the SAPGUI a user with dialog capabilities (type A or S) is necessary in the used connection. </div><div>After pressing the button a session with the SAPGUI is started and a <span class="fs13lh1-5">popup comes up: </span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/What-a-waste-of-time---02.png"  title="Maintain table data in SAP - some hints" alt="Maintain table data in SAP - some hints" width="450" height="154" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>There are 2 possibilities regarding the editor: 1) the SAP standard dialog of transaction SE16N with activated editor mode or 2) an own editor, coming with "Shortcut for SAP systems". </div><div>SE16N is not available in every system, in that case the own editor is to be used. This is the case in BW, SRM, CRM, SCM systems and also in my local SAP demo system. </div><div> </div><div><img class="image-2" src="https://www.shortcut-it.com/images/What-a-waste-of-time---03.png"  title="Shortcut for SAP systems - Table editor" alt="Shortcut for SAP systems - Table editor" width="845" height="651" /><br></div><div><br></div><div><span class="fs13lh1-5">With this editor you can flexibly modify the data. Changing the existing records, adding new records or delete some... possibly within a minute, without any debug/replace tricks. It saves a lot of time in comparison to a workflow for requesting an emergency user, involving all the people that are used for this. Disturbances on your systems, which have their reason in few invalid data, can be solved quickly. And what is stated on our website is still true: there is nothing to be installed into your SAP system for enabling you to use this solution! No transport requests, no AddOn's. <br></span><span class="fs13lh1-5">Using the "Cross-Client" flag, it is even possible to maintain the data in other clients:</span><span class="fs13lh1-5"><br></span></div><div><img class="image-7" src="https://www.shortcut-it.com/images/What-a-waste-of-time---09.png"  title="Shortcut for SAP systems - Table editor, cross-client flag" alt="Shortcut for SAP systems - Table editor, cross-client flag" width="1030" height="567" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><span class="fs13lh1-5">Ok, there might be situations with invalid data in which the maintenance of the data in an editor is not the suitable solution. Think of a necessary update of thousands of records in a table. It can be done with the editor, but there is another function fitting more to the need of updating lots of records. You can find it also in the section "Table data".</span><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/What-a-waste-of-time---04.png"  title="Update table data function" alt="Update table data function" width="681" height="709" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Looks a little bit more technical, doesn't it? With this function you can do updates on specific fields of a table, dependent from some selection criteria, specified in a "where" clause. Think of a situation where a small correction program is necessary to adjust the data - but this function does the job for you and you don't have to write a correction program on the DEV system, put it into a transport request, release it, request the import on QA and PROD system, wait for the import and execute it. <span class="fs13lh1-5">This saves you effort, but what is even more important in many cases: it saves you time - time in which business processes may not work, your ability to deliver is not given, your customers have to wait! </span><span class="fs13lh1-5"> </span><br></div><div><span class="fs13lh1-5"> </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">You can do this using a SAPGUI session (you would get a short information in the SAP system about the amount of updated records) or without - in that case also a system user can be used. Press "Execute" and the update of the data is done within a minute.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">If you have to delete lots of records in a table (or maybe all) you will find a "Delete table data" function, which looks and behaves similar to the update function. </span></div><div><img class="image-5" src="https://www.shortcut-it.com/images/What-a-waste-of-time---06.png"  title="Delete table data function" alt="Delete table data function" width="592" height="577" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><br></span></div><div><div>But of course the needed correction of data could have a little more complexity and the above mentioned functions are overtaxed. In that case the creation of a separate correction program is necessary. Then other dependencies come up: you need the DEV system, a developer with the necessary authorizations and a developer key, the basis team for importing the transport request. </div></div><div>Don't get me wrong, I don't want to state that the usual build and deploy process for programs is nonsense! <b><span class="fs13lh1-5">But in emergency cases it should be possible to react quicker than the regular build and deploy process allows!</span></b><span class="fs13lh1-5"> </span><span class="fs13lh1-5">It is all about keeping or re-establishing the operability of </span><span class="fs13lh1-5">of your company's IT system.</span><span class="fs13lh1-5"> It must be permissible to put the usual formalisms on the back burner and to fix the problem as quickly as possible.</span><br></div><div><br></div><div>With the "Insert / modify program" function "Shortcut for SAP systems" offers an upload function. You don't need a developer for this, no developer key is necessary and also no changeability settings for repository objects in the system / client have to be adjusted. Just put the source code into a file on your computer and upload it. If you want, you can also execute it immediately after the upload. </div><div><img class="image-8" src="https://www.shortcut-it.com/images/What-a-waste-of-time---07.png"  title="Insert / modify program function" alt="Insert / modify program function" width="760" height="541" /><br></div><div><br></div><div><div>To recall the picture shown at the beginning: with "Shortcut for SAP systems" you eliminate the usual barriers that prevent you from quickly correcting data.</div></div><div><img class="image-9" src="https://www.shortcut-it.com/images/What-a-waste-of-time---08.png"  title="Urgent data correction - jump the wall with our solution" alt="Urgent data correction - jump the wall with our solution" width="736" height="314" /><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Once again: </span><span class="fs13lh1-5">it is not about demonizing the usual processes and questioning their suitability.</span><span class="fs13lh1-5"> But if your company comes under considerable pressure or is at risk due to a malfunction of your SAP system, you should be able to react and solve the problem quickly. </span><span class="fs13lh1-5">The satisfaction of your customers and thus the success of your company depends on this. The availability of your processes should be given top priority - </span><span class="fs13lh1-5">clear before following rigid process descriptions. And with "Shortcut for SAP systems" you will get the possibilities.</span><br></div></div></div>]]></description>
			<pubDate>Mon, 16 Nov 2020 12:53:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-4647545_thumb.jpg" length="220754" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?what-a-waste-of-time</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000014</guid>
		</item>
		<item>
			<title><![CDATA[A short story of a tormented SAP system]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000013"><div>It is quite normal that a complex IT system like an SAP ERP is occasionally subject to disruptions. But does so much time really always have to pass before the system and its users are freed from the pain? </div><div><br></div><div><span class="fs13lh1-5"><b>This is an appeal to remember the real goal. </b></span></div><div><br></div><div>Recently I was able to observe it again: a small error in a transport order with a big impact. It happened like this: at the customer's site, there is a control table for calling function modules developed in-house in user exits. In this table the function modules are maintained as well as an "active" flag. Before the function module is called, it is checked whether the exit is active. If so, the function module is called. </div><div><br></div><div>Now it appears that the change in the control table has surpassed the development of the corresponding function module, and the transport request with the "active" flag arrived in the production system before the function module. It happened as it had to: within a very short time, important transactions in the logistics area terminated with runtime error CALL_FUNCTION_NOT_FOUND. Not only about 800 dialog users, but also several interfaces were affected. The system was busy writing short dumps, and new error messages about this error were piling up in the ticket system. </div><div><br></div><div>Within a relatively short time, the cause was clear - the above-mentioned new record in the control table. The malfunction in the production system would now have been very easy to be fixed: just delete the record or remove the "active" flag, and the failures would not have occurred anymore. Well, easier said than done. The control table could not be managed in the system, but is delivered to the production system exclusively via transport requests. So the detour via the development system had to be taken, where the "active" flag was removed and this change was written to a new transport request. The transport request must be accompanied by documentation, and then an "emergency transport" process must be performed to import this transport request into the production system. A standardized e-mail is then sent to the trip for approval. From the beginning of the error, it took 1:45 hours to fix this error in the production system. During this time, the system suffered from almost 10,000 transaction failures, each with a short dump. And for the same period of time the ticket system received more and more fault reports, all related to this error. </div><div><br></div><div>In my opinion, the reason of this waste of time is that the repair of the malfunction in the production system had to take an unnecessary detour via the development system. If the "active" flag had been removed directly in the production system as soon as the cause was identified, the duration of the malfunction would have been reduced to about 20 minutes. Of course I don't mean that <span class="imUl">every</span> malfunction should be fixed directly in the production system. But in this case, where the cause was clear and the elimination of the malfunction (the removal of the "active" flag) did not even have to be checked in a quality or test system, an unnecessary amount of time was lost, during which the system, its users, the interfaces, and ultimately the company and its business processes suffered. It was painful to have to look at this in the light of the fact that immediate troubleshooting would have been actually quite easy. With our product "Shortcut for SAP systems", the "active" flag or the whole record could have been removed within 1 minute. </div><div><br></div><div>By the way, the customer values 1 hour <span class="imUl">downtime</span> of the system at over 200.000€. If we assume that the malfunction could have been fixed within 20 minutes, the delayed troubleshooting after 1:45 hours caused additional costs of about 280.000€. Ok, the system was not really "down", <span class="fs13lh1-5">but working with the system was only possible in a very limited range (and not at all in the concerned logistics transactions)</span><span class="fs13lh1-5">. </span><span class="fs13lh1-5">So, there still remains a considerable financial loss. </span><span class="fs13lh1-5"> </span><br></div><div><br></div><div><span class="fs13lh1-5"><b>Hence my appeal to the many brave employees in IT support and especially to the superiors responsible for IT support:</b></span> </div><div><span class="fs13lh1-5"><b><br></b></span></div><div class="imTACenter"><b class="fs14lh1-5">The highest goal must be to get the productive system running smoothly again as soon as possible.</b> </div><div><br></div><div>Adjustments on the development system can be carried out in peace after the malfunction in the production system has been eliminated - that is only secondary. Equally secondary are process descriptions, documentation, approvals etc. &nbsp;This can also be done after the fault has been resolved. </div><div><br></div><div><span class="imUl">So, here are my thoughts and my recommendation:</span></div><div><br></div><div><ul><li><span class="fs13lh1-5"><b>Do not rigidly adhere to processes and approval paths that might delay fast and efficient troubleshooting.</b></span><span class="fs13lh1-5"> Don't blindly trust the voices of auditing companies telling you that every change must be documented, approved and tested </span><span class="imUl fs13lh1-5">before</span><span class="fs13lh1-5"> it reaches the productive system. Also, be careful when security experts try to convince you of a "minimum principle" of authorizations </span><span class="imUl fs13lh1-5">for each and every user</span><span class="fs13lh1-5"> working in the system - it is likely that at least for the people that have to fix a problem the limited authorizations won't be sufficient in an emergency case.<br></span><b><br>Both, auditors and security experts are not your customers! </b><span class="fs13lh1-5"><b>Your customers are those who can expect you to deliver the goods on time.</b> These customers should be the focus of the troubleshooting - not the consultants whose customer you yourself are.</span><br><br><div><b><div class="fs13lh1-5">Process descriptions describe the normal, everyday situation. In an emergency situation acting purposefully and rationally should be allowed to beat any process description! Do not allow rigid process descriptions to paralyze you resp. your company and leave no opportunity for appropriate, reasonable action.</div></b></div></li></ul></div><div><br></div><div><ul><li><span class="fs13lh1-5"><b>Set up a team to troubleshoot your production systems and provide them with the necessary authorizations, tools <span class="imUl">and, most importantly, the necessary confidence</span></b></span><span class="fs13lh1-5"><span class="imUl">.</span> <br></span><b> <br>This can be a really small team.</b><span class="fs13lh1-5"> And these people don't have to be module experts, but employees who have a good knowledge of the SAP environment and who can act as an extended arm of the module experts in the systems if necessary. </span><span class="fs13lh1-5"><b>Think of this team as part or as an extension of your regular support team</b></span><span class="fs13lh1-5"><b>.</b></span><span class="fs13lh1-5"> <br></span><br>It is not even necessary to recruit new staff. <span class="fs13lh1-5">The members of this team may well have other full-time tasks, it is not necessary to reserve the working time of the members of this team exclusively for possible emergencies. But if your system - and therefore your company! - gets into a precarious situation, it is important that at least one member of this team is available and can act without first having to overcome bureaucratic or formalistic hurdles. </span><br><br><span class="fs13lh1-5">There are some software solutions on the market for dealing with emergency users for situations like these, for example "SAP Access Control" (as part of the "GRC"), or "ISPICIO Emergency Access Management für SAP". I do not know them in detail, but you should <span class="fs13lh1-5"><b>r</b></span></span><span class="fs13lh1-5"><b>efrain from approval steps for the above mentioned nominated team members</b></span><span class="fs13lh1-5">! If, for compliance and security reasons, you create a process that includes approval steps before your team can save your company, you could end up losing valuable time again! </span><br><br><b class="fs13lh1-5">Give these employees the confidence they need - don't let them, their commitment and motivation fail and despair because of missing authorizations and missing tools.</b></li></ul></div><div class="imTACenter"><span class="fs14lh1-5"><br></span></div><div class="imTACenter"><b class="fs14lh1-5">It pays off - by the satisfaction of your customers with your company's reliability.</b></div></div>]]></description>
			<pubDate>Thu, 09 Jul 2020 11:26:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Tormented-system---01_thumb.png" length="165599" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?a-short-story-of-a-tormented-sap-system</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000013</guid>
		</item>
		<item>
			<title><![CDATA[Saving system specific tables using R3trans]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000007">Here is a short description how to back up system specific tables with Sc4SAP (and how to restore them in case you need it). <div><br></div><div>We take the RFC connections for this example. In case they get lost you are in big trouble. Outgoing data can not be sent any longer, functions using RFC connections are not working any longer. Maybe in a very short time your system produces thousands of short dumps. </div><div><br></div><div><span class="fs13lh1-5">You don't have the possibility to get back this data from another system as every system has its own individual RFC connections. There is no way to import the data via transport request or similar. Without having a backup of the specific tables the only chance would be to set up a new system via system copy using a full backup of the concerned system. A huge effort, and very time consuming - time during which your SAP system is not working properly!</span><br></div><div><span class="fs13lh1-5">BTW, indeed we noticed complaints that during an SAP Upgrade the RFC connections got lost :-( &nbsp;Thus, in front of an SAP upgrade saving the RFC connections might be a good idea. &nbsp;</span><br></div><div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">The procedure described here might also be a solution when you have to do a</span><span class="fs13lh1-5"> </span><span class="imUl fs13lh1-5">system copy / refresh</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">(e.g. from a productive system to a quality or test system to get recent data on them) and there is no "PCA tool" (see below). Just export the RFC connections of the quality or test system in front of the system copy and restore them afterwards. </span></div><div><span class="fs13lh1-5"><br></span></div><div><hr></div><div data-line-height="1.15" class="lh1-15"><div data-line-height="1.15" class="lh1-15"><span class="cb1"><i><span class="fs13lh1-15">Edit: Meanwhile, using our command line tool and an ABAP program supplied with our product, saving system specific data becomes very easy and can be implemented within minutes. Have a look into another blog article: <a href="https://www.shortcut-it.com/blog/index.php?saving-system-specific-tables-part-2" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Blog &quot;article Saving system specific tables - part 2&quot;', width: 180});" class="imCssLink">"</a></span></i><span class="fs13lh1-15"><i><a href="https://www.shortcut-it.com/blog/index.php?saving-system-specific-tables-part-2" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Blog &quot;article Saving system specific tables - part 2&quot;', width: 180});" class="imCssLink">Saving system specific tables - part 2"</a></i></span><span class="fs13lh1-15">.</span></span></div></div><div data-line-height="1.15" class="lh1-15"><span class="cb1"><i><span class="fs13lh1-15">And it can also be used for doing the </span><span class="fs13lh1-15"><b>pre- and post-processing in the context of a system refresh</b></span><span class="fs13lh1-15">: Have a look into <a href="https://www.shortcut-it.com/blog/index.php?pre-and-post-work-of-an-sap-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Pre--and-post-work-of-an-SAP-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Pre- and post work of an SAP System refresh&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this</a> and <a href="https://www.shortcut-it.com/blog/index.php?speed-up-the-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Speed-up-the-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Speed up the system refresh&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">this</a> blog article.</span></i></span></div><div data-line-height="1.15" class="lh1-15"><hr></div><div data-line-height="1.15" class="lh1-15"><br></div></div><div>Ok, let's start: <br><br></div><div><span class="fs13lh1-5">1.: Determine the tables that are relevant. In general it is not really easy to get the knowledge about the related tables of a specific area, but here - for system specific tables - we have some help from the "PCA tool" (<span class="imUl">P</span>ost <span class="imUl">C</span>opy <span class="imUl">A</span>utomation). Have a look into the function module SCTC_GET_WHITELIST. This function module gives information about the components managed by the PCA tool and their related tables, all listed in the source code of the function module.</span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---01.png"  title="Function module SCTS_GET_WHITELIST" alt="Function module SCTS_GET_WHITELIST" width="500" height="626" /></div><div><span class="fs13lh1-5"><br></span></div><blockquote><div><span class="fs13lh1-5 cf1"><i>BTW, you might get more ideas related to system copies and saving of system specific tables by viewing the components and their related tables in this function module. Beside RFC connection data there are also other suitable tables that are worth saving, especially with regard to the preparation and post-processing of a system copy: </i></span><i class="fs13lh1-5 cf1">ALE configuration, the SAP license, ECATT, logical files / paths, TMS configuration, variants, web services etc. etc. etc... </i><br><span class="fs13lh1-5 cf1"><i><span class="imUl">You can also execute program SCTC_LIST_TABLES to show tables of a component.</span> However, due to license issues (the use of the PCA tool requires some prerequesites) the program might deny your request. In that case you can try <a href="https://www.shortcut-it.com/download/Z_SHOW_PCA_TABLES.zip" onmouseover="x5engine.imTip.Show(this, { text: 'Program Z_SHOW_PCA_TABLES - get system-specific tables from the PCA tool', width: 180});" class="imCssLink">this</a> program instead, showing all components managed by the PCA tool and their related tables in one big list. It is also supplied with our product, you can find it in the folder 'ABAPs' in file ''ShowPCATables.txt'. </i></span><i class="fs13lh1-5 cf1">And <a href="https://www.shortcut-it.com/download/PCA tables NW AS ABAP 752.xlsx" target="_blank" class="imCssLink">here</a> is the output of the program taken from my local SAP system (NW AS ABAP 7.52).</i></div><div><span class="fs13lh1-5 cf1"><i><br></i></span></div></blockquote><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">2.: Us</span><span class="fs13lh1-5">e the </span><b class="fs13lh1-5">"Process table data using R3trans"</b><span class="fs13lh1-5"> function to create a data file with all contents of all tables related to RFC connections. Some of the given tables are client-dependent (other than most of the RFC tables), therefore you have to specify a client. Sc4SAP allows us to specify '</span><span class="fs13lh1-5 ff1">*</span><span class="fs13lh1-5">' in the client field, which means <i>all</i></span><span class="fs13lh1-5"> clients. Of course you can also specify a specific client. Regarding the RFC tables saving the data for all clients is to be recommended (see <span class="cf2">footnote #1</span>).</span><br><span class="fs13lh1-5">Depending on the release of your SAP systems maybe not all of them exist in your system. Sc4SAP checks this and indicates missing tables. Just leave them out. </span></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---02.png"  title="Process table data using R3trans - RFC tables" alt="Process table data using R3trans - RFC tables" width="600" height="607" /><br></div><div><br><span class="fs13lh1-5">As our purpose in this example is to create a backup of table contents we place the backup file on the application server. Of course you can also use the frontend for storing the data. In that case you have to use an SAP connection using a user with dialog capabilities because of the download of the data file to your computer. In this example storing the data on the application server seems to be a good idea, and DIR_HOME seems to be a suitable directory, but you can use any directory that is accessible by the server. If the user used in the connection is a system user, you have to remove the flag in the "With SAPGUI" field. </span><br class="fs13lh1-5"><span class="fs13lh1-5">Now let's start the export. As there is (usually) a small amount of data in the RFC tables it takes a few seconds only and the Messages / log area indicates finishing the task:</span></div><div><img class="image-10" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---03.png"  title="" alt="" width="451" height="79" /></div><div><br class="fs13lh1-5"><span class="fs13lh1-5">3.: Looking into the log file should definitely be done, especially when you do this a first time. If we would have used the Frontend as the location of the data file, this could be done by a mouse click only, but in this case we used the server. So we use transaction AL11 for viewing the log file. Selecting DIR_HOME we can see the 2 files created: </span></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---04.png"  title="AL11 - Export file and log" alt="AL11 - Export file and log" width="600" height="162" /><br></div><div><br><span class="fs13lh1-5">The log file contains the information about the written data:</span></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---05.png"  title="AL11 - log file content" alt="AL11 - log file content" width="600" height="709" /><br></div><div><br class="fs13lh1-5">That's all for the moment. It took only some minutes to create a backup file of the RFC connections - and hopefully we don't need it, but in case the RFC connections would get lost (shit happens!) we can use this backup file to create them again. When there is a change regarding the RFC connections of course also the backup file should be refreshed. Which takes me to another nice thing: <span class="fs13lh1-5"><b>the command line tool, that comes with "Shortcut for SAP systems"</b></span>. You can find some information in <a href="https://www.shortcut-it.com/blog/index.php?automation" class="imCssLink">this blog article</a>. Using it makes it possible to schedule a <span class="fs13lh1-5"><b>periodic backup of system specific data </b></span>- so you don't have to do it manually and it also works at weekends and if you are on holiday. You can put a one-liner for every system in a command file on OS level and execute it in the shell or use it in an automation software (<span class="fs13lh1-5">this can be a lean solution like the Windows Task Scheduler or a full-blown automation solution like UC4</span><span class="fs13lh1-5">©)</span><span class="fs13lh1-5">.</span><br></div><div><img class="image-7" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---10.png"  title="Shortcut for SAP systems - command line tool" alt="Shortcut for SAP systems - command line tool" width="840" height="288" /><span class="fs13lh1-5"><br></span></div><div><i class="fs11lh1-5">Use the command line tool to schedule a daily backup of system specific tables!</i></div><div><br></div><div>Let's assume we get into the trouble of lost RFC connection data and want to restore the RFC connections. Or we made the backup in advance of a system copy and want to get back the original data in our refreshed system. </div><div><br></div><div><span class="fs13lh1-5">Use the</span><span class="fs13lh1-5"> </span><b class="fs13lh1-5"><span class="fs13lh1-5">"Process table data using R3trans"</span></b><span class="fs13lh1-5"> </span><span class="fs13lh1-5">again for restoring the data. In case the current RFC data in your system is corrupt you should use the "Remove / Clientremove" option </span><span class="fs13lh1-5">first</span><span class="fs13lh1-5">. Specify the tables to be deleted and it will be done. You don't have to use all tables that were written into the data file. In case you have to restore only few or a single table you can specify them / it in the text field and data of other tables will not be processed.</span></div><div><span class="fs13lh1-5">In our example we don't know if only one or few tables are concerned, therefore we take all RFC tables and import the data back into the system: </span></div><div><img class="image-6" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---06.png"  title="Process table data using R3trans - Importing RFC tables" alt="Process table data using R3trans - Importing RFC tables" width="600" height="607" /><span class="fs13lh1-5"><br><br></span></div><div><span class="fs13lh1-5">In DIR_HOME we now see also the log file for the import: </span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---07.png"  title="AL11 - Import file and log" alt="AL11 - Import file and log" width="600" height="166" /><span class="fs13lh1-5"><br><br></span><img class="image-9" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---08.png"  title="" alt="" width="600" height="455" /><span class="fs13lh1-5"><br><br></span></div><div></div><div></div><div><span class="fs13lh1-5">The data is imported, the RFC connections are restored and work properly. The operability of our system is given again, and it took only few minutes!</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">If you are interested in </span><span class="fs13lh1-5"><b>covering more system specific tables</b></span><span class="fs13lh1-5"> and / or how to </span><b class="fs13lh1-5">execute a backup automatically and periodically</b><span class="fs13lh1-5">, you can find more information in this article: </span><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?saving-system-specific-tables-part-2" class="imCssLink">Saving system specific tables - part 2</a></span><span class="fs13lh1-5">.</span></div><div><span class="fs13lh1-5"><br></span></div><div><hr></div><div><span class="fs13lh1-5"><span class="imUl"><br></span></span></div><div><span class="fs13lh1-5"><span class="imUl cf2">Footnote #1:</span> </span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">There is one special table here: RSECTAB ("Secure Storage: Memory for Encrypted Data"). There is a special issue regarding the "Secure storage": its data is stored using a special value '___' for the client</span><span class="fs13lh1-5">. </span></div><div><span class="fs13lh1-5">In the R3trans log file shown above we can see 12 entries of that table exported and also imported </span><span class="fs13lh1-5">lateron</span><span class="fs13lh1-5">. It is not possible to view the entries using SE16 or similar tools (SE16 shows a message "You can not display RSECTAB with the standard tools"). But with transaction SECSTORE you can see the records: </span></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Saving-system-specific-tables-using-R3trans---09.png"  title="SAP Secure Storage - table RSECTAB, transaction SECSTORE" alt="SAP Secure Storage - table RSECTAB, transaction SECSTORE" width="600" height="222" /><br></div><div><br></div><div>These are the 12 entries mentioned in the R3trans log files, and you can see that nearly all of these entries have this strange value '___' in the client field. They contain passwords (in an encrypted form) for users used in RFC connections as well as in some other areas (e.g. for the database connection - at the left side in transaction SECSTORE you see some applications using the secure storage), and the intention for using this value is to achieve more security regarding sensitive password information in an "invisible" client. Well, for the regular users SAP did it not like this and stored the <span class="fs13lh1-5"><i>hashed</i></span> values for the passwords beside all other client related data in the same client. I guess the reason for implementing the "Secure storage" with this "invisible" client is that the passwords are <span class="fs13lh1-5"><i>encrypted</i></span> instead of <span class="fs13lh1-5"><i>hashed</i></span> like the usual passwords, and of course the SAP system needs to <span class="fs13lh1-5"><i>decrypt</i></span> the value back to the password for using the credentials in the RFC connection. <span class="fs13lh1-5">This offers a wider attack surface for hackers than a </span><span class="fs13lh1-5"><i>hashed</i></span><span class="fs13lh1-5"> value (which offers no approach to get back to the original value except time consuming brute-force attacks), and this probably explains this additional hurdle. </span></div><div><span class="fs13lh1-5">BTW, </span><span class="fs13lh1-5">if you are interested in SAP's password security, <a href="https://www.shortcut-it.com/blog/?about-security-and-passwords" target="_blank" class="imCssLink">this blog article</a> might also be worthwhile for you. </span><span class="fs13lh1-5"> </span><br></div><div><br></div><div>But this is really an extraordinary and special case - you don't have to expect similar stumbling blocks with other tables than those related to the "Secure storage". But for the RFC connections this table likely has to be considered, and that is the reason why we specified client '<span class="fs13lh1-5 ff1">*</span>' when we exported the RFC data. Otherwise we would not catch the entries with client '___' and there would be no possibility to restore also the passwords of the users in the RFC connections in case these entries would get lost. <a href="https://launchpad.support.sap.com/#/notes/1532825" target="_blank" class="imCssLink">SAP note 1532825</a> describes some trouble with the Secure storage after a system refresh and offers some workarounds - <span class="fs13lh1-5">but it seems to me that the better solution would be to avoid the hassle and effort of repairing invalid data by making a backup of that data and restoring it after the system copy...</span></div></div>]]></description>
			<pubDate>Thu, 19 Mar 2020 16:00:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Saving-system-specific-tables-using-R3trans_thumb.png" length="266142" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?saving-system-specific-tables-using-r3trans</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000007</guid>
		</item>
		<item>
			<title><![CDATA[Oh no.. missing authorizations]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_000000010">This article deals with a usually unpopular topic: authorizations. <div><div><br></div><div>A lack of authorization is usually an unbridgeable hurdle, so that it is not possible to make any progress with the completion of our task. Maybe a colleague has the missing authorization and can help out, but it usually boils down to the fact that you have to apply for the missing authorization somehow - after identifying a suitable role - and then (hopefully) get it after a while.</div></div><div><br></div><div>This might be ok if there is some time to complete our task. If it can be done also next day or week, ok, let's wait for the approval. <div class="fs13lh1-5">But it may also be necessary to obtain the missing authorization as soon as possible, for example<br><ul><li>during a go-live: usually very tightly planned, usually carried out on a weekend and with no reserves in the schedule. The approvers may not be available at the weekend. The entire schedule and with it the timely availability of the system is at risk!<span class="fs13lh1-5"> </span><br></li><li><span class="fs13lh1-5">in normal productive operation. For example, an imported transport request may cause a further authorization check to be processed. A missing authorization for a system user immediately brings an interface to a standstill. The system may be flooded with thousands of short dumps. In such a situation, there is usually no time for time-consuming authorization requests or role changes in the development system and subsequent transport into the quality and production system. Hey, your business is at harm! </span><br></li></ul></div></div><div><br></div><div>"Shortcut for SAP systems" (Sc4SAP) offers s<span class="fs12lh1-5">o</span>me possibilities to help you.</div><div><br></div><div><b class="fs12lh1-5 cf1">1.: Assign a role and/or a profile</b></div><div><span class="fs13lh1-5">This could be suitable approach in case you know which role or profile is missing. Simply assign the role or profile to the user and the authorization is given.</span></div><div><img class="image-0" src="https://www.shortcut-it.com/images/Missing-authorizations---01.png"  title="Add/remove a role and/or profile" alt="Add/remove a role and/or profile" width="570" height="603" /><span class="fs13lh1-5"> </span><br></div><div><div><span class="fs13lh1-5">This function needs a user with the appropriate authorizations for role assignment (S_USER_AGR, S_USER_GRP etc.). The impact and the routines behind are the same as used in transactions SU01 or PFCG, including change documents for the assignment. However, an authorization allocator is not needed on-site, because in Sc4SaP you can also use a system user. Thus, this is an appropriate method to assign missing authorizations in case there is no authorization allocator and/or there is no way or time to follow the regular approval process for authorizations (e.g. a go-live at the weekend). </span></div></div><div><span class="fs12lh1-5"><br></span></div><div><b class="fs12lh1-5 cf1">2.: Assign a "hidden" authorization</b></div><div><div><span class="fs13lh1-5">This could be suitable approach in case there is no role or profile available for the needed authorization or the role or profile is too extensive or would cause an overflow (see <a href="https://launchpad.support.sap.com/#/notes/410993" target="_blank" class="imCssLink">SAP note 410993</a>). Because this function can be used for addressing other clients it might also be a solution in case you don't have access to a user in the targeted client with the necessary authorizations for the 1st function (see paragraph above). </span></div></div><div><img class="image-3" src="https://www.shortcut-it.com/images/Missing-authorizations---02.png"  title="Add/remove hidden authorizations" alt="Add/remove hidden authorizations" width="541" height="572" /><span class="fs13lh1-5"><br></span></div><div><div><span class="fs13lh1-5">There are 3 options to assign the missing authorization:</span></div><div><span class="fs13lh1-5">1.: you can assign a full authorization for a given authorization object.</span></div><div><span class="fs13lh1-5">2.: you can assign the authorizations of a role. </span></div><div><span class="fs13lh1-5">3.: you can assign the authorizations of a profile.</span></div><div><span class="fs13lh1-5">For the user used in the connection it is not necessary to have the authorizations for role / profile assignment. The method behind it is completely different from the regular role / profile assignment. In case your SAP system uses more than 1 application server there could be a latency for the given authorization to be effective (usually up to 2 minutes, depending on the value of profile parameter </span><span class="fs13lh1-5 ff1">rdisp/bufreftime</span><span class="fs13lh1-5">). </span></div></div><div><span class="fs13lh1-5">This method has some peculiarities that you should be aware of:</span><br></div><div><ol><li>There will be<span class="fs12lh1-5"> <b>no change documents</b> </span>for the assignment. <span class="fs13lh1-5"></span><span class="fs13lh1-5">So if you want everything to be correct, you should document it accordingly and have it approved (retrospectively) if necessary. Hint: all actions in Sc4SAP are logged in the "logs" directory, so you can catch up this afterwards when there is time to do so.</span><br></li><li><span class="fs13lh1-5">The </span><span class="fs12lh1-5"><b>user will not be listed in the SUIM reports</b></span><span class="fs13lh1-5"> when you search for users with the assigned authorization!</span></li><li><span class="fs13lh1-5">The authorizations assigned this way will </span><span class="fs12lh1-5"><b>disappear at the next time the user buffer for the user will be refreshed</b></span><span class="fs13lh1-5">. This could be caused for example by a "normal" role assignment for the user, a user comparison run or the first login of the user, and there might be some more possible reasons. &nbsp;</span></li></ol></div><div><span class="fs13lh1-5"><br></span></div><div><div><b><span class="fs12lh1-5 cf1">3.: Assign a reference user</span></b></div></div><div><span class="fs13lh1-5">This is an appropriate method to fix authorization problems in the system without spending time to find the concrete missing authorizations. Of course also an assignment of profile SAP_ALL would be a possibility, but maybe there are some reasons for avoiding this (for example, a strict ban on the assignment of SAP_ALL, impending costly compliance tasks, etc.). In that case using a "reference user" might be a solution. In a nutshell: if there is a user </span><span class="fs13lh1-5"><i>A</i></span><span class="fs13lh1-5"> and for this user a user </span><span class="fs13lh1-5"><i>B</i></span><span class="fs13lh1-5"> is maintained as a reference user this will have the impact, that user </span><span class="fs13lh1-5"><i>A</i></span><span class="fs13lh1-5"> has all authorizations from user </span><span class="fs13lh1-5"><i>B</i></span><span class="fs13lh1-5"> <span class="imUl">additionally</span>. </span></div><div><span class="fs13lh1-5">A reference user can be maintained in transaction SU01, but there could be some hurdles to avoid or restrict this possibility (for example, SAP notes <a href="https://launchpad.support.sap.com/#/notes/330067" target="_blank" class="imCssLink">330067</a>, <a href="https://launchpad.support.sap.com/#/notes/513694" target="_blank" class="imCssLink">513694</a>). These hurdles focus on maintenance of the reference user in SU01 and SU10. But e</span><span class="fs13lh1-5">ven if it is not possible to assign a reference user via SU01 and SU10, it still works in Sc4SAP via the "Update table data" function as well as via maintaining the table using the "Maintain (edit) table data" function.</span></div><div><img class="image-2" src="https://www.shortcut-it.com/images/Missing-authorizations---03.png"  title="Update table data" alt="Update table data" width="900" height="566" /><span class="fs13lh1-5"><br></span></div><div>For getting the authorizations of the reference user being effective the user has to log into the system again. At login the system considers the given reference user for all upcoming authorization checks during the session. </div><div><br></div><div><span class="fs13lh1-5">Finally, I would like to mention that these possibilities (especially the 2nd and 3rd) should be used with caution. And: please do not forget to tidy up again. Only temporarily needed permissions should be revoked when they are no longer needed, and permanently needed permissions should be assigned in a regular way. </span></div><div><span class="fs13lh1-5">But in the end it is much more important that your go-live is back on track resp. your production system is running smoothly again, isn't it?</span></div></div>]]></description>
			<pubDate>Thu, 16 Jan 2020 14:10:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/pixabay-3964425_thumb.jpg" length="90777" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?missing-authorizations</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/000000010</guid>
		</item>
		<item>
			<title><![CDATA[First contact]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000000E">This article is intended as an introduction about the use of "Shortcut for SAP systems" and how to do the first steps. <div><br></div><div>Sc4SAP can be <a href="https://www.shortcut-it.com/download.html" target="_blank" class="imCssLink">downloaded</a> from our web page, it comes in a zip file. No installation is necessary, just copy the contents of the zip file in a suitable directory. I suggest to put it not in the same folders in which the applications normally are installed in because we need write access to some subdirectories, and that might be a problem using the typical folders like <span class="fs12lh1-5 ff1">C:\Program Files (x86)</span><span class="fs13lh1-5"> or </span><span class="fs12lh1-5 ff1">C:\Program Files</span><span class="fs13lh1-5">. </span></div><div><span class="fs13lh1-5">It works fine even in a folder </span><span class="fs12lh1-5 ff1">C:\Sc4SAP</span><span class="fs13lh1-5">, which I used for this article. </span></div><div><img class="image-13" src="https://www.shortcut-it.com/images/First-contact---01.png"  title="Sc4SAP directory with subdirs and files" alt="Sc4SAP directory with subdirs and files" width="325" height="389" /><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Ok, so what we have got here? Maybe a look into the File "</span><span class="fs13lh1-5"><b>System requirements..."</b></span><span class="fs13lh1-5"> might be a good idea... </span></div><div><span class="fs13lh1-5">... </span><span class="fs13lh1-5"><b>Java Runtime Environment</b></span><span class="fs13lh1-5">. Ok, got it on my computer. </span></div><div><span class="fs13lh1-5">... </span><span class="fs13lh1-5"><b>SAP Java Connector (JCO)</b></span><span class="fs13lh1-5">. Hmm, this is usually not installed on a standard computer.</span></div><div><span class="fs13lh1-5">... an </span><span class="fs13lh1-5"><b>accessible </b></span><span class="fs13lh1-5"><b>SAP system</b></span><span class="fs13lh1-5">. Of course, that's why I have downloaded the program. </span></div><div><span class="fs13lh1-5">... an </span><span class="fs13lh1-5"><b>SAP GUI</b></span><span class="fs13lh1-5">. Indispensable for my work, of course also available on my computer. </span></div><div><span class="fs13lh1-5">... ah, no transport requests, AddOn's or similar to be installed in the SAP system(s). That's nice!</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">There is a hint to use the check program "Sc4SAPStarter.exe", so let's try it. </span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/First-contact---02.png"  title="Sc4SAPStarter for checking the prerequisites" alt="Sc4SAPStarter for checking the prerequisites" width="620" height="558" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>That's what was expectable from reading the system requirements, the SAP Java Connector files are missing. SAP customers and partners can download it <a href="https://support.sap.com/en/product/connectors/jco.html" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: 'Download SAP Java Connector', width: 180});" class="imCssLink">here</a>. But maybe the files are already somewhere on my computer or an accessible network drive, thus, press the button "Search for it...".</div><div>I'm a lucky guy, the file was found. With the "Copy file" button it can be copied into the Sc4SAP subdirectory.</div><div><br></div><div><img class="image-2" src="https://www.shortcut-it.com/images/First-contact---03.png"  title="Sc4SAPStarter - search and copy SAPJCO file" alt="Sc4SAPStarter - search and copy SAPJCO file" width="692" height="331" /> </div><div><br></div><div>After closing the dialog the check procedure starts again. We are one step further now, but there is still something missing. Another missing JCO file:</div><div><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/First-contact---04.png"  title="SAP Java Connector - System info" alt="SAP Java Connector - System info" width="900" height="554" /><br></div><div><br></div><div>Ok, once again I press the "Search for it..." button. The missing file was found in the same directory as the one before, and I also copied it. Now the check program does not complain any longer and after a short time the "Shortcut for SAP systems" application is started.</div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/First-contact---05.png"  title="Sc4SAPStarter - all prerequisites fulfilled" alt="Sc4SAPStarter - all prerequisites fulfilled" width="900" height="489" /><br></div><div><br></div><div>First greeting with a popup window about connections:</div><div><br></div><div><img class="image-21" src="https://www.shortcut-it.com/images/First-contact---07.png"  title="Shortcut for SAP systems - main window" alt="Shortcut for SAP systems - main window" width="739" height="604" /><br></div><div><br></div><div>Connections... aren't there still enough in my SAPLogon? </div><div>There are, but the use of connections to SAP systems in "Shortcut for SAP systems" includes the <span class="fs13lh1-5"><b>specification of a user</b></span> - different from the SAPLogon. Thus, let's do what is required. After pressing OK a click on "Settings and configuration" a maintenance function for the connections can be used. So I entered data to a local SAP system that I have installed on my computer, just to try it out and see around what's there. </div><div><br></div><div><img class="image-5" src="https://www.shortcut-it.com/images/First-contact---08.png"  title="Shortcut for SAP systems - Maintain connections" alt="Shortcut for SAP systems - Maintain connections" width="650" height="511" /> &nbsp;</div><div><br></div><div>After pressing the "Add" button the data will be moved to the (up to now empty) list of the maintained connections. </div><div>By pressing the "Test" button I verify whether the data is correct. As there is sensible data in it the function can be protected with a password. If your computer can be accessed by other people, I recommend to do this.</div><blockquote><div><span class="fs13lh1-5"><i>Tip: you can have multiple connections to a single SAP system / client, for example one with a system user (which often have wide authorizations) and your own (dialog) user. Some functions need dialog capabilities. Having connections with both a dialog user and a system user will offer much possibilities! &nbsp;</i></span></div></blockquote><div><br></div><div><img class="image-6" src="https://www.shortcut-it.com/images/First-contact---09.png"  title="Shortcut for SAP systems - Maintain connections, Test function" alt="Shortcut for SAP systems - Maintain connections, Test function" width="650" height="511" /><br></div><div><br></div><div>I saved the connection data and closed the window. Back in the main window I see that all the functions, which were previously disabled because there was no connection maintained, are available now. By moving the mouse cursor to a button I get some information about the function in the right part of the window. </div><div><br></div><div>Let's try some functions, starting with the first one "Get a list of users". This does not sound spectacular and offers no information that I can not get by using the functions directly in the SAP system, nevertheless I get an impression how the program works in general. In the window I can see the users in my local SAP system and some messages at the bottom.</div><div><br></div><div><img class="image-7" src="https://www.shortcut-it.com/images/First-contact---10.png"  title="Shortcut for SAP systems - Get a list of users" alt="Shortcut for SAP systems - Get a list of users" width="650" height="496" /><br></div><div><br></div><div>Let's try another function, maybe viewing some data of the system. After chosing the function "View table data" and entering a table the application get in contact with the SAP connection and verifys whether the table exists. The button right from the table name offers some information. </div><div><br></div><div><img class="image-8" src="https://www.shortcut-it.com/images/First-contact---11.png"  title="Shortcut for SAP systems - View table data" alt="Shortcut for SAP systems - View table data" width="800" height="513" /><br></div><div><br></div><div>Reading the data works for the given table: </div><div><br></div><div><img class="image-10" src="https://www.shortcut-it.com/images/First-contact---12.png"  title="Shortcut for SAP systems - View table data, output" alt="Shortcut for SAP systems - View table data, output" width="600" height="443" /><br></div><div><br></div><div>Ok, nothing spectacular until now. Only positive aspect is that in case my own dialog user does not have authorizations <span class="fs13lh1-5">for viewing some data</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">(or I don't have a user in the client) I can use this application and a connection with a system user. </span></div><div><br></div><div>Let's switch to another function. Setting passwords I always find a boring task and there is a function related to this. </div><div>There are some gaps in the SAP functions for setting passwords: </div><div><ol><li>There is no function allowing you to assign the same initial password to lots of users. This would be useful for example in case you have lots of test users. For each and every user the password has to be set individually. This is annoying.</li><li>There is no function allowing you to assign individual passwords to lots of users. It's the same mess as in point #1. Especially in case of system users after a system copy it is essential to assign the same passwords as before, otherwise the interfaces would not work. There is usually a list available with the user ID's and their passwords, but each and every system user has to be maintained individually. </li></ol><div>The "Set password" function in Sc4SAP looks quite promising and seems to close these gaps.</div></div><div><br></div><div><img class="image-11" src="https://www.shortcut-it.com/images/First-contact---13.png"  title="Shortcut for SAP systems - Set password (same password to users)" alt="Shortcut for SAP systems - Set password (same password to users)" width="529" height="561" /> &nbsp;&nbsp;<img class="image-12" src="https://www.shortcut-it.com/images/First-contact---14.png"  title="Shortcut for SAP systems - Set password (individual password to users)" alt="Shortcut for SAP systems - Set password (individual password to users)" width="529" height="561" /><br></div><div><br></div><div>Let's try it, but I prefer to do this not in the currently used client 000. So first I have to switch back to the maintenance function for the connection and create a connection to client 001. Done in few seconds: I click on the connection to client 000, the values are copied to the input fields below the list, I change few input values and press "Add". </div><div><br></div><div>I switch back to the "Set password" function to try it. At this point - unless you don't have a license for the application - you will be faced with this annoying popup: </div><div><img class="image-22" src="https://www.shortcut-it.com/images/First-contact---15.png"  title="Shortcut for SAP systems - License missing" alt="Shortcut for SAP systems - License missing" width="362" height="331" /><br></div><div><br></div><div>So you have to have a license for this function (like for all other functions too, that are valuable). You will find the necessary information for ordering a license in the "Settings and configuration" area in the "Licenses" function. Of course it is possible to get a <a href="https://www.shortcut-it.com/trial-license.html" target="_blank" class="imCssLink">trial license for free</a>. </div><div><br></div><div><img class="image-14" src="https://www.shortcut-it.com/images/First-contact---16.png"  title="Shortcut for SAP systems - Licenses" alt="Shortcut for SAP systems - Licenses" width="750" height="344" /><br></div><div><br></div><div>But I am a lucky guy and have a license, so I don't get to see the popup window and can do what I wanted to do, i.e. provide many users with a new initial password in one go. Via copy and paste I fill the text field with the user ID's and entered an initial password. Pressing "Execute" and... wow, quite fast, after a second it is done!</div><div><br></div><div><img class="image-15" src="https://www.shortcut-it.com/images/First-contact---17.png"  title="Shortcut for SAP systems - Set password for test users" alt="Shortcut for SAP systems - Set password for test users" width="500" height="494" /><br></div><div><br></div><div>Now let's try the other option: set individual passwords for lots of users in one go. As I mentioned before a good use case for this is the assignment of the correct password of the system users after a system copy. This could be really annyoing. Mostly you use complex, generated passwords (if you don't do this so far, you should do it), and this means you have to copy and paste the password for every system user. </div><div>The function in ScSAP offers 2 text fields, left one for the users, right one for the passwords. Of course the amount of users and passwords has to be identical. Filling the text fields is done fast using Copy and Paste (assuming that there is an Excel file or similar containing all the system users and their passwords). Pressing "Execute" results in the same fast action as for the previously tried password function. </div><div><br></div><div><img class="image-16" src="https://www.shortcut-it.com/images/First-contact---18.png"  title="Shortcut for SAP systems - Set password for system users" alt="Shortcut for SAP systems - Set password for system users" width="500" height="495" /><br></div><div><br></div><div>Meanwhile, because I did not close the used functions, my desktop is quite full with windows. </div><div>There is no restriction to use another function while others are still running or open. You can start other functions, e.g. to use them for other connections or other purposes, it doesn't matter. All of them operate individually, and you can start and use them as often and in parallel as you want. </div><div><br></div><div><img class="image-0" src="https://www.shortcut-it.com/images/First-contact---19.png"  title="Multiple parallel tasks" alt="The application can use multiple parallel tasks" width="1090" height="660" /><br></div><div> </div><div><br></div><div>Also this article got quite long meanwhile. Since this article was only meant to show the first contact with the application, I will not continue in detail for all other functions like this. But I want to give some general information which might be useful for you.</div><div><br></div><div>Most of the functions offer the possibility to save your input in "variants". If so, you will find 2 buttons at the top right position of the dialog window:</div><div> <img class="image-24" src="https://www.shortcut-it.com/images/First-contact---24.png"  title="Shortcut for SAP systems - buttons for variants" alt="Shortcut for SAP systems - buttons for variants" width="203" height="68" /></div><div>Surely you know this concept from the SAP systems. <span class="fs13lh1-5">It's not just that you don't have to enter the same values over and over again. Another advantage of the variants is the possibility to use the functions with the </span><span class="fs13lh1-5"><b>command line tool</b></span><span class="fs13lh1-5"> that comes with our product. The command line tool allows you to use the functions - outside of the GUI application - </span><span class="fs13lh1-5"><b>at the operating system level</b></span><span class="fs13lh1-5">, and using them at the OS level in turn allows you to use the functions in </span><span class="fs13lh1-5"><b>automated workflows</b></span><span class="fs13lh1-5">. You can find more information <a href="https://www.shortcut-it.com/blog/index.php?automation" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Automation.png&quot; alt=&quot;&quot; style=&quot;width: 20%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Automation, automation...&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">here</a> and <a href="https://www.shortcut-it.com/blog/index.php?copying-data-from-one-system-to-another" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Copying-data-from-one-system-to-another.png&quot; alt=&quot;&quot; style=&quot;width: 20%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Copying data from one system to another&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">here</a>.</span></div><div><br></div><div><span class="fs13lh1-5">When it is about transferring a file between your computer and the SAP system the </span><span class="fs13lh1-5"><b>SAPGUI</b></span><span class="fs13lh1-5"> might come up with a </span><span class="fs13lh1-5"><b>confirmation dialog</b></span><span class="fs13lh1-5">. Until there is no confirmation the task will not continue. Sometimes the window does not appear visible in the foreground and is indicated by a blinking SAPGUI task in the Taskbar only. The confirmation dialog is not specific to Sc4SAP, it's part of the security concept of the SAPGUI.</span><br></div><div><img class="image-19" src="https://www.shortcut-it.com/images/First-contact---21.png"  title="SAP GUI Security - file access" alt="SAP GUI Security - file access" width="485" height="192" /><br></div><div>For not to be faced again and again with this dialog for every file that should be transferred between the SAP system and your frontend you can add a Security Rule in the SAPLogon settings. You can click the "Help" button to view SAP's information about these settings. <img class="image-9 fright" src="https://www.shortcut-it.com/images/First-contact---23.png"  title="SAP GUI Security - rules" alt="SAP GUI Security - rules" width="550" height="383" /><span class="fs13lh1-5">To shorten it: select "Options..." in the SAPLogon, &gt; "Security" &gt; "Security Settings" &gt; select "Customized" in the "Status" listbox &gt; click on button "Open Security Configuration" &gt; button "Insert" &gt; add a rule with Type = "Directory", Object = your preferred directory, e.g. "C:\Sc4SAP\data", Action = "Allow", Access Types = "Read, write" &gt; click on buttons "Insert" and "OK". Once this rule has been added, you will not get any further confirmation dialogs when uploading or downloading files from this directory.</span><span class="fs13lh1-5"> &nbsp;</span></div><div><br></div><div>The <span class="fs13lh1-5"><b>"Messages / log" area</b></span> will be fed with information of your started task. Sometimes this information is not important, but sometimes it is. There are few visible lines only. <span class="fs13lh1-5"><b>In case you want to see more just click the button at the right over the "Messages / log" area</b></span> and the lines will be shown in a separate window, which can be sized as you want.</div><div><img class="image-20" src="https://www.shortcut-it.com/images/First-contact---22.png"  title="Shortcut for SAP systems - messages and log in detached window" alt="Shortcut for SAP systems - messages and log in detached window" width="823" height="695" /> </div><div><br></div><div>In case you closed a function, but you need the information of the messages: it is not lost. <span class="fs13lh1-5"><b>All messages will be stored in the "logs" directory</b></span> for enabling you to follow up what you have done so far and also get all the information that came up in the functions. </div><div><br></div><div>Nearly at the end of this article I would like to refer to my personal favorite functions, I think they are very, maybe most valuable of all functions.</div><div><span class="fs13lh1-5"><br></span></div><div><ul><li><span class="fs13lh1-5">The </span><span class="fs13lh1-5"><b class="fs13lh1-5">"Copy user"</b></span><span class="fs13lh1-5"> function allows you to copy users on-the-fly between systems. As the user ID's can be given (or even specify "*" for all users) it is extremely flexible. And it offers also the possibility to store the user data in a file and use this file afterwards as source. Especially keeping users of a system that is to be overwritten via system copy can be done easily using this function: store the user data in front of the system copy in a file, afterwards use the file as source and copy the user back into the system. You don't have to bother any longer with client copies to temporarily created clients to park the users there! And using the command line tool it can even be integrated in automation tasks.<br></span>Also in a roll-in project or a client merge when it is to consolidate one or more clients into one (or the other way round in a carve out project) this function ist totally useful. I cannot imagine any other method that is so simple and flexible! <br></li></ul></div><div><br></div><div><ul><li>The <span class="fs13lh1-5"><b>"Process table data using R3trans"</b></span><span class="fs13lh1-5"> function is extremely useful for dealing with table contents in a system or to copy / move data to other systems. Among other things, you can use it</span><br></li><ul><li>to copy data to another system or client (for example some customizing data). Have a look at this <a href="https://www.shortcut-it.com/blog/index.php?copying-data-from-one-system-to-another" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Copying-data-from-one-system-to-another.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Copying data from one system to another&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">blog article</a>.</li><li>to keep a backup of system specific tables (e.g. RFC connections, partner profiles etc.) and getting more security of the operation of your SAP system by this (there is a <a href="https://www.shortcut-it.com/blog/index.php?saving-system-specific-tables-using-r3trans" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Saving-system-specific-tables-using-R3trans.png&quot; alt=&quot;&quot; style=&quot;width: 20%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Saving system specific tables using R3trans&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">blog</a> available about this topic)</li><li>to keep data of a system that will be overwritten via system refresh (again: RFC connections etc.). Especially with the command line tool this can save huge effort and duration time. Have a look at this <a href="https://www.shortcut-it.com/blog/index.php?pre-and-post-work-of-an-sap-system-refresh" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Pre--and-post-work-of-an-SAP-system-refresh.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Pre and post work of an SAP system refresh, done with &quot;Shortcut for SAP systems&quot;&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">blog article</a>.</li><li>to enable the project to repeat a test migration without having the need to do another system copy again (think of saving the customer tables KNA1, KNB1, ... in front of the test migration and restore them afterwards if necessary). It does not have to be a big test migration, you can also use this function for very individual program tests. If your program modifies table <span class="fs13lh1-5 ff1">xyz</span> then make a backup of this table and restore the table after the test to its previous state - ready for the next test! Don't bother with additional programs, individually to be developed, to get the tables back to an "untouched" status. &nbsp;</li><li>to get information about 3rd party transport requests <span class="imUl">before</span> they are imported in the system, using the "List data file content" action. As far as I know there is no other method to do so (and as far as I know no other product offers the "R3trans" functions to use them for other purposes than the transport stuff). Typically a sandbox system is to be set up for 3rd party transport requests, or you just take the risk to import a 3rd party transport into your system without knowledge about what's inside. &nbsp;</li><li>to get access to a new client on a system, by copying the user tables into the new client (see this <a href="https://www.shortcut-it.com/blog/index.php?create-a-new-client-without-struggling-with-sap-" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Create-a-new-client-without-struggling-with-SAP.png&quot; alt=&quot;&quot; style=&quot;width: 20%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Get into a new client without struggling with SAP*&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">blog</a> about this topic).</li></ul></ul></div><div><br></div><div><div><ul><li><span class="fs13lh1-5">The</span><span class="fs13lh1-5"> </span><b class="fs13lh1-5"><span class="fs13lh1-5">"Download / upload table data" </span></b><span class="fs13lh1-5">is extremely useful for copying tables partly (selected records) to another system / client or saving / restoring data in the context of a system refresh. For example, in this <a href="https://www.shortcut-it.com/blog/index.php?how-to-copy-idocs-from-one-system-to-another" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/How-to-copy-Idocs-from-one-system-to-another.png&quot; alt=&quot;&quot; style=&quot;width: 50%;&quot;/&amp;gt;&amp;lt;div&amp;gt;How to copy Idocs from one system to another?&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">blog article</a> is described how to copy Idocs from the Production system to the Quality / test system. </span></li><br></ul></div></div><div><ul><li><span class="fs13lh1-5">Also the other functions for modifying data in the </span><span class="fs13lh1-5"><b>"View / modify data"</b> section can safe a lot of time and money in your project work as well as in the IT support. Correction of data could become very cumbersome. With these functions it can be done really easily and fast and can be your rescue in time-critical situations. </span><span class="fs13lh1-5"><b>But of course they should be handled with care!</b></span><span class="fs13lh1-5"> Otherwise your data correction would end up in data corruption... :-( <br></span><br></li><li><span class="fs13lh1-5">The program comes with a </span><span class="fs13lh1-5"><b>command line tool</b></span><span class="fs13lh1-5">. This makes it possible to execute nearly all functions outside the GUI on OS level. Consequently also a use of the function in </span><span class="fs13lh1-5"><b>automation scenarios</b> is possible. This offers a wide variety of use cases, e.g. for </span><span class="fs13lh1-5"><b>system refreshes, data backup, user distribution and many more</b></span><span class="fs13lh1-5">.</span><br><span class="fs13lh1-5">There are 2 methods available to use the command line tool: you can supply the function and a variant (= variant in Sc4SAP) as arguments or you call the command line tool with an XML file as argument. Whereas the first method requires a variant, the second one offers a lot of flexibility and possibilities. Have a look at this </span><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?copying-data-from-one-system-to-another" target="_blank" onmouseover="x5engine.imTip.Show(this, { text: '&amp;lt;img src=&quot;https://www.shortcut-it.com/files/Copying-data-from-one-system-to-another.png&quot; alt=&quot;&quot; style=&quot;width: 20%;&quot;/&amp;gt;&amp;lt;div&amp;gt;Copying data from one system to another&amp;lt;/div&amp;gt;', width: 180});" class="imCssLink">blog</a></span><span class="fs13lh1-5">.</span></li></ul></div></div>]]></description>
			<pubDate>Tue, 24 Sep 2019 13:03:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/HereItIs_thumb.png" length="95739" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?first-contact</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000000E</guid>
		</item>
		<item>
			<title><![CDATA[Copying users]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000000C">The "Copy user" function in "Shortcut for SAP systems" offers a lot of possibilities. It is very handy, quite fast und very flexible. Here are some use cases that can be covered with this function. <div><br></div><div><ol><li>Your test system will be refreshed via system copy from the productive system. With the system copy all users on your test system will be deleted resp. replaced with the users of the productive system. But... some test users will get lost, also the members of the project team, the system users will be the wrong ones, which would result in non-working interfaces, and last not least you will have also the much more restrictive authorizations on your test system. With that situation a continuation of the current test would not be possible and a lot of time and effort would be necessary to add the missing users and the extended authorizations.<br><br>Ok, of course it's not the first time this happens, and meanwhile you are dealing somehow with it. Possibly you have the PCA tool in use, which enables you to keep users and authorizations in front of a system copy and replace that data afterwards again. <br><br>Or you use a client copy to somewhere in front of the system copy (to another new client on another system) and do the same in the other direction afterwards. But it's all very elaborate, cumbersome and time-consuming, and you are under pressure because of the tight schedule of the project (as ever), unfortunately sacrificing another weekend &nbsp;:-( <br><br>Or, that's simply not what is needed. For example, the project team wants to test under circumstances that are as near to the productive environment as possible, so using the users and authorizations from the productive system is a good idea in general. But of course there are exceptions: special test users were created, and also the system users are different from those in the productive environment. So, there is still the need to adjust the users. &nbsp;<br><br></li><li>For every new system or client you have to create the administrative users. Depending on your organization and the role of the client (000 or a client with business data) this could be more than only a small number of users. And, btw, creating them one by one in SU01 is boring.<br> &nbsp;<br>Also this problem is not new. You can think of solving it via a client copy from another client that already keeps the administrative users. For this you have to create an RFC connection on the source system and perform a client copy. Also a CUA (central user administration) system would offer functions in this area - accompanied by the usual inconveniences and problems of a CUA... &nbsp;Or maybe you have an Identity Management System offering functions for this. However, it's always a lot of effort. &nbsp;&nbsp;&nbsp;<br><br></li><li>You are faced with a roll-in project or merge of systems or clients, and users from multiple clients have to be migrated to a single target client.<br>Or, just the other way round, in a carve-out project users selectively are to be migrated to another system. </li></ol><div><br></div></div><div>So let's have a look at the "Copy user" function. The most valuable features of it are in my opinion:</div><div><ul><li>you can specify the users you want to process. This is completely different from the SAP client copy, where no selection is possible. <br></li><li>you can use a file as target as well as the source. This means that for saving the users you don't have to create a new client on another systems, including RFC connections. Just use a file as storage for the users, and use it again as a source when you want to copy the users into a client. It works even with a huge amount of users (we tested it successfully with an amount of ~150000 users). <br></li></ul><div><br></div></div><div>It is so easy. For storing all users of a client just a few steps are necessary and the users are stored in a file. Specify source and target (in this case a file on your computer), press the "Execute" button, that's it. In this example we use a file on our computer for storing the users, therefore an SAP connection using a user with dialog capabilities is needed. In case you copy the users from an SAP client directly to another one or you use a file on the SAP system you can also use a connection with a system user.</div><div><img class="image-0" src="https://www.shortcut-it.com/images/Copying-users---01.png"  title="Copy user function" alt="Copy user function" width="700" height="649" /><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">In this example only a small amount of users are in the source client which of course results in a small data file. But also for clients with a huge amount of users the procedure works reliable. Data files will be splitted at a filesize of approx. 100MB, the filename will be extended by ".Part</span><span class="fs13lh1-5"><i>n</i></span><span class="fs13lh1-5">" where </span><span class="fs13lh1-5"><i>n</i></span><span class="fs13lh1-5"> is incremented. </span><span class="fs13lh1-5">Sc4SAP stores an ".info" file beside the data file on your computer. </span><span class="fs13lh1-5">Keep data file(s) and ".info" file together in the same directory.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Now let us use the file to copy them into another client (here: 100). We select the file as the source and address the client 100 in the system as the target.</span></div><div><span class="fs13lh1-5">For creating the file we didn't restricted the amount of users and took all ("*"). Sc4SAP now offers all users for which is data in the selected file. Having a look at them there are some I don't want to copy because they already exist in client 100, therefore I leave the "Overwrite" flag empty and don't change the user ID's in the text field. But the possibility is there, and in case you want to reduce the amount of users to be copied you can do that!</span></div><div><img class="image-5" src="https://www.shortcut-it.com/images/Copying-users---02.png"  title="Copy user function - restore from file" alt="Copy user function - restore from file" width="700" height="649" /><span class="fs13lh1-5"><br></span></div><div><br></div><div>Thus, let's start....</div><div>Connection established, starting to copy... but errors came up:</div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/Copying-users---03.png"  title="Copy user function - restore from file, error messages" alt="Copy user function - restore from file, error messages" width="700" height="649" /><br></div><div><br></div><div>Ok, have a look into the messages for what the user copy process is claiming about. By using the most right button above the messages we see it all a little bit more comfortable than in the small message area. Obviously it is a general problem with the address data.</div><div><img class="image-3" src="https://www.shortcut-it.com/images/Copying-users---04.png"  title="Copy user function - restore from file, error messages in detached window" alt="Copy user function - restore from file, error messages in detached window" width="741" height="687" /><br></div><div>In every user master data record there is an address number belonging to the company address maintained in SUCOMP. This data is client-dependent and the company addresses in the target client are not the same as in the source client. Therefore the creation of the relation between the user master record and the company address fails. In case you have set up the target client as a copy from the source client this error should not occur. But here we have a client with other company addresses. </div><div><br></div><div>For my purpose the company address is not important, so I decide to use the option to do the copy without the relation to the company address:</div><div><img class="image-9" src="https://www.shortcut-it.com/images/Copying-users---05.png"  title="Copy user function - excluding company address" alt="Copy user function - excluding company address" width="451" height="111" /><br></div><div><br></div><div>Now it looks better, the copy process is working and it's quite fast. After some seconds it is finished. </div><div><img class="image-2" src="https://www.shortcut-it.com/images/Copying-users---12.png"  title="Copy user function - restore from file, success" alt="Copy user function - restore from file, success" width="750" height="558" /><br></div><div><br></div><div>Now it looks fine. Already existing users were not copied, but the others were. If I had chosen to <span class="imUl">overwrite</span> users, <span class="imUl">the user used in the SAP connection would be excluded from the set of users to be copied</span>! The copy process runs with the user used in the SAP connection, and overwriting that user would cause a temporarily loss of authorizations, therefore the copy process would fail. If you choose to overwrite existing users and the specification of the source contains the same user as used in the SAP connection, you will get an information about this.</div><div><img class="image-1" src="https://www.shortcut-it.com/images/Copying-users---13.png"  title="Copy user function - automatic exclusion of user used in connection" alt="Copy user function - automatic exclusion of user used in connection" width="362" height="258" /><br></div><div><br></div><div><span class="fs13lh1-5">But in this example we did not overwrite users and only added non-existing users to our target client.</span></div><div><span class="fs13lh1-5">So finally 59 users were copied successfully to the target client, and it took only few minutes. I did not have to struggle with a CUA or an Identity Management system, I did not need to maintain RFC connections or wait for others to maintain RFC connections. I can use the same data file to copy the users again, possibly into the same client after a system copy or another client on another system. </span><span class="fs13lh1-5"><b>And it </b></span><span class="fs13lh1-5"><span class="fs13lh1-5"><b>can also be integrated into automated processes via our command-line tool</b></span> (you can find some information in </span><span class="fs13lh1-5"><a href="https://www.shortcut-it.com/blog/index.php?automation" class="imCssLink">this blog article</a></span><span class="fs13lh1-5">)!</span><br></div><div><br></div><div>But there is still one issue: the passwords. Maybe you recognized that there is an input field in the copy function for the initial password which I filled with a value. In case you leave it empty a password will be generated (you will get the individual passwords in the messages). In case you missed this somehow: there is nothing that can not be done afterwards with the "Set password" function which gaves us the possibility to assign the same initial password or assign randomly generated passwords.</div><div><i><span class="fs13lh1-5 cb1">"Shortcut for SAP systems" uses the function modules from SAP which are intended to deal with the users. To name the most relevant here: </span><span class="cb1"><span class="fs13lh1-5">BAPI_USER_GET_DETAIL (for reading the user from the source client) and BAPI_USER_CREATE (to create the user in the target client). </span><span class="fs13lh1-5"><b>The function modules don't offer the possibility to copy also the passwords.</b></span></span></i><span class="fs13lh1-5"> </span></div><div><br></div><div><span class="fs13lh1-5"><b>If it's ok that the users will have either the same password (as given in the "Copy user" function) or a randomly generated password, then the job is finished here. </b></span>The users exist in the target client and it took only few minutes. We can use the same data file for other clients, either on the same or another system. This procedure looks suitable e.g. to create a base stock of basis and system admins and some system users on every new client and can be carried out easily and fast. </div><div><br></div><div><span class="fs13lh1-5"><b>If your aim is that the copied users will have the <span class="imUl">same passwords than in the source client</span></b></span> we have to do an additional task: copy the USR02 entries for the copied users (the USR02 table is an essential table for the users on the system and contains the individual passwords, stored in hash values). This can be done with the "Download / Upload table data" function. <span class="fs13lh1-5"><b>For avoiding that the password will be changed for users that will not come with the data file we reduce the download to the specific amount of users by giving a "where" clause.</b></span> </div><div>After pressing the "Execute" button an SAP screen comes up with a confirmation message. <span class="fs13lh1-5">For continuing your work in Sc4SAP you have to</span><span class="fs13lh1-5"> </span><span class="imUl fs13lh1-5">press the "Back" button</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">in the SAP window, otherwise Sc4SAP does not recognize that the SAP system has finished its task and still waits for the completion.</span></div><div><img class="image-17" src="https://www.shortcut-it.com/images/Copying-users---07.png"  title="Download/upload table data - download passwords in USR02" alt="Download/upload table data - download passwords in USR02" width="800" height="559" /><br></div><div><br></div><div>For copying the passwords of the users to the target client we now have to use an <span class="fs13lh1-5"><b>SAP connection to the target client </b></span>and use the "Upload" option. <span class="fs13lh1-5">After pressing the "OK" button in the appearing confirmation dialog the data are uploaded to the target client.</span><span class="fs13lh1-5"> </span><br></div><div><img class="image-18" src="https://www.shortcut-it.com/images/Copying-users---08.png"  title="Download/upload table data - upload passwords into USR02" alt="Download/upload table data - upload passwords into USR02" width="492" height="565" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><span class="fs13lh1-5">After 2 seconds an SAP screen appears:</span></div><div><img class="image-19" src="https://www.shortcut-it.com/images/Copying-users---09.png"  title="Download/upload table data - message at upload " alt="Download/upload table data - message at upload" width="299" height="211" /><br></div><div><br></div><div>Ah, ok. There are already USR02 records for the 59 users, and overwriting them is exactly what I wanted to do. I forgot to set this flag in the dialog: </div><div><img class="image-20" src="https://www.shortcut-it.com/images/Copying-users---10.png"  title="Download/upload table data - Overwrite flag" alt="Download/upload table data - Overwrite flag" width="359" height="125" /><br></div><div><br></div><div>After setting this flag and a new execution I received what I expected:<span class="fs13lh1-5"> </span></div><div><img class="image-21" src="https://www.shortcut-it.com/images/Copying-users---11.png"  title="Download/upload table data - success message" alt="Download/upload table data - success message" width="298" height="179" /><br></div><div><br></div><div><span class="fs13lh1-5">The users in the target client now have the same passwords as in the source client.</span><br></div><div>Consider that, due to the fact that we copied the USR02 records, also attributes like the lock status have been copied. Therefore there might be the need that you have to unlock users. </div><div><br></div><div>I don't want to finish this article without giving the warning that <span class="fs13lh1-5 cf1">the function for downloading/uploading and deleting table entries is very critical! Please, please be quite sure what you are doing with this function.</span></div></div>]]></description>
			<pubDate>Tue, 24 Sep 2019 10:16:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/large-3513215_thumb.jpg" length="205757" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?copying-users</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000000C</guid>
		</item>
		<item>
			<title><![CDATA[Get into a new client without struggling with SAP*]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000000B">This article is related especially to the requirement for a new client on a test system. On productive systems it's about mostly one client only, and on a development system the requirement for new clients is seldom. But for test system the request comes up quite often. <div><br></div><div>Ok, so what is the problem...</div><div><br></div><div>Creating a new client in SCC4 is done quite easily and quickly. But then... <span class="fs13lh1-5"><b>how to get into the newly created client</b></span><span class="fs13lh1-5"><b>?</b></span> The client is empty, there is no data and of course also no users. In this case, SAP plans to use the hard-coded <span class="fs12lh1-5 ff1">SAP*</span> user, which can also be used to log on, even though it does not actually exist. </div><div>But i<span class="fs13lh1-5">n general the possibility of using the </span><span class="fs12lh1-5 ff1">SAP*</span><span class="fs13lh1-5"> user should be avoided, it's a kind of an open door to the system. Therefore for avoiding the access to the </span><span class="fs12lh1-5 ff1">SAP*</span><span class="fs13lh1-5"> user there is a profile parameter </span><span class="fs12lh1-5 ff1">login/no_automatic_user_sapstar</span><span class="fs13lh1-5"> which is by default set to </span><span class="fs12lh1-5 ff1">1</span><span class="fs13lh1-5"> which means: no login using the (non existing) user </span><span class="fs12lh1-5 ff1">SAP*</span><span class="fs13lh1-5"> is possible. Of course you can change this profile parameter to </span><span class="fs12lh1-5 ff1">0</span><span class="fs13lh1-5"> but this profile parameter is not dynamically switchable and a restart of the system is necessary for taking effect of the changed value. Afterwards you could use the </span><span class="fs12lh1-5 ff1">SAP*</span><span class="fs13lh1-5"> user, but of course the profile parameter should be switched back to its original value and another restart is necessary.</span></div><div><span class="fs13lh1-5">Often you will find this situation regarding the SAP* user (which is a good method, I support this):</span></div><div><ul><li><span class="fs13lh1-5">profile parameter </span><span class="fs12lh1-5 ff1">login/no_automatic_user_sapstar </span><span class="fs13lh1-5">set to</span><span class="fs13lh1-5"> </span><span class="fs12lh1-5 ff1">1</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">which disables the login with a (non-existing) user SAP*</span><br></li><li><span class="fs13lh1-5">user </span><span class="fs12lh1-5 ff1">SAP*</span><span class="fs13lh1-5"> created in the clients, but locked by admin and without any authorizations.</span></li></ul><div><span class="fs13lh1-5">And this points us into the direction that we need to change the profile parameter in the profile editor and restart the system. Hmm, cumbersome... &nbsp;in case the system is currently in use you have to deal with the stakeholders about a downtime (or more precise: 2 downtimes) and of course there will be the usual side-effects raised from a system restart like failed jobs, failed update tasks etc. &nbsp;Maybe the project leaders raise the idea to do this at the weekend. Congrats!</span></div></div><div><br></div><div><span class="fs13lh1-5">Another possible method would be to do a client export of an already existing client of your system (transaction SCC8, profile SAP_USER). This would create 3 transport requests which could be used for import into the new client. However, the import has to be done differently from the usual procedure because </span><span class="imUl fs13lh1-5">umode 18</span><span class="fs13lh1-5"> is necessary which can't be set via STMS. Thus, you have to use </span><span class="fs12lh1-5 ff1">tp</span><span class="fs13lh1-5"> via OS command. </span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Ok, we see it's of course not impossible, but there should be an easier and shorter way to deal with the access to the new client. Let's see whether we can shortcut this... &nbsp;&nbsp;</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Yes, of course we can, otherwise I wouldn't have written this blog ;-) &nbsp;</span></div><div><span class="fs13lh1-5">Here is a step-by-step guide. </span></div><div><br></div><div><span class="fs13lh1-5">Let us have a look again at the "Process table data using R3trans" function and the tables related to users. Same as in the blog about <a href="https://www.shortcut-it.com/blog/index.php?saving-system-specific-tables-using-r3trans" target="_blank" class="imCssLink">saving system specific tables</a> we can use the PCA tool for getting the information about the tables. We use the ABAP program that comes with "Shortcut for SAP systems" and take all tables of category 'USER':</span></div><div><span class="fs13lh1-5"><br></span></div><div><img class="image-10" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---01.png"  title="PCA tables for category &#39;USER&#39;" alt="PCA tables for category &#39;USER&#39;" width="900" height="721" /><span class="fs13lh1-5"><br></span></div><div><br></div><div><span class="fs13lh1-5">Though the number of 135 tables seems to be a big amount: as we use client 000 in this example the amount of data is not so big, and exporting the data needed less than 10 seconds. Notice that in this example we defined that the data file is to be stored on the frontend, our computer. This requires an SAP connection that uses a user with dialog capabilities. </span><span class="fs13lh1-5">Of course you can also use the server as the location of the data (and log) file, in that case you can use a system user. In this example I use the frontend and a connection with a dialog user.</span></div><div><img class="image-1" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---02.png"  title="Exporting USER tables with R3trans" alt="Exporting USER tables with R3trans" width="693" height="671" /><br></div><div><br></div><div>A look into the log file offers some details about the exported data: </div><div><img class="image-4" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---03.png"  title="Details about the exported data in the log file" alt="Details about the exported data in the log file" width="900" height="594" /><br></div><div><br></div><div>So, now we have a file with R3trans data containing users. And, as there were also the AGR_... tables given we also have the roles in it. </div><div><br></div><div>Now do the import of this data in our new client (here: 100). There are only 2 input fields to be changed: switch from "Export" to "Import" and use the target client, now. We do not need a connection to the target client (which is not possible of course, because there is no user up to now - that's what we want to change here). We can still use the same SAP connection we used for the export. Only the "Client" field has to be changed to the target client.</div><div><img class="image-6" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---04.png"  title="Switching from Export to Import and selecting the new client" alt="Switching from Export to Import and selecting the new client" width="702" height="673" /><br></div><div>Pressing on "Execute" Sc4SAP comes up with a confirmation dialog, containing also an information that might be of interest:</div><div><img class="image-13" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---05.png"  title="" alt="" width="362" height="241" /><br></div><div><br></div><div>Okay... that is a point we did not consider when we did the export. <span class="fs13lh1-5">There is the possibility that importing also the client-independent data could have some effects to the other clients... </span></div><div><span class="fs13lh1-5">Sc4SAP gives the information </span><span class="fs13lh1-5">of client-dependency for every table entered in the input field and did this also when we entered the tables for the export. Here we are going to do the import into the same system, so it would not make a difference. However, it is not a big issue to consider the client-dependent tables only and it</span><span class="fs13lh1-5">'s still not too late to do so. So let's stop here for the moment, cancel the confirmation dialog and reduce the tables in the input field to those which are client-dependent. We can use a text editor for this (here: Notepad++, free available and useful for lots of things). Copy the messages of Sc4SAP regarding the client-dependency into a new window and select the lines with "client dependent".</span></div><div><img class="image-15" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---06.png"  title="Searching for client dependent tables" alt="Searching for client dependent tables" width="850" height="625" /><br></div><div>After pressing the button "Find All in Current Document" a 2nd window comes up with all hits: </div><div><img class="image-16" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---07.png"  title="Identified client dependent tables via log file" alt="Identified client dependent tables via log file" width="626" height="250" /><br></div><div>A right mouse-click, followed by "Select All" and the same for "Copy" copies all 124 tables into the clipboard. In a new editor window we can paste the lines and reduce the data leaving the table names only (simply use the "Replace" function to replace all texts "Table " and " is client dependent." with nothing). Then switch to Sc4SAP and replace the content in the "Tables" input field with the reduced amount of (now 124) tables (maybe it sounds a little bit cumbersome, but it is a task of a minute only). And let us do the export again. It would be also possible to reduce the amount of data to the client-dependent tables for the import. The other tables would not be processed. But I would like to have this tidy for later requests of new clients for the system, and doing the export is a task of few seconds only. Spending these few seconds for repeating the export will preserve me in future of dealing with the separation of client-dependent and client-independent tables when I have to use the same data file later again (for other clients). Thus, switch the R3trans operation back to "Export" and client "000" again and repeat the export. See the screenshot above in this article. </div><div><br></div><div>After having created the data file with client-dependent data only we use "Import" and the target client to create user and authorization data in the target client. We will be asked for confirmation again, but now without the warning about client-independent data:</div><div><img class="image-8" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---08.png"  title="Importing the USER tables into the new client using R3trans" alt="Importing the USER tables into the new client using R3trans" width="702" height="673" /><br></div><div><br></div><div>Yes, we are sure, and pressing "OK" starts the action. </div><div><br></div><div>It takes noticeably longer than the export (the import of data into the database causes more effort than reading), but after approx. 2 minutes we see the feedback from the SAP system. Hmm, a warning...</div><div><img class="image-14" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---09.png"  title="Import done with warning" alt="Import done with warning" width="702" height="673" /><br></div><div><br></div><div>Thus, let's have a look into the log file for the warning(s). By pressing again the button with the glasses the log file will be shown in a separate window. &nbsp;<span class="fs13lh1-5">The warnings in the log file of R3trans have a "W" in the 2nd column (the first column is a log level that is used in the SAP system for expanding and collapsing a log). There are 2 warnings in it:</span></div><div><img class="image-20" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---10.png"  title="Warnings in the log file" alt="Warnings in the log file" width="675" height="534" /><br></div><div><br></div><div>The first warning tells us that we specified the tables to be imported. R3trans allows also to leave the naming of the tables blank, in that case R3trans take the whole content of the data file. We specified the client dependent tables only, so the statement about the 'selective import' is true, but we can ignore the warning. <span class="fs13lh1-5">The statement of the other warning also is true. We u</span><span class="fs13lh1-5">sed the same system to transfer users and authorizations from client 000 to client 100.</span></div><div><br></div><div>Ok, finally we are at the end. Now check if we can log into our new client. We copied all the user tables from client 000 into client 100, therefore we expect to have the same users and the same passwords: </div><div><img class="image-21" src="https://www.shortcut-it.com/images/Create-a-new-client-without-struggling-with-SAP_---11.png"  title="Log in into the new created client - without downtime!" alt="Log in into the new created client - without downtime!" width="520" height="550" /><br></div><div><br></div><div>Tataaa.... we logged in.</div><div>Looking a little bit around in our new client offers no big surprises. We find the same users and the same roles in our freshly created new client. We did not have to deal with profile parameters and restarts of the system. And a<span class="fs13lh1-5">lthough this article got quite long and extensive, the time necessary for doing it was quite short and the tasks can be done in a few minutes. And: the data file can be used again for getting into another new client on the system or a new client on another system. This could be done now in a few minutes, without the need for profile parameter changes and restarting the system!</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">In a 2nd try I reduced the tables. As I chose client 000 as source, containing users (also mine) with profile SAP_ALL, it is not necessary to copy all the roles. It should be enough to copy the USR* tables (containing the users) and the UST* tables (containing the authorizations, e.g. the SAP_ALL profile), so I decreased the amount of tables to these: </span><br></div><blockquote><div><div><span class="fs12lh1-5 ff1">USGRP; USGRP_USER; USGRPT; USR_CUST; USR01; USR02; USR04; USR05; USR06; USR06SYS; USR08; USR10; USR11; USR12; USR13; USR14; USR22; USRACL; USRACLEXT; USRATTR; USREFUS; USREXTID; USREXTID_IDM; USREXTIDH; USRSTAMP; UST04; UST10C; UST10S; UST12</span></div></div></blockquote><div><span class="fs13lh1-5">The result was the same: I could log into the new client with my user credentials from the source client. </span></div><div><span class="fs13lh1-5"><br></span></div><div><div><span class="fs13lh1-5">So, until now we shortcut the login into the new client, but - except some tables for user and roles - a</span><span class="fs13lh1-5">ll the important tables are still empty (addresses, number intervals, country settings etc.etc.etc.... in short: the whole customizing). Without this data not much more than a login into the client is possible - which was the target we wanted to achieve, and we did it.</span></div><div><br></div></div><div><b><span class="fs13lh1-5">Therefore, after now having the access to the new client you can (and have to) continue like you would do as usual, e.g. with performing a client copy in SCCL using profile SAP_CUST (Customizing).</span></b><span class="fs13lh1-5"> Means: enable now the </span><span class="fs12lh1-5 ff1">SAP*</span><span class="fs13lh1-5"> user (mostly it is created in the systems with respect to the security gap related to this user, otherwise you can create the user now), assign SAP_ALL and use the </span><span class="fs12lh1-5 ff1">SAP*</span><span class="fs13lh1-5"> user to perform a client copy with the new created client as the target. </span><br></div><div><span class="fs13lh1-5"> </span></div></div>]]></description>
			<pubDate>Tue, 24 Sep 2019 10:14:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/Create-a-new-client-without-struggling-with-SAP_thumb.png" length="269838" type="image/png" />
			<link>https://www.shortcut-it.com/blog/?create-a-new-client-without-struggling-with-sap-</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000000B</guid>
		</item>
		<item>
			<title><![CDATA[About security and passwords]]></title>
			<author><![CDATA[Shortcut IT]]></author>
			<category domain="https://www.shortcut-it.com/blog/index.php?category=Sc4SAP"><![CDATA[Sc4SAP]]></category>
			<category>imblog</category>
			<description><![CDATA[<div id="imBlogPost_00000000F">There are many sources of information available about SAP's password security, therefore why add another one...?<div><br></div><div>"Shortcut for SAP systems" claims - among other possibilities - to work as a "locksmith" in case you need it, therefore I thought it is worth to spend some time in an article about this. There are some functions related to this topic in the application. </div><div><ul><li>The "Unlock users" function can be used for the task of unlocking lots of users. In case you are already a user administrator it is only an alternative to the <span class="fs13lh1-5 ff1">SU10</span> transaction, otherwise the function enables you to unlock users using another user (e.g. a system user).</li><li>The "Unlock user via DB update" is a little bit more special, it offers the possibility to unlock users in another client of the system. In case every user is locked out of the system by mistake (or all user administrators) this could be the rescue.</li><li>The "Set password" function closes some gaps in the SAP standard functions and makes it easier to assign passwords to lots of users.</li></ul><div>With these functions we can <span class="imUl">unlock users in every client</span> and <span class="imUl">assign passwords for the same client</span> as in the used SAP connection. This leaves us with <span class="imUl">the gap of assigning passwords in every client</span>. In other words: how to assign a password in a client to which we don't have access?</div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">You might think that this is not possible. But... it is! </span><span class="fs13lh1-5">As there is no access to the client we can not use any function modules or similar to assign a free chosen password. But we can try it the other way round:</span><span class="fs13lh1-5"> </span><span class="imUl fs13lh1-5">update the</span><span class="imUl fs13lh1-5"> </span><span class="imUl fs13lh1-5 ff1">USR02</span><span class="imUl fs13lh1-5"> </span><span class="imUl fs13lh1-5">table with a hash value for a known password</span><span class="imUl fs13lh1-5">!</span><span class="fs13lh1-5"> Of course we need access to <span class="imUl">another</span> client of the system.</span></div></div><div><div><span class="imUl fs13lh1-5"><br></span></div><div><span class="fs13lh1-5"><b>This method needs a little explanation, but from technical and security point of view it is quite interesting!</b></span></div></div><div><br></div><div>There is a function are that can be used for this. <span class="fs13lh1-5">Beside all other tables the </span><span class="imUl fs13lh1-5"><b>"Update table data"</b></span><span class="fs13lh1-5"> function also enables us to update table </span><span class="fs13lh1-5 ff1">USR02.</span></div><div><div><hr></div></div><blockquote><div><div><span class="fs13lh1-5"><i>Some background info about the method how passwords are stored and verified at login:</i></span></div></div><div><span class="fs13lh1-5"><i><br></i></span></div><span class="fs13lh1-5"><i>The hash functions used by SAP for the passwords have a long history. Started with simple hash methods for quite short passwords (up to 8 ASCII characters, automatically converted in upper case letters) the hash methods in the recent releases are meanwhile quite secure, dealing with special characters and a maximum password length of 40 characters. There's some "salt" given, means that something randomly generated is appended to the password and that concatenated value is used to compute the hash value.<br>The method used by default in the system depends on the SAP kernel version and some profile parameters (login/password_charset and login/password_downwards_compatibility) and can be seen in the USR02 record in field CODVN. They were added and used by SAP evolutionarily. For compatibility reasons the SAP system supports the newer hash methods as well as the older and outdated ones.</i></span><div><span class="fs13lh1-5"><i>The hash algorithm can vary from user to user. When a user logs in into the system, the hash algorithm stored in the field CODVN of the USR02 record belonging to the user ID determines which hash algorithm and which field containing the hash code is to be taken for verifying the password. </i></span></div></blockquote><div><hr><span class="fs13lh1-5">When using the "Update table data" function for setting passwords, we need some knowledge about the internals. That's why I </span><span class="fs13lh1-5">would like to make a short excursion into the dry topic of password encryption. </span><span class="fs13lh1-5"> </span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">Depending on the hash algorithm specified in field </span><span class="fs13lh1-5 ff1">CODVN</span><span class="fs13lh1-5"> the hash value is stored in different fields of the </span><span class="fs13lh1-5 ff1">USR02</span><span class="fs13lh1-5"> table. '</span><span class="fs13lh1-5 ff1">A'</span><span class="fs13lh1-5"> to '</span><span class="fs13lh1-5 ff1">E</span><span class="fs13lh1-5">' uses the </span><span class="fs13lh1-5 ff1">BCODE</span><span class="fs13lh1-5"> field which is long enough to keep a hash value for a password with up to 8 characters. With '</span><span class="fs13lh1-5 ff1">F</span><span class="fs13lh1-5">' a password length up to 40 characters is supported, the hash value is stored in the field </span><span class="fs13lh1-5 ff1">PASSCODE</span><span class="fs13lh1-5">. The complexity of the hash algorithm made a further step with </span><span class="fs13lh1-5 ff1">CODVN</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">'</span><span class="fs13lh1-5 ff1">H</span><span class="fs13lh1-5">' which stores the hash value in the field </span><span class="fs13lh1-5 ff1">PWDSALTEDHASH</span><span class="fs13lh1-5">.</span><br></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">For our current purpose - assign a password to the emergency user in a client where we don't have access to - the hash algorithm behind </span><span class="fs13lh1-5 ff1">CODVN</span><span class="fs13lh1-5"> '</span><span class="fs13lh1-5 ff1">H</span><span class="fs13lh1-5">' is quite interesting. </span><span class="fs13lh1-5"><i>What?</i></span><span class="fs13lh1-5"> This is a quite modern hash algorithm, much newer than for example </span><span class="fs13lh1-5 ff1">'B'</span><span class="fs13lh1-5">. So, with respect to the availability of this old hash method </span><span class="fs13lh1-5 ff1">'B'</span><span class="fs13lh1-5"> and its lower level of security, why should the modern </span><span class="fs13lh1-5 ff1">'H'</span><span class="fs13lh1-5"> algorithm with a higher security level looks more attractive to do some tricks? </span><div><span class="fs13lh1-5"><br>There is one aspect that makes the </span><span class="fs13lh1-5 ff1">'H'</span><span class="fs13lh1-5"> algorithm useful for our purpose: there is no dependency to the user ID in the hash algorithm - different to the old and outdated </span><span class="fs13lh1-5 ff1">'B'</span><span class="fs13lh1-5">. If we would copy the password information for the </span><span class="fs13lh1-5 ff1">'B'</span><span class="fs13lh1-5"> algorithm from user A to user B, the password would not work for user B because of the different user ID considered for computing the hash value. Therefore, copying a password for </span><span class="fs13lh1-5 ff1">CODVN</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5 ff1">'B'</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">or other hash algorithms considering the user ID </span><span class="fs13lh1-5">from a user to another user ID would not work</span><span class="fs13lh1-5">. It has to be the same user ID.</span><br></div><div><span class="fs13lh1-5">The </span><span class="fs13lh1-5 ff1">'H'</span><span class="fs13lh1-5"> algorithm uses a randomly generated "salt" for the hash value. You can see this when you assign a password to a user and have a look afterwards on the field </span><span class="fs13lh1-5 ff1">PWDSALTEDHASH</span><span class="fs13lh1-5"> where the hash value is stored (I assume that in your system the </span><span class="fs13lh1-5 ff1">'H'</span><span class="fs13lh1-5"> algorithm is used as it seems to be the standard algorithm in SAP systems since releases with SAP_BASIS 731). Do it a 2nd time using the same password and the same user and you will see that the value has changed. A 3rd time... again another hash value. That is the effect of the "salt": the field contains a hashed value of the concatenation of the "salt" value and the password, and as the "salt" is randomly generated the value is another one every time. But, and this is the important point: the </span><span class="fs13lh1-5 ff1">'H'</span><span class="fs13lh1-5"> algorithm does not use the user ID </span><span class="fs13lh1-5">additionally</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5">for encryption.</span></div><div><span class="fs13lh1-5"><br></span><div><div><div>Therefore, for our purpose (it's still about assigning a password to an emergency user in a client where we don't have access to) this hash algorithm, even that it has a really high level of security, offers an advantage in comparison to the old <span class="fs13lh1-5 ff1">'B'</span> algorithm. Because the field <span class="fs13lh1-5 ff1">PWDSALTEDHASH</span> contains salt + password and the algorithm does not use the user ID, we can transfer the hash value to another user without losing its validity.</div></div><div><div><br></div><div>Seems to be too easy? Let's verify it... </div><div><br></div><div>I use my local SAP test system for it. In client 001 I created a user <span class="fs13lh1-5 ff1">'EMERGENCY'</span>, assigned a randomly generated password and forgot it. In another client I created a user <span class="fs13lh1-5 ff1">'TESTUSER'</span> with initial password '<span class="fs13lh1-5 ff1">Shortcut!</span>'. </div><div><img class="image-0" src="https://www.shortcut-it.com/images/About-Security-and-Passwords---01.png"  title="SAP - password in SU01" alt="SAP - password in SU01" width="795" height="719" /> </div><div><br></div><div>Now let's copy the value of the field <span class="fs13lh1-5 ff1">PWDSALTEDHASH</span> of this user to the <span class="fs13lh1-5 ff1">EMERGENCY</span> user in client 001. </div><div>First get the value by using SE16 for table <span class="fs13lh1-5 ff1">USR02</span>:</div><div><br></div><div><img class="image-2" src="https://www.shortcut-it.com/images/About-Security-and-Passwords---02.png"  title="SE16 selection screen table USR02" alt="SE16 selection screen table USR02" width="650" height="338" /><br></div><div><br></div><div><img class="image-1" src="https://www.shortcut-it.com/images/About-Security-and-Passwords---03.png"  title="SE16 - USR02 data with hashed password" alt="SE16 - USR02 data with hashed password" width="750" height="350" /><br></div><div><br></div><div>I copy the value into the clipboard and start the "Update table data" in Sc4SAP to insert the values for updating the <span class="fs13lh1-5 ff1">USR02</span> record for the <span class="fs13lh1-5 ff1">EMERGENCY</span> user in client 001, using an SAP connection for client 000.</div><div><br></div><div><img class="image-3" src="https://www.shortcut-it.com/images/About-Security-and-Passwords---05.png"  title="Update table data function" alt="Update table data function" width="700" height="657" /></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">The update of </span><span class="fs13lh1-5 ff1">CODVN</span><span class="fs13lh1-5"> with </span><span class="fs13lh1-5 ff1">'H'</span><span class="fs13lh1-5"> is not necessary when in the USR02 record the value is already set. It ensures that the right hash algorithm is used for the verification of the password. </span></div><div><br></div><div><span class="fs13lh1-5">After pressing "OK" of the confirmation dialog the update needs only a second. </span></div><div><br></div><div><img class="image-4" src="https://www.shortcut-it.com/images/About-Security-and-Passwords---06.png"  title="Update table data function - result" alt="Update table data function - result" width="476" height="121" /><br></div><div><br></div><div>Now comes the thrilling part. We try to log in with the <span class="fs13lh1-5 ff1">EMERGENCY</span> user in client 001 with password '<span class="fs13lh1-5 ff1">Shortcut!</span>', and... it worked!</div><div><br></div><div><img class="image-6" src="https://www.shortcut-it.com/images/About-Security-and-Passwords---07.png"  title="SAP - Login with newly assigned password" alt="SAP - Login with newly assigned password" width="600" height="511" /><br></div><div><br></div><div>It works on the same system as well as on other systems! </div><div>There is a relation to profile parameter <span class="fs13lh1-5 ff1">login/password_hash_algorithm</span><span class="fs13lh1-5"> which specifies some parameters for the hash algorithm. Default value for this profile parameter is 'encoding=RFC2307, algorithm=iSSHA-1, iterations=1024, saltsize=96'. The SAP documentation of this profile parameter says: </span><span class="fs13lh1-5"><i>"This profile parameter is evaluated when calculating new password hash values (but not, however, when checking password hash values at logon), to determine the hash procedure and the coding format.</i></span><span class="fs13lh1-5"><span class="fs13lh1-5"><i>"</i></span></span></div><div><span class="fs13lh1-5">Therefore it should work also on systems with another value for this profile parameter.</span></div><div><span class="fs13lh1-5"><br></span></div><div><span class="fs13lh1-5">If you want to try it, this is the used value for </span><span class="fs13lh1-5 ff1">PWDSALTEDHASH</span><span class="fs13lh1-5"> with </span><span class="fs13lh1-5 ff1">CODVN = 'H'</span><span class="fs13lh1-5"> that works for password '</span><span class="fs13lh1-5 ff1">Shortcut!</span><span class="fs13lh1-5">'. </span></div></div></div></div><blockquote><div><div><div><div><div><span class="fs13lh1-5 ff1">'{x-issha, 1024}fMSNQye6C9qWpeEdfyPwCFUkTfcBG3Sae4dthuxjfPA='</span></div></div></div></div></div></blockquote><div><div><div>Following the given example feel free to try it with other passwords and their hash values. In addition to the update of <span class="fs13lh1-5 ff1">PWDSALTEDHASH</span> you can of course take the opportunity to update some other fields related to the login, for example:</div><div><br></div><div> 		 		<div><span class="fs12lh1-5 ff1">UFLAG = 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">/* lock flag (0: not locked)</span><br></div></div><div><div><span class="fs12lh1-5 ff1">LOCNT = 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">/* counter of invalid login attempts</span></div><div><span class="fs12lh1-5 ff1">PWDSTATE = 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">/* password can be changed</span></div><div><span class="fs12lh1-5 ff1">PWDINITIAL = 2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">/* password is not initial</span></div></div></div><div><div><span class="fs12lh1-5 ff1">LTIME = sy-uzeit &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5"> &nbsp;&nbsp;</span><span class="fs12lh1-5">/* </span><span class="fs12lh1-5">no need to change password at 1st login</span></div></div><div><div><span class="fs12lh1-5 ff1">GLTGV = '00000000'</span><span class="fs13lh1-5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">/* } reset validity range</span></div></div><div><span class="fs12lh1-5 ff1">GLTGB = '</span><span class="fs12lh1-5 ff1">00000000</span><span class="fs12lh1-5 ff1">'</span><span class="fs13lh1-5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">/* }</span><br></div><div><div><span class="fs12lh1-5 ff1">PWDCHGDATE = '29991231'</span><span class="fs13lh1-5"> &nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">/* } bypass 'deactivated' password (see profile parameter </span><br></div></div><div><div><span class="fs12lh1-5 ff1">PWDLGNDATE = '29991231'</span><span class="fs13lh1-5"> </span><span class="fs13lh1-5"> &nbsp;&nbsp;</span><span class="fs12lh1-5">/* } &nbsp;&nbsp;&nbsp;</span><span class="fs12lh1-5">login/password_max_idle_productive)</span></div></div><div> </div></div><style type="text/css"> 		@page { size: 21cm 29.7cm; margin: 2cm } 		td p { background: transparent } 		p { margin-bottom: 0.25cm; line-height: 115%; background: transparent } 	</style></div></div>]]></description>
			<pubDate>Tue, 24 Sep 2019 08:11:00 GMT</pubDate>
			<enclosure url="https://www.shortcut-it.com/blog/files/pixabay-3938430_thumb.jpg" length="154754" type="image/jpeg" />
			<link>https://www.shortcut-it.com/blog/?about-security-and-passwords</link>
			<guid isPermaLink="false">https://www.shortcut-it.com/blog/rss/00000000F</guid>
		</item>
	</channel>
</rss>