{"id":188,"date":"2011-08-17T04:05:42","date_gmt":"2011-08-17T04:05:42","guid":{"rendered":"https:\/\/adilfahim.com\/myblog\/?p=188"},"modified":"2011-08-17T04:05:42","modified_gmt":"2011-08-17T04:05:42","slug":"guide-to-patching-your-sap-system","status":"publish","type":"post","link":"https:\/\/adilfahim.com\/myblog\/guide-to-patching-your-sap-system\/","title":{"rendered":"Guide to Patching your SAP System"},"content":{"rendered":"<p>I need to upgrade our internal demo systems every once in a while. Now, as I don\u2019t unleash my Basis skills on customers everyday I tend to forget how its done. I decided to record the steps here to save me a bit of time next time around. Please treat any advice given here with care(I\u2019m no expert at this) and read the official guides and help files.<br \/>\nApplying patches to an SAP system is not as simple as, say updating your Windows PC. There is no auto update or one click upgrade process. I will be surprised if there ever will be. The thing is, SAP actually allows you a lot of freedom and flexibility in changing the way it works(Windows doesn\u2019t). The price you pay is a slightly complex upgrade process.<br \/>\nDoing a full Support Pack update of an SAP system broadly involves the following:<br \/>\n1. Log in to the Service Market Place and select the packages to be downloaded. Admittedly, this is a bit easier now with SP Stacks.<br \/>\n2. Log on to your Solution Manager System(Maintenance Optimizer) to confirm your download basket. If you don\u2019t do this you can\u2019t download your Patches. I must still figure out what the benefit of this is.<br \/>\n3. Download the files using the SAP Download Manager.<br \/>\n4. Use sapcar to extract the patches. You can use the command sapcar -xvf  from command line to do this. An easy way to extract these files in Windows is to register the extensions .CAR or .SAR to open automatically in Explorer.<br \/>\nYou can do this by opening Windows Explorer and going to Tools-&gt;Folder Options and clicking on the File Types Tab.<br \/>\nCreate a new type for the .CAR\/.SAR file types and create a default action as shown in the screen shot below( Copy SAPCAR.EXE to your C:Windows directory first).<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/johanvanzijl.com\/wp-content\/uploads\/2008\/05\/cartype.jpg\" alt=\"SAPCAR Image\" \/><\/p>\n<p>You can now \u201cmass extract\u201d all your patches at once by selecting all 50+ files in Windows Explorer and hitting enter on them. If you do this on a laptop now would be a good time for a coffee break.<br \/>\n5. Now the real upgrade can start. Always update your kernel to the latest release first. This involves the following:<br \/>\n\u2022\tDetermine your global kernel directory. Goto transaction AL11 and look for directory mapped to DIR_CT_RUN. In my case(on Linux) this is \/usr\/sap\/\/SYS\/exe\/run.<br \/>\n\u2022\tLog in with your adm user. This will ensure you preserve the correct rights to your files.<br \/>\n\u2022\tBackup this directory by copying it to somewhere safe.<br \/>\n\u2022\tOverwrite the files in your DIR_CT_RUN directory with the new kernel files extracted in step 4. These files aren\u2019t used by the SAP System, so you can safely overwrite them while the system is still running.<br \/>\n\u2022\tOn Windows I would recommend rebooting the box, on Unix environments you only need to stop and start the instance.<br \/>\n\u2022\tDuring the startup of the instance a program called sapcpe will copy the new kernel files in DIR_CT_RUN to DIR_EXE_ROOT(usr\/sap\/\/exe).<br \/>\n6. Now, do a full off line database backup and keep in a safe place.<br \/>\n7. Copy the ABAP Support Pack files extracted in Step 4 to the following location on the SAP Server: \/usr\/sap\/trans\/EPS\/in.<br \/>\n8. Log on to the SAP System in client 000 with your own user(not SAP* or DDIC).<br \/>\n9. Execute transaction SPAM(what a name\u2026).<br \/>\n10. Load the Support Packages. On the SPAM main menu goto Support Package-&gt;Load Packages-&gt;From Application Server.<br \/>\n11. Now we hit the stage where P.P.P.P.P.P. You have to read all the notes on all the patches for all the components you want to upgrade. There are many dependencies here and it is easy to stuff up. But a few points:<br \/>\n\u2022\tMake sure TMS is configured properly and actually working(i.e. test with a transport). This is important on new installs and has burned me in the past.<br \/>\n\u2022\tAlways upgrade SPAM to the latest version first. Always!<br \/>\n\u2022\tRead the notes on optimal queue definitions, make them as long as possible, but keep the next point in mind\u2026<br \/>\n\u2022\tDon\u2019t overshoot(see note 70228 for explanation). This is critical if you have add-ons such as XRPM, WFM or even CRM 2007(which now requires a CRT(Conflict Resolution Transport) after every ABAP support pack).<br \/>\n\u2022\tWrite down all the steps you took and queues you used as this will help in the upgrade of downstream systems.<br \/>\n12. If you read the plethora of notes before hand and manage to follow them correctly everything should go fine.<br \/>\n13. If you do it Cowboy style(and ignore point 12 like I do  ), SPAM failure is likely. You could try the following, in order:<br \/>\n\u2022\tRestart the Process. Always do this 2 or 3 times before proceeding, especially with BASIS\/ABAP support packs.<br \/>\n\u2022\tSearch for notes on the Service Market Place. You are probably not the first one to mess up. Also, sometimes the support packs contain errors.<br \/>\n\u2022\tTry to reset the queue and process again.<br \/>\n\u2022\tIf you absolutely have to back out and SPAM does not allow you to reset the queue, you can do the following if you are brave. Run Function Module OCS_RESET_QUEUE in SE37 with the parameters IV_TOOL=SPAM and IV_FORCE=X. Just realize that this will leave your system in an inconsistent state. You may need to do some significant manual fixing.<br \/>\n\u2022\tLog it with SAP.<br \/>\n\u2022\tRestore your backup and try again.<br \/>\nEventually you should have an up-to-date, everything recompiling, SAP System.<\/p>\n<p>Source : johanvanzijl.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I need to upgrade our internal demo systems every once in a while. Now, as I don\u2019t unleash my Basis skills on customers everyday I tend to forget how its done. I decided to record the steps here to save me a bit of time next time around. Please treat any advice given here with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,8],"tags":[42,148,187,199,252],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-it","category-sap-updates","tag-basis","tag-mopz","tag-sap","tag-sapcar","tag-spam"],"_links":{"self":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":0,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"wp:attachment":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}