Skip to Content
Author's profile photo Former Member

Upgrading to SAP PI 7.1: last time ABAP saved my life

During an upgrade project (XI 3.0 to PI 7.1) my team had the need to manage a real complex scenario with more then 300 Legacy Systems defined in the System Landscape Directory.

For each environment we had to create the corresponding Business Systems in the SLD, which means 300 for the Development + 300 for the Quality + 300 for the Production, a total of 900 Legacy Business Systems.

If you are familiar with the SLD and its fast response time, you probably know that the creation of 900 Business Systems by a single person in a single life is nearly impossible..

To reduce the time needed to create all Third Party Business Systems and also to minimize the risk of errors during the manual definition we created our own tool.

Before explaining how the tool works, let me give a short introduction about the SLD and how components are defined.

The system Landscape Directory can be seen as an LDAP containing information about systems and software, every object that exists in the SLD is defined using Classes, collection of properties, and Associations, relations between classes.

For instance the class LogicalALESystem defines an Ale Logical System Name and obviously one of it’s key properties, used to uniquely identify the object inside the SLD, is the ALE Name.


The association ALESystemViewedBusinessSystem is a link between two classes, the LogicalALESystem and the LogicalBusinessSystem and its role is to associate the ALE Name to the Business System.

Associations are technically based on handles, unique references (pointers) to specific objects, for this reason, before creating an association it is necessary to gather the handles of all objects to be linked.

SLD Association

All possible classes and associations, together with their properties and key values, are defined in the SLD under the Cim Instances Area.

In order to understand which classes and associations are created while a user defines a new Business System via user interface, we created a new Business System and analyzed the change log available under SLD >> Administration >> Change Log.


During the creation the Wizard asks for the following parameters:

  • Name of the Business System (to be created)
  • Name of the Logical System Name (to be created)
  • Name of the Technical System (existing)
  • Name of the Host Name (existing)
  • Name of the Integration Server Business System (existing)
  • Name of the Group (existing)


 To Summarize, the steps for the creation of the Business System are:
 1. Validate input parameters
 2. Connect to the SLD
 3. Identify handle of existing objects needed during the following steps
   3.1.     Technical System
   3.2.     Product
   3.3.     Integration Server Business System
   3.4.     Business System Group (Collection)
 4. Create Objects
   4.1.     SAP_BusinessSystem: create a Business System instance
   4.2.     SAP_GlobalUniqueID: create a general Global Unique Identifier (GUID)
   4.3.     BusinessSystemGuid: associate the GUID to the Business System
   4.4.     LogicalSystemViewedSystem: associate the Technical System to the Business System
   4.5.     SAP_LogicalALESystem: create the Logical System Name
   4.6.     SAP_ALESystemViewedBusinessSystem: associate the Logical System Name to the Business System
   4.7.     SAP_InstalledProductLogicalApplicationSystem: associate the Product to the Business System
   4.8.     SAP_BusinessSystemExchangeServer: associate the Business System to the Integration Server
   4.9.     Modify SAP_BusinessSystem (add Role):  add the Role “Application System” to the Business System
   4.10. SAP_CollectedBusinessSystems: associate the Business System to the Group


Additionally, the tool has to implement a transactional behavior so that the creation of the business system is never partial but always fully completed or rolled back.

Unfortunately, there is no way to create all objects and give a final commit or rollback also because in order to create an association, all objects linked by the association must exists in the SLD. For this reason every time an object is created, the reference (handle) to the object is stored in an internal table and in case something is wrong during the procedure, all objects previously created are deleted from the SLD.


Here you can see a sample ABAP report that following the procedure described above, creates a Business System with the parameters specified.


And this is the result of the execution directly on the SLD

New Business System

It’s easy to imagine how to create a report that taking a csv file containing the parameters for several Systems  and reusing the functionalities described above, creates all the Business Systems in the SLD.

You can find the complete source code of the application here.


As a kind of Appendix I would like to list all the tools and utilities that allowed us to reduce the effort of tasks that are necessary in all upgrade/system copy and that normally require a lot of time:

Assigned tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Michal Krawczyk
      Michal Krawczyk
      Hi Sergio,

      many batch tools for PI/XI can be developed
      using this new ID API (available for 7.0 too)
      as far as I know this API was introduced just
      because of that (as some clients - like EDI brokers -  have even
      thousands of ID objects that need to be configured so manual work is out of the question)

      in your projects did you also have to configure
      those 300 BS in ID ? did you write something
      for that too?

      Michal Krawczyk

      Author's profile photo Former Member
      Former Member

      ID API is for Directory Objects but not for SLD objects. I just wondering why should the SLD content (BS, TS etc) not be exported and imported into the new PI7.1 SLD ? You should have the same GUID after import.

      best regards,

      Author's profile photo Former Member
      Former Member
      Hi Hai,
      sorry for the late reply.

      Your concern is right, in fact you could reuse contents from the old SLD, unlink all business systems from the original integration server, assign the new one and reconfigure all transport target (which anyway is not a quick task).

      Unfortunately it is not always possible, for instance because you want to leverage the upgrade project to clean the SLD and get rid of old dirty objects (quite typicall in big installations running since a long time) or because the naming convention of Business Systems (unfortunately) includes the SID of the Integration Server and changing the Integration Server it is necessary to adjust all the Business System Names.

      Beside the particular requirement, for my experience it is not  so unusual to have the need to create a bunch of Business Systems at the same time (e.g. a new PI comes in the landscape for No Regression Test or a new Pre-production system), and I think tools like this could avoid a big waste of time.

      Kind Regards,

      Author's profile photo Former Member
      Former Member
      Hi Michal,
      it was not necessary to rebuild Business Systems in ID because all ID objects were correctly created once we imported change Lists from the productive landscape (the corresponding transport targets were already set).

      Regarding ID Web Services, if I am not wrong they are available since XI 3.0 SP21, and the idea was to allow massive operations  as well as put the basis for enabling publish & subscribe scenarios. I think they are definitely usefull, especially when you need to manage a lot of Communication Channels.

      Unfortunately, as far as I know, there is nothing available to work with Repository and SLD, the only apis available are the function modules i used in my report.

      In general the problem I see is that there is a set of basic functionalities available but you always have to create your tools from scratch, there is nothing already delivered with the standard.

      It would be nice to have such kind of tools as part of the standard, maybe starting from a community project 🙂


      Author's profile photo Liang Ji
      Liang Ji

      Could it be possible to record a BDC session, so that all the paramters needed can be maintained in a flat file, uploaded in one session ?


      Author's profile photo Former Member
      Former Member
      Hi Liang,
      yes, for sure it is possible, even if I would suggest to extend the report and call the form create_3rd_party_bs inside a loop.