How to Create a Package in SAP ABAP

In this tutorial, we will see what is Package in SAP ABAP, Why we create a package in SAP ABAP.

Also, we will discuss how to create a package in SAP ABAP practically in a quick way.

Check out: How to Create Lock Object in SAP ABAP?

What is Package in SAP ABAP?

  • The reason for storing it under a particular package is to transport the data from one location to another to avoid data loss.
  • In a real-time example, consider if we are having 4 books that are supposed to reach our internals in college through our friends. In this case, the chances of missing a record are highly possible, for this we are putting all 4 books in one bag and keeping one tag above the bag, and naming it with a particular name so that it will reach the destination perfectly.
  • Similarly, data should move from one location to another and notify the project manager it has reached its destination safely.
  • The package name always starts with Z. If we don’t want our own packages, temporarily we can store or save it in the local object. The local object symbol will be similar to the dollar symbol.
  • While creating the packages in SAP ABAP, we have to give TR requests which means transport requests. Transport requests are moving from the development server to the quality server.

Why we Create a Package in SAP ABAP?

Creating packages is to store the development object. In SAP ABAP, development object means program development, screen designing, and development of data dictionary and smart forms, for this we have to store under particular packages.

Also, Read: How to Create Table in SAP ABAP [With Columns]

Step-by-Step Method to Create a Package in SAP ABAP

Let’s see how to create a package in sequential steps.

Step-1

  • Type se21 on the SAP ABAP main page and click enter to create a package in the SAP ABAP.
Tcode for creating package in SAP ABAP

Step-2:

  • Now, the initial screen for the package will open. Give the package as per the user’s wish or needs but it should start with Z and click Create. Here I have taken ZEMP_P where P is for the package since it is not mandatory. I have given this for my reference.
Package name in SAP ABAP

Step-3:

  • The Create Package page will appear. Fill the fields with a short description as Employee Package, application component as AP, and transport layer as SAP. Since the transport layer is mandatory to provide else we will face an error and finally click the tick mark at the end to create a package.
Package creating in SAP ABAP

Step-4:

  • In this step, the TR request number will be created automatically. It is like a unique number generated by the SAP and click the tickmark to proceed with the next step.
TR request in SAP ABAP

Step-5:

  • The package will be created in the name we choose. It will be visible for us to see the word Saved beside the package name and the created date, and the person responsible.
Package Created in SAP ABAP

This is the standard method to create a package in SAP ABAP.

Have a look: Operators in SAP HANA Cloud

How to View Newly Created Packages in SAP ABAP

To see the recently created packages in SAP ABAP, follow the below procedure.

  • Go to the SE21 transaction code through the search bar, type your package name, and click Display then your package will be displayed on the screen.
View package in the SAP ABAP
  • In the next step, Display Package will appear with our package name, short description, created by, and created date.
View Package on SAP ABAP

In this way, we can view the package created in SAP ABAP.

How to Delete Packages in SAP ABAP

Below are the steps to delete packages in SAP ABAP. If you don’t want to exist the particular packages, then we have the option of deleting them in SAP ABAP.

Step-1:

Go to the SE21 transaction code through the search bar type your package name, right-click on the package name, and click Delete from the list of options.

Delete Packages in SAP ABAP

Step-2:

In this step, it will ask for the confirmation of the deletion of packages. Click Yes if you want to delete else give NO.

Package Deletion in SAP ABAP

This is the method to delete the package in SAP ABAP.

Check Post: How to Install ABAP Development Tools

What Happens When We Try to Change the Package Name?

Let’s check with the below points what happens when we try to change the package name in SAP ABAP.

  • Go to the SE21 transaction code, type your package name, and click Change to change the package name.
Change Package Name in SAP ABAP
  • Once you click change, the change package page will appear then click on the Change option beside the Super package and give the package name you want to change then click tickmark.
Change Package in SAP ABAP
  • Now the display message will be pop-up that we can not change the package in SAP ABAP.
Display message in Package changing in SAP ABAP

This is how we have to try changing the name in the package in SAP ABAP.

Additionally, you may like some more SAP tutorials:

Conclusion

This tutorial clearly explained creating packages, displaying, deleting, and changing in SAP ABAP. Below are the topics we covered in this tutorial.

  • Why Create a Package in SAP ABAP
  • What is the package in SAP ABAP?
  • A step-by-step method to create a package in SAP ABAP
  • How to view newly created packages in SAP ABAP
  • How to delete a package in SAP ABAP
  • What happens when we try to change the package name?