‎2018 Nov 02 10:00 AM
Hi there!
I am building some applications in our SAP development system. These applications use some tools. I want to make sure that an application knows about its dependencies.
So I decided to use the package interfaces.
After I found out that I had to activate package checks system wide in table PAKPARAM and activate "Package encapsulated" (which only is visible when GLOBAL_SWITCH is set to RESTRICTED...), I had my first success:
For testing purposes I created a Report ZZDEMO_Z1 in package Z1 and a class ZCL_Z2 in package Z2. For each package I created a package interface (Z1 and Z2).
In ZZDEMO_Z1 I call a method of ZCL_Z2:
REPORT zzdemo_z1.
zcl_z2=>test( ).
When doing a package check, I get the expected error:
Object used, CLAS ZCL_Z2, is not visible
But: In my package Z1 I added the package interface Z2 in "use access":

I expected that I get an information about the use of Z2-objects in my Z1-program. Insetad I get an error.
What also confuses me: I cannot see any "visible objects" in my package:

What am I doing wrong?
thanks for any hint!
Cheers
~Enno
‎2018 Nov 02 4:44 PM
ok. thanks to tobias.trapp I am one step further:
I thought that visible objects result from the package used. It does not. I have to define exactly, which objects (service) will be exposed by the package interface.
I added CLAS ZCL_Z2 to visible elements:

and now the package test passes:

I now get an information that my code uses foreign package objects.
‎2018 Nov 02 4:44 PM
ok. thanks to tobias.trapp I am one step further:
I thought that visible objects result from the package used. It does not. I have to define exactly, which objects (service) will be exposed by the package interface.
I added CLAS ZCL_Z2 to visible elements:

and now the package test passes:

I now get an information that my code uses foreign package objects.