Johan van Zijl

Mostly SAP related…
  • rss
  • Home
  • About

Quick Guide to Patching your SAP System

June 1, 2008

I need to upgrade our internal demo systems every once in a while. Now, as I don’t 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’m no expert at this) and read the official guides and help files.

Applying 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’t). The price you pay is a slightly complex upgrade process.

Doing a full Support Pack update of an SAP system broadly involves the following:

1. Log in to the Service Market Place and select the packages to be downloaded. Admittedly, this is a bit easier now with SP Stacks.

2. Log on to your Solution Manager System(Maintenance Optimizer) to confirm your download basket. If you don’t do this you can’t download your Patches. I must still figure out what the benefit of this is.

3. Download the files using the SAP Download Manager.

4. Use sapcar to extract the patches. You can use the command sapcar -xvf <filename.car> 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.

You can do this by opening Windows Explorer and going to Tools->Folder Options and clicking on the File Types Tab.

Create 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).

You can now “mass extract” 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.

5. Now the real upgrade can start. Always update your kernel to the latest release first. This involves the following:

  • Determine 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/<SID>/SYS/exe/run.
  • Log in with your <sid>adm user. This will ensure you preserve the correct rights to your files.
  • Backup this directory by copying it to somewhere safe.
  • Overwrite the files in your DIR_CT_RUN directory with the new kernel files extracted in step 4. These files aren’t used by the SAP System, so you can safely overwrite them while the system is still running.
  • On Windows I would recommend rebooting the box, on Unix environments you only need to stop and start the instance.
  • During 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/<SID>/exe).

6. Now, do a full off line database backup and keep in a safe place.

7. Copy the ABAP Support Pack files extracted in Step 4 to the following location on the SAP Server: /usr/sap/trans/EPS/in.

8. Log on to the SAP System in client 000 with your own user(not SAP* or DDIC).

9. Execute transaction SPAM(what a name…).

10. Load the Support Packages. On the SPAM main menu goto Support Package->Load Packages->From Application Server.

11. 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:

  • Make 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.
  • Always upgrade SPAM to the latest version first. Always!
  • Read the notes on optimal queue definitions, make them as long as possible, but keep the next point in mind…
  • Don’t 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).
  • Write down all the steps you took and queues you used as this will help in the upgrade of downstream systems.

12. If you read the plethora of notes before hand and manage to follow them correctly everything should go fine.

13. If you do it Cowboy style(and ignore point 12 like I do :grin: ), SPAM failure is likely. You could try the following, in order:

  • Restart the Process. Always do this 2 or 3 times before proceeding, especially with BASIS/ABAP support packs.
  • Search for notes on the Service Market Place. You are probably not the first one to mess up. Also, sometimes the support packs contain errors.
  • Try to reset the queue and process again.
  • If 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.
  • Log it with SAP.
  • Restore your backup and try again.

Eventually you should have an up-to-date, everything recompiling, SAP System.

Oh, and if you are unlucky enough to use a J2EE stack as well. Good Luck…

Share and Enjoy:
  • email
  • TwitThis
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Technorati
Comments
No Comments »
Categories
Basis, SAP
Tags
SAP, spam, support package
Comments rss Comments rss
Trackback Trackback

Triggering a Broadcast

May 29, 2008

The SAP CRM system allows a manager to send broadcasts to agents via the broadcast manager. This is useful to notify agents immediately of any important information.

The BSP Application CRM_BM can be used to send broadcast messages. Below is a screenshot.

Broadcast Manager

When you click send, the user will immediately receive a scrolling message at the bottom of their screen.

Broadcast

However, in some case you may want to send an automated message. Maybe you want to notify a processor that a service ticket is outside SLA or a customer must be phoned?

It is possible to send broadcasts automatically from background jobs or actions using the following code.

data: lt_users    type  crmt_bm_key_value_tab,
      ls_user     type  crmt_bm_key_value_line,
      lv_message  type  string.

data: supervisor type ref to cl_crm_bm_broadcast_sup.

   lv_message = 'This is a demo message'.
   ls_user-key = 'AUSERNAME'.
   ls_user-value = 'AUSERNAME'.
   append ls_user to lt_users.
   create object supervisor.

   try.
     supervisor->send_message(
       exporting text_value       = lv_message
                 priority_value   = '0'
                 duration_h_value = '0'
                 duration_m_value = '1'
                 dl_members       = lt_users ).
*    importing
*      et_success       = et_success
*      et_fail          = et_fail
     catch cx_crm_bm_exception .
  endtry.
Share and Enjoy:
  • email
  • TwitThis
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Technorati
Comments
No Comments »
Categories
ABAP Code, IC WebClient
Tags
ABAP Code, Broadcast, IC WebClient
Comments rss Comments rss
Trackback Trackback

Hands Off…

May 15, 2008

I wonder how many times someone stuck their finger into SAPMSSYD before the developer included this warning…

*///////////////////////////////////////////////////////////////////////
* C A U T I O N:
*///////////////////////////////////////////////////////////////////////
* If you want to add a specific handler within a main step handler,
* make sure to follow the following
* G O L D E N  R U L E
* If you do not know, what a dynpro is:    HANDS OFF
* If you do not know, what a main step is: HANDS OFF
...
* N E V E R  prototype here. You may damage the system seriously.
* The worst case will lead to a system, where nobody can login.
* It will be your job, to spend the following night in your office
* to repair the system.
*///////////////////////////////////////////////////////////////////////

The thing is that I discovered this comment late one night many years ago after implementing a login screen for RF scanners using SAP Console. The process is described in Note 365664. I ignored the part of the note that said “Please, change only the layout!!!!” and tried to include a subscreen or module(can’t remember why).

The result was that nobody could log into the system. The reason is that the code in the login program SAPMSYST is hidden(try to view it in SE80:-) ). As soon as this program is modified, the hidden code is lost(…it took me a while to figure out what the heck happened).

The only way to fix this error is to transport program SAPMSYST from a working system into the broken system.

Share and Enjoy:
  • email
  • TwitThis
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Technorati
Comments
No Comments »
Categories
ABAP Code
Tags
ABAP Code
Comments rss Comments rss
Trackback Trackback

IC WebClient Business Transaction Search

May 13, 2008

–Update: Please note there are issues with this Enhancement after applying CRM 7.0 SP 5 & 6. I will try to get hold of the fix, but it may better to investigate other options–

Overview

This post describes the enhancement of the IC WebClient using the Business Transaction Search in CRM 5.0. The Business Transaction Search (BT Search) allows you to define an index table that can be used as an alternative to the standard reporting framework.

As this is really too much to information to put into a post, I just placed an extract here, and created a PDF(containing code, screen shots, etc) that can be download here:

Inbox BT Search Documentation

Benefits

The BT Search allows you to overcome a number of common problems encountered in the Inbox, namely:

  • Poor performance
  • Custom Search Fields
  • Inconsistent Search Results

The typical IC WebClient Project deals with all 3 of the above problems. Poor performance is almost inherent to the standard Inbox as the database structure of the One Order Framework is extremely flexible, but complex.
If you add custom search fields to the Inbox, you must either implement filters in the AFTER_SEARCH method of BADI CRM_IC_INBOX_BADI or you must implement BT Search. Using filters is always a bad idea, as performance suffers and they lead to unexpected results.
Finally, the Inbox is used to select Interactions, Service Tickets, Follow Ups, Sales Orders, etc. All of these transactions have different customizing settings and it is sometimes impossible to align all of them in the standard Search Results. BT Search allows you to do this.

Steps

The BT Search allows you to define an Index Table in the IMG. The IMG transaction will generate the following components for you:

  • A Database Table that will be your “Index”
  • An initial load report for populating the Database Table
  • A Badi Implementation (ORDER_SAVE) used to populate the delta entries to the Index when a document is saved.

However, you will have to modify the generated Report and Badi in order to achieve the desired results.
You must also create an Implementation of Badi CRM_IC_SOS_INDEX in order to determine the Index to be used.
An implementation of Badi CRM_IC_INBOX_BADI will also be required for doing some fancy footwork.
The rest of the document will describe the required steps in more detail.

Enhancement Scenario

The enhancement described in this document caters for the following requirements:

  • An Index only for Service Tickets and Follow ups
  • Multiple Customer Specific Search Fields
  • Customer Specific Result Fields

Caveats

BT Search completely replaces the standard search. It’s a lot of work as you really end up rebuilding the entire search logic of the Inbox. The BT Search is not a simple enhancement. It needs a lot of tweaking. This document assumes that the reader has an understanding of One Order documents, their customizing and ABAP knowledge.

This document is only applicable to CRM 5.0. The BT Search functionality has changed significantly in CRM 2007 and many of the problems and solutions described here will hopefully not be encountered. I have not verified this beyond the point of looking at the customizing tables in CRM 2007.
This document does not deal with adding additional search parameters to the UI or the BOL. That is a separate topic on its own. Here we assume it has already been done.

I have not tested this Index with an Inbox containing Workflow Items or E-mails as well. Some code in this document may be incompatible with Workflow/E-mail Items, but I just don’t know.

Share and Enjoy:
  • email
  • TwitThis
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Technorati
Comments
3 Comments »
Categories
ABAP Code, IC WebClient
Tags
ABAP Code, Business Transaction Search, Inbox, SAP CRM, Web Client
Comments rss Comments rss
Trackback Trackback

My Table Mover(Part 2)

Ok, so I finally found some time to write Part 2(took me a couple of months). Part 1 of this blog only dealt with what the Table Mover program does and the broad mechanics used. In this blog I want to discuss the table download mechanism in order to explain some of the dynamic ABAP techniques used.

The first step is to get the list of database tables that need to be downloaded. I did this using a direct select of the Data Dictionary table dd02l. It may have been better to find the appropriate function module.

data: lt_tables type table of dd02l,
ls_tables type dd02l.

select * into table lt_tables  from dd02l
  where tabname in so_tab
    and as4local = 'A'
    and tabclass = 'TRANSP'.

The following variables are of importance for what is to follow:

data: lr_table type ref to data.
field-symbols: <lt_table> type standard table.
field-symbols: <ls_table> type any.

We will then loop at each table name in lt_tables and create a dynamic variable that will contain the data to be selected from the database. The statements below create this variable and can be accessed from field-symbol <lt_table>.

lv_tab = ls_tables-tabname.
create data lr_table type standard table of (lv_tab)
          with non-unique default key.
assign lr_table->* to <lt_table>.

The Create Data statement above creates a new variable with the same type as the Data Dictionary definition of the Database Table we want to select from. Then we do a dynamic SQL select into our table <lt_table>.

select * into table <lt_table>
        from (lv_tab).

The next step is to build an internal table that will enable us to download the table into a text format. In order to do this you must ensure that each field is converted first into character format. Also, we want to add our separator here.

loop at <lt_table> assigning <ls_table>.
        ls_dnl-tabname = lv_tab.
        clear: ls_dnl-content, sy-subrc, sep.
        while sy-subrc = 0.  "Map each component of the structure to a single field
          assign component sy-index of structure <ls_table> to <lv_field>.
          if sy-subrc = 0.
            lv_1024 = <lv_field>.  "This is for character conversion.
            concatenate ls_dnl-content sep lv_1024 into ls_dnl-content.
            sep = c_sep.  "Add the separator
          endif.
        endwhile.
        append ls_dnl to lt_dnl.
endloop.

My clever format conversion routine( lv_1024 = <lv_field> ) is not failsafe, and I have not tested it thoroughly, but at least it converts GUIDs, Dates and Numbers to text that will not destroy my download file.

But, the internal table lt_dnl now contains all the entries we want to download. All that remains is to download the table to the front end.

cl_gui_frontend_services=>gui_download(
      exporting
        filename                  = lv_name
        filetype                  = 'ASC'
        write_field_separator     = ' '
      changing
        data_tab                  = lt_dnl

Here is the link to the source code of the full report:

Source Code – Table Mover

Share and Enjoy:
  • email
  • TwitThis
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Technorati
Comments
No Comments »
Categories
ABAP Code, Conversion
Tags
ABAP Code, SAP
Comments rss Comments rss
Trackback Trackback

« Previous Entries Next Entries »

Navigation

  • ABAP Code
    • Business Partner
    • Conversion
    • CRM Service
    • IC WebClient
    • Middleware
  • Basis
  • Browsers
  • BSP
  • CRM
    • Interaction Centre
  • General
  • HTML
  • SAP
  • SAP CRM
    • Sales Documents

Search

Recent Posts

  • 15 Years of SMS and SAP CRM still does not support it
  • Vendors in the Sales Document
  • The Stapler Interface
  • SAP IT Service Management 7.0
  • Useful notes for Variant Configuration

RSS CONSNET

  • Forrester: Smaller SAP implementation partners sometimes the best option
  • Explore New Possibilities with our Experts at Saphila
  • Business Managers Enterprise Mobility Breakfast
  • New Positions Available!
  • First Global CRM 7.0 Solution live in South Africa
  • Shared Service Contact Centre
  • Consnet wins SAP Partner Excellence Award

Popular Posts

  • Sending mail from SAP
  • SAP CRM 7.0 Due
  • Browser Support and SAP CRM
  • SAP Salary Survey SA
  • Browser Support and SAP CRM - Part 2

Links

  • LinkedIn Profile
  • My Company – consnet.co.za

SAP

  • Getting Technical
  • martinceronio.net
  • SAP CRM Nightmare

Tech Related

  • WordPress Plugins

Categories

  • ABAP Code (12)
    • Business Partner (2)
    • Conversion (2)
    • CRM Service (1)
    • IC WebClient (5)
    • Middleware (1)
  • Basis (3)
  • Browsers (2)
  • BSP (2)
  • CRM (2)
    • Interaction Centre (1)
  • General (6)
  • HTML (3)
  • SAP (9)
  • SAP CRM (11)
    • Sales Documents (1)

Tags

Abap ABAP Code Authorizations BP Broadcast Browsers BSP Business Transaction Search Consulting CRM Customer digiata E-mail Firefox HTML Tidy IC WebClient IE6 IE7 IE8 Inbox ITS JAVA Mapping Opera Postfix Profile Parameters Salary Sales Area Sales Organization SAP SAP CRM SAP CRM 7.0 scot SMTP South Africa spam SSO2 Standards support package Tickets Web Client Web Dynpro website design Web Standards Wordpress

Archives

  • October 2009 (1)
  • August 2009 (1)
  • June 2009 (1)
  • May 2009 (2)
  • March 2009 (2)
  • November 2008 (1)
  • October 2008 (2)
  • September 2008 (7)
  • June 2008 (4)
  • May 2008 (4)
  • April 2008 (1)
  • January 2008 (2)
  • November 2007 (1)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox