Understanding Software Structure and Logistics

Objective

After completing this lesson, you will be able to create an ABAP package.

ABAP Package

Organizing Development

When you create a development object in the ABAP environment, you must assign it to a package. Packages are development objects that serve as containers for all of the development objects that logically belong together. Each package is also assigned to a software component. The complete set of development objects in the system is referred to as the ABAP Repository. Consequently, development objects are also often called repository objects.

Note

Development objects such as packages are organized using namespaces. Namespaces ensure a clear separation between SAP standard objects and customer or partner developments. Customer developments must be created in the customer namespace, which starts with Z or Y. This means that the first letter of the name of a development object, such as a package name, must be Z or Y. Customers and partners can also request their own namespaces from SAP. The names of the development objects are then prefixed with /<namespace>/. The namespace concept prevents name conflicts and protects customer code during upgrades and updates.

You develop your applications in a development environment, but must then ensure that they can be tested in an appropriate test environment before being moved on to the production environment. Typically, you will have a single global account and a subaccount for each of the development, test, and production environments. Software components allow you to transport your objects.

Transport Request

When you create a new development object or change an existing one, you must assign it to a transport request. Transport requests ensure that all development objects that logically belong together are transported together into the test, and subsequently the production system.

Each transport request has an owner, and the owner can assign other users to the request. In this way, transport requests support team development.

When an object is included in a transport request, it is locked. This means that it can only be edited by a user who is assigned to the same request.

When work on all of the objects in the request is finished, all of the developers assigned to it must release their work. After this, the owner of the request can release the entire request. The system administrator can then import it into the test system for testing.

When you release any kind of transport request, the system releases the locks on the objects in the request, so that any developer can access them again.

To learn how to create a package, refer to the demonstration, How to Create an ABAP Package.

How to Create an ABAP Package

Create an ABAP Package

In this exercise, you first add package /LRN/S4D400_EXERCISE to the list of Favorite Packages. You then create a new package under the superpackage ZSTUDENTS (suggested name: ZS4D400_## where ## is your group number).

Note

This package will be the home for all development objects that you will create in this course.

Your new package should have the following attributes:

AttributeValue
NameZS4D400_##, where ## is your group number
DescriptionMy ABAP Package
Add to favorite packagesChecked
SuperpackageZSTUDENTS

Steps

  1. Add package /LRN/S4D400_EXERCISE to the list of Favorite Packages.

    1. In the Project Explorer on the left, expand your ABAP Cloud project.

    2. Right-click Favorite Packages and choose Add Package....

    3. In the search field, enter /LRN/S4D400.

    4. From the list of matching items, select /LRN/S4D400_EXERCISE, then choose OK.

  2. In your ABAP Cloud project, create a new package with the attributes listed above. When you are prompted for a transport choose the transport request in which you are involved. If no transport request is listed, create a new request.

    1. In the Project Explorer, right-click on your ABAP Cloud project and choose NewABAP Package.

    2. Enter the package name ZS4D400_## where ## is your group number.

    3. Enter the description My ABAP Package.

    4. Mark the checkbox Add to favorite packages.

    5. Enter the superpackage ZSTUDENTS.

    6. Choose Next.

    7. Ensure the Software Component is set to ZSTUDENTS.

    8. Choose Next.

    9. Check if there is a transport request listed under option Choose from requests in which I am involved. If this is the case, choose this option. If the list is empty, choose the option Create a new request and enter a request description, for example ABAP Exercises.

    10. Choose Finish.

  3. Ensure that your new package has been added to the Favorite Packages.

    1. In the Project Explorer on the left, expand your ABAP Cloud project and then sub node Favorite Packages.

    2. Make sure your own package, ZS4D400_##, is listed here. If not, add it like you added package /LRN/S4D400_EXERCISE earlier.