
In the first parts of this weblog series I discussed basics of the ABAP package concept: package interfaces and package hierarchies and explained the benefits:
I can give the following résumé: If you want to create maintainable and evolvable software you need the ABAP package concept. I consider the package concept as the most important “new” feature of ABAP besides the web enabling (ICM and ICF) and object orientation! Unfortunately some aspects of the package concept are more complex than they should be – but don’t be afraid: There are very powerful tools that will help you too overcome problems. Now I explain how to switch on package checks and how to perform package checks as well as some pesky details.
Package checks can be performed in extended syntax check and within code inspector. There is also the possibility to check all elements of a package (and the elements of contained packages if you want) in transaction SE80. As a result you get list of package errors that you can resolve step by step guided by an explain tool and a wizard. When you resolve an error the former erroneous element changes its status so that you don’t have to refresh the whole list which might take a little bit. But before you can use the package concept you have to switch it on which is described in the following paragraph.
In AS ABAP 7.0 to 7.02 package checks are switched off by default and you have to switch it on in transparent table PAKPARAM (see OSS note 792058). There are two package check modes:
When you switch to “RESTRICTED” or “R3ENTERPRISE” the maintenance dialog for ABAP packages has two check boxes: “package check as client” and “package check as server”. The first option means that the package check will produce an error if when the package uses an object that is exposed in a package interface but declares no use access. This concept is a little bit redundant and will vanish from the UI with NW 7.31 (= AS ABAP 7.03). The mode “check as sever” is far more severe because packages have to declare use accesses and can only use elements exposed in package interfaces otherwise you will get an activation error. The activation error is very severe for usage of DDIC elements and you need a special authorization to prevent an activation error. But don’t be afraid, the transport system is not affected so they won’t be trouble if you import erroneous elements into an ABAP system. If you are interested in the details you can read it in the book ABAP Development from Scratch.
Use the check mode „R3ENTERPRISE“ only if you want to control the dependencies on the level of structure packages:
These features make sense in a larger development project: structure packages represent software components or huge applications within a huge software component – think of SAP_APPL for example that contains R/3 modules. Especially ISVs can benefit from this package concept:
Switching on package check mode “R3ENTERPRISE” has following consequences:
In my opinion the ABAP package concept is more complicated than it should be:
Luckily SAP created an explain tool that analyzes package errors and even contains a wizard that can solve package check errors.
If you want to introduce the package concept do the following:
In NW 7.10 SAP introduced a change to the package concept of NW 7.0 – I learned about it when I developed in the ABAP stack of SAP PI. This package concept is the as in NW 7.30 and you can learn about in SAP Library, you can find a lot of additional OSS note 1148288 describing migration reports RS_MIGRATE_PACKAGE_INTERFACES and SPAK_CREATE_HYBRID_PACK_DATA. If you are confused: NW 7.30 is shipped in BW and pure AS ABAP systems– don’t mix it up with NW 7.03 (= AS ABAP 7.31).
I won’t describe details of this package concept but I will give you my personal opinion:
I already mentioned that the package concept of 7.31/7.03 is the same as 7.02 and there are some small improvements from which I mention the most important: “Package Check as Client” was removed from the UI and “package check as server” is called “Package Encapsulated”. Furthermore you can customize the extended syntax check is performed during activation.
In my opinion with AS ABAP 7.31 SAP has a pragmatic package concept that is still a little bit too complicated but the explain tool makes it easy to use.
In this blog I explained how to switch on the package checks, differences between AS ABAP releases and the explain tool will guide you in case of trouble. I explained to different check modes: “restricted” and “r3enterprise”. In this next instalment of this web log series I will explain best practices, f.e. how to start with the ABAP package concept.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |