Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

objects not visible in package interface

EnnoWulff
Active Contributor
0 Likes
4,231

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

1 ACCEPTED SOLUTION
Read only

EnnoWulff
Active Contributor
0 Likes
2,708

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.

1 REPLY 1
Read only

EnnoWulff
Active Contributor
0 Likes
2,709

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.