Modifying SAP Objects

Objectives

After completing this lesson, you will be able to:
  • Explain the difference between an original and a copy and the consequences for transport tasks
  • Explain the process flow for modifications

Creating and Modifying Objects

Repository objects should only be changed in their original system. An object is the original in only one SAP system: the SAP system where it has been created. All other SAP systems may only contain copies of the object. This ensures that changes to repository objects are only made in the respective development system.

When a repository object is transported to a subsequent SAP system, it exists there as a copy. Changes to copies, which are referred to as repairs, should be made only in exceptional cases. In all customer SAP systems, including the customer's development system, SAP-delivered repository objects are copies. The original of those objects exists at SAP in the development system. Repairs to SAP objects are referred to as modifications.

Note

The system change options (in transaction SE06) control which repository objects can be modified in the SAP system. Only in the development system, the system change option should be set to permit changes to customer-developed objects and, if necessary, SAP objects.

When changing a copy, a Repair flag is set for this object to prevent the object from being overwritten by imports into this SAP system before the assigned transport request has been released. The object is locked exclusively in a task of type Repair.

Classification of Tasks and Transport Requests

A distinction is made between two types of development tasks: development/correction, that is changes in the original system, and repair, that is changes in an SAP system other than the original system.

The package of the repository object determines whether the transport request type is transportable or local. If the assigned package is assigned to a valid transport layer, that is, a transport layer which is assigned to an existing consolidation route, a transport request of type transportable is used. Otherwise, a local transport request is used.

Objects saved as local objects cannot be transported. The only way to transport such an object is to assign it to another package: one that has an existing transport layer assigned.

Therefore, the package of a repository object determines whether a transport request of type Transportable or Local is required.

There are transportable and local workbench requests, depending on the package assignment of the objects inside. They may contain the following three types of tasks:

  • Tasks of type Unclassified have empty object lists.
  • Tasks of type Development/Correction contain originals.
  • Tasks of type Repair contain copies.

Changing SAP Objects

Before starting a modification, you should ask if it is really necessary to modify the standard programs or if an enhancement can also be done by means of SAP extension techniques (for example, BAdI, appends, user exits, enhancements). Note that the modification may have to be adjusted if SAP delivers this object in a newer version, for example, in an SAP Support Package or during a release change. That will cause additional effort for maintaining the modification.

Before changing any repository object (customer and SAP objects), you have to be registered as a developer in SAP Software Change Registration (SSCR). In case you want to perform a modification (SAP standard object), you have to register each SAP object that you intend to change as well. Registering the object gives you an access key which you apply to the object.

In SAP S/4HANA Server systems, these keys are not necessary. For details, see SAP Note 2309060 – The SSCR license key procedure is not supported in SAP S/4 HANA. For general information concerning these keys, see SAP Note 2501703 – Frequently asked questions about SAP Software Change Registration (SSCR).

When performing a modification, the Transport Organizer prompts you for a transport request in the same way that it does when you make changes to customer-owned objects. Because the object is not an original in your SAP system, it will be assigned to a task of type Repair.

All SAP repository objects are assigned to SAP-defined packages. All new customer repository objects must be assigned to a customer-created package. Packages are used to group objects in the project and transport them along the same transport route.

When the developer releases the task of a transport request, the lock on the object is transferred to the transport request.

At the end of the project development, the transport request is released. This releases all locks and records a version of the changed objects, both SAP and customer objects, in the version database.

Perform the first exercise of this lesson with program ADM325X01.

To support the different levels of modification, SAP provides tools such as the IMG, Business Add-Ins (BAdIs), transaction CMOD (Project Management of SAP Enhancements), and the ABAP development environment.

The Modification Assistant helps you to modify SAP standard delivered objects and to simplify the modification adjustment. When you change SAP objects in an ABAP Workbench editor, you branch into a special modification mode. Originals are initially protected in this mode and are only changed when you click the corresponding buttons (see the figure above).

The Modification Assistant logs all modifications that are made to the object. The log is easy to read and dramatically reduces the amount of effort needed for a modification adjustment.

In addition, the Modification Assistant works with the most commonly used ABAP development tools such as ABAP Editor, Screen Painter, Menu Painter and Text Elements maintenance.

The Modification Assistant is not used for changes made to dictionary objects, objects such as global interfaces and classes and their components. These objects need to be adjusted manually during modification adjustment.

A list of all modified objects in the SAP system can be shown with the Modification Browser (transaction SE95).

If a new version of a modified SAP repository object is imported into the customer SAP system, as part of an SAP Support Package or an SAP system upgrade, adjustments must be made to the modified SAP object.

Before applying an SAP Support Package or SAP enhancement package or performing an SAP system upgrade, all open repairs must be confirmed and released. This check is performed by the update / upgrade check routines of the SAP Support Package Manager / SAP Software Update Manager.

To adjust the ABAP Dictionary repository objects, use transaction SPDD. To adjust other repository objects, use transaction SPAU.

Caution

Th adjustment of modifications is neither automatic nor trivial. Customers must decide which development efforts and modifications they wish to retain, bearing in mind that the new SAP functions may quite possibly make retaining the modification unnecessary.

Modify SAP Objects

Business Example

During the implementation process of SAP software, you may be required to make changes to standard SAP repository objects to fulfill the requirements of your business. The Modification Assistant is a tool delivered with the SAP system to aid you in making the modifications for programs as well as helping with a future modification adjustment.

## represents the group number the instructor has assigned to you.

Task 1: Modify a Program

In the development system, modify the SAP program ADM325X##.

Steps

  1. Log on to the development system S4D, development client 100. You will be modifying the ABAP program ADM325X##. Which package does this object belong to? Which SAP system is the original system?

    1. Log on to the development system using the credentials that your instructor provides.

    2. Start the ABAP Editor (transaction SE38). Enter the name of the SAP program, ADM325X## and choose GotoObject Directory Entry.

      • The Package for this object is ADM325.
      • The Original system can also be seen here in the object directory entry: it is SAP. This means that the repository object was developed by SAP. In your development system, the repository object is a copy, not an original.
    3. Choose Continue to go back to the initial screen of the ABAP Editor.

  2. The program ADM325X## currently displays transport request sorted by the transport request number. You would like to see the transport requests sorted by author. Therefore, modify line 38 of the source code of this program, which reads:

    ORDER BY STRKORR TRKORR.

    so that it now reads:

    ORDER BY AS4USER STRKORR TRKORR.

    For all modifications, use the Replace function of the Modification Assistant. Save and activate your work to one of your transport requests. What type of change was created? Execute the program ADM325X##. View the repair flag. Finally, release the task of the assigned transport request.

    Hint

    Either modify the program as described here or perform any other modification you want. For example, just add a write 'hello!'. line. The main thing is that you modify the program.

    1. In the ABAP Editor (transaction SE38), enter the name of the SAP program, ADM325X##, select Source Code, and choose Change.

    2. Read the information in the next window about the repair of objects and confirm it with Continue (Enter). If there is an information window about the usage of the Modification Assistant confirm it with Continue (Enter), also.

      Hint

      Because this object is owned by SAP, normally you would be required to enter an object key for this object. For the purposes of this class, you will not be prompted for an object key for this object, however. See SAP Note 2309060 – The SSCR license key procedure is not supported in SAP S/4 HANA for details.
    3. Select line 38 of the coding and choose (More) Replace from the application toolbar.

    4. In the newly created line of code, change the code to ORDER BY AS4USER STRKORR TRKORR.

    5. Save and Activate your changes. When prompted, use the value help to record your changes in a transport request which is assigned to your CTS project.

      Hint

      Because the original system for this program is SAP, this type of change is considered a repair so that the Modification Assistant can control the changes performed to the object.

    6. To view the repair flag, back in the ABAP Editor: Modify Report ADM325X## screen, from the menu, choose GotoObject Directory Entry. The object directory entries display. To view all attributes including the Repair flag, choose the Object Attributes icon.

    7. Close the dialog boxes.

  3. Release your task.

    1. To release your task, switch to the Transport Organizer (transaction SE09). Display the modifiable transport requests and tasks assigned to your user.

    2. Expand the folder structure of your transport request in which you have recorded your changes, select your task, and choose (More) Release Directly from the application toolbar.

      Caution

      Do not release the transport request yet.

Task 2: Modify an ABAP Dictionary Object

In the development system, modify the table definition for table ADM325X##.

Steps

  1. Enter the table definition for table ADM325X##.

    1. If you have not yet already done, log on to the development client in the development system using the credentials that your instructor provides.

    2. To display the structure of table ADM325X##, start the transaction SE11 for maintaining the ABAP Dictionary.

    3. Enter Database tableADM325X## and choose the Change button. You may need to confirm a pop up with Continue.

    4. In case of being asked, decide to maintain the table in logon language.

  2. Add the field ZZBIRTHPLACE to the table ADM325X##. Assign the data element GBORT to this field.

    1. When in change mode in the ABAP Dictionary, to add a new field, place your cursor on a blank line and enter the field name ZZBIRTHPLACE.

      Hint

      Depending on the log on language, you may need to enter a Short description first.
    2. In the Data element field, enter GBORT. Press Enter.

  3. Save the changes to the table ADM325X## to a new task within the same transport request that you have used in the previous task of this exercise. The SAP system automatically prompts you for a new task. Activate the table.

    1. Save your changes.

    2. When prompted, select the transport request from the previous task and choose Continue. Confirm the pop up that a new task within the same transport request you have used for the previous task will be created .

    3. To activate the table, choose Activate from the application toolbar. Once activated, the status Active displays for the table.

  4. Fill the table ADM325X## by adding a new entry.

    1. To add an additional table entry, choose UtilitiesTable ContentsCreate Entries from the menu or use the Data Browser (transaction SE16). Make an entry in all fields.

    2. Save your entry.

  5. Which TMS configuration setting ensures that modifications to SAP objects are transportable?

    1. All SAP repository objects are assigned to a package with the assigned transport layer SAP. In your SAP system landscape, there is a consolidation route that is assigned to the transport layer SAP. The consolidation route points from the development system S4D to the quality assurance system S4Q (in this case: via the transport target group /S4Q/).

  6. Release your task.

    1. Switch to the Transport Organizer (transaction SE09). Choose Display to display the modifiable transport requests and tasks assigned to your user.

    2. Expand the folder structure of your transport request that you have selected in a previous step, select your task(s) and choose (More) Release Directly from the application toolbar.

  7. Release the transport request.

    1. Select your transport request and choose (More) Release Directly again.

Log in to track your progress & complete quizzes