Dear all,
we dared to switch on the package check in check mode
“R3ENTERPRISE”. Doing this, we struggled with visibility of SAP objects w/o appropriate package interfaces.
Example:
Assuming you have the following package structure:
- An own Z-Structure package, beneath a
Could look like this
Inside the Z-development package, you wan to use the data element /SCDL/ADF_CHK_ARCH in a program. Running a package check for your program leads to several errors:
- Used object from external structure package not visible
- The object DTEL /SCDL/ADF_CHK_ARCH is not exposed in package interfaces.
First error, is because of a missing / useable package interface on structure package level in package /SCWM/COMMON_CORE_STRUC, second error occurs as package /SCDL/ADAPTER_DF is encapsulated.
Looking at the package interfaces /SCWM/COMMON_CORE_S4APPL_ESIF seems to be made for re-usage of the objects in other applications.
But unfortunately, /SCWM/COMMON_CORE_S4APPL_ESIF has a restriction of client packages. So we cannot reuse it.
Solution for that create an
own package interface for the SAP structure package level and its sub packages to grant visibility in your Z-Packages, from structure to development package.
- /SCWM/COMMON_CORE_STRUC: Structure package
- /SCWM/STRUCTURE: Structure package
- /SCDL/MAIN: Main package
- /SCDL/ADAPTER: Development Package
- /SCDL/ADAPTER_DF: Development Package
How to create a PIF for a SAP package.
- Go to SAP Package
- Right click on package and choose "Create->Package->Package Interface"
- Fill the Name (Your Namespace), description and Type (default Standard Package Interface). Do not change the Package here
- Confirm
- And now the magic occurs and you can assign the PIF to your own package.
|
For in the given example you have to execute the following steps
- Create a package interface for each SAP package; from SAP structure package down to SAP development package.
SAP Package |
Example PIF |
/SCWM/COMMON_CORE_STRUC |
ZSCWM_COMMON_CORE_STRUC |
/SCWM/STRUCTURE |
ZSCWM_STRUCTURE |
/SCDL/MAIN |
ZSCDL_MAIN |
/SCDL/ADAPTER |
ZSCDL_ADAPTER |
/SCDL/ADAPTER_DF |
ZSCDL_ADAPTER_DF |
- Add development object, in this example DTEL /SCDL/ADF_CHK_ARCH, to the visible elements (TAB Visible Elements) of your PIF ( e.g. ZSCDL_ADAPTER_DF) for the SAP development package interface.
- Add visibility (TAB Visible Elements) to your PIFS of the superordinate SAP packages up to top SAP structure package using button "Add Package Interface".
- Add your PIF of the SAP structure package to your structure package for your own developments (TAB "Use Accesses", "Create").
- Add this PIF to your sub packages (TAB "Use Accesses", "Copy from Superpackage").