vlad-ardelean
vlad-ardelean

Reputation: 7622

Development objects not exposed in a Package Interface are still being visible from outside the package. Why?

I'm trying to learn about Package interfaces and use access.

I have 2 hierarchies of packages

1: ZAVG_TRAINING-PACKAGE1 containing
...
ZAVG_TRNG_SUBPKG3



2: ZAVG_TRNGPKG_2_STRUCT_SUBPKG_1 containing
ZAVG_TRAINING_PACKAGE2 containing
ZAVG_TRNGPKG2_SUBKPG_1

In the first hierarchy, all the packages are not main packages.
In the second, the base package is a structure package, the next is a main package and the third is a non-main package.

In ZAVG_TRNG_SUBPKG3 (in the first hierarchy), I have a view ZAVG_V_MARA and a program ZAVG_DELETE_THIS_8. I also have a package interface exposing the program, and no use accesses granted.

My problem is that from a program contained in the package ZAVG_TRNGPKG2_SUBKPG_1 I can access both the objects contained in ZAVG_TRNG_SUBPKG3 with no restrictions.

As far as I see from the documentation, in order for a development object to be visible from packages outside the current package (except the outer package). I should have to add them all to the package interface and also create use accesses for the packages that should be allowed to use that interface.

What am I doing wrong?

Upvotes: 0

Views: 1532

Answers (2)

Esti
Esti

Reputation: 3687

To manually check the package you can do it from the menu in the ABAP workbench:

enter image description here

Or by right-clicking on the object list:

enter image description here

However, as vwegert said: it is very likely that the package check is just not turned on in your system (I have not worked on a single system that had it turned on).

Upvotes: 1

vwegert
vwegert

Reputation: 18493

As long as you're not planning to build something as complex as, let's say, the Enterprise Core Components, and planning to sell it to hundreds and thousands of anonymous customers who are in the mood of suing you if you change published interfaces, I wouldn't bother with the package access control. I know that doesn't answer your question, but all you'll end up with is a lot of wasted time and no advantages whatsoever. You'll have to tweak the package structure in illogical and really counter-intuitive to get things working.

In your case, there are quite a number of things that could have gone wrong - for example, the system-wide package checking switch might be turned off. Then, you'll have to remember that the checking only ever takes place at design time and never when running the program. Finally, as far as I remember, the check is not performed automatically - you'll have to execute it either manually or using some automated tool.

Upvotes: 1

Related Questions