Contents: Related pages: |
To analyze ABAP code in Kiuwan, source code and information from SAP system need to be exported previously to be analyzed by Kiuwan.
Once source code is exported, Kiuwan lets you to implement two different approaches on the location where the ABAP code is analyzed.
Depending on your approach, installation takes different steps. We will use terms "local" and "remote" for specific installation steps, and "both" for common (mandatory) steps. |
SAPEX installation files are contained in Please visit Installation and Network Configuration for further help on Kiuwan Local Analyzer. |
The following table lists contents of sapex_abap_code.zip
File | Behaviour | Notes |
---|---|---|
Programs: | ||
ZKW_SAPEX_CODE | Export source code | Exports to local or remote directory |
ZKW_SAPEX_METADATA | Export SAP information | Exports to local or remote directory |
ZKW_ANALYSIS | Analyzes source code (after optional previous export) in SAP system | |
RFC-enabled Function modules: | ||
ZKW_SAPEX_CODE_RPC | Export source code | Needed by sapexCode.xml remote script |
ZKW_SAPEX_METADATA_RPC | Export metadata | Needed by sapexMetadata.xml remote script |
ZKW_SAPEX_LOADFILE_RPC | For downloading an exported file | Needed by sapexCode.xml remote script |
ZKW_SAPEX_RMDIR_RPC | For removing directories where source code is exported | |
ZKW_SAPEX_RMDIR_CHECK | Security check for RMDIR calls | |
Classes: | ||
ZKW_CL_*, ZKW_CX_* | Support classes | Add them using class builder or Eclipse ADT |
ZCL_IM_KW_BADI_REQ_CHECK | Implementation BAdI for CTS_REQUEST_CHECK | Sample BAdI for automated audit before release of a transport request |
|
Using the Class Builder (transaction SE24) in source code mode, create and activate all the |
Using the ABAP Editor (transaction SE38), create |
Using transaction SM69, create the following OS commands:
|
Used for creating directories in the SAP system:
mkdir -p <dir>
for Unixmkdir <dir>
for Windows
Note: The command configured must create all intermediate directories.
Used for deleting a directory and all its contents in the SAP system:
rm -rf <dir>
for Unixrmdir /s /q <dir>
for Windows.
For ensuring that a proper rmdir command is selected, register the ZKW_SAPEX_RMDIR_CHECK for avoiding security issues. This ensures that the command is one of the allowed RMDIR commands, and that the target directory is either sapex code or metadata directories, or a raw subdir under these directories.
|
The result of creating the commands should be similar to the following:
In case you decide to use the local approach:
|
It is recommended to use a <DIR_HOME>/sape4k/kla
directory for the Kiuwan Local Analyzer.
Used for launching the Kiuwan Local Analyzer script. This OS command will be used by |
Use :
<PATH_TO_KLA>/bin/agent.sh
(Unix), or <PATH_TO_KLA>\bin\agent.cmd
(Windows) as the name of the 'Operating System Command' parameter in transaction SM69.
For running the SAPEX scripts from a remote host (where KLA is deployed), the
|
Remote scripts use SAP JCo Connector to remotely connect to SAP server.
SAP JCO Connector must be installed in the remote containing the SAPEX remote scripts that will execute the Kiuwan Local Analyzer.
Remote scripts use SAP JCo Connector to remotely connect to SAP server.
|
You may download SAP JCo from SAP Service Marketplace Connectors - you need service-marketplace access for it.
Once you have downloaded the corresponding package for your operating system, install it.
file | platform |
---|---|
sapjco3-ntintel-3.0.8.zip | for a 32-bit JRE running on a 32- or 64-bit AMD or INTEL x86 or a 64-bit INTEL Itanium processor |
sapjco3-ntia64-3.0.8.zip | for a 64-bit JRE running on a 64-bit INTEL Itanium processor |
sapjco3-ntamd64-3.0.8.zip | for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor |
Before installing JCo, please install the latest Microsoft Visual Studio 2005 C/C++ runtime libraries, as described in note 684106.
To install JCo for Windows unzip the appropriate distribution package into an arbitrary directory sapjco3-install-path
.
Do not copy the sapjco3.dll in the WINDIR\system32
nor into the WINDIR\SysWOW64
directory. This will break the operability of other JCo versions that are already installed on the same system. Furthermore, you would risk that the current installation also would not work anymore if the sapjco3.dll gets replaced in the respective Windows system directory in the future.
file | platform |
---|---|
sapjco3-linuxintel-3.0.8.tgz | for a 32-bit JRE running on a 32- or 64-bit AMD or INTEL x86 processor |
sapjco3-linuxia64-3.0.8.tgz | for a 64-bit JRE running on a 64-bit INTEL Itanium processor |
sapjco3-linuxx86_64-3.0.8.tgz | for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor |
sapjco3-linuxppc64-3.0.8.tgz | for a 64-bit JRE running on a 64-bit PowerPC processor |
sapjco3-linuxs390x-3.0.8.tgz | for a 64-bit JRE running on a 64-bit IBM eServer zSeries processor |
To install JCo for Linux, copy the appropriate distribution package into an arbitrary directory sapjco3-install-path
. Next, change to the installation directory:
cd sapjco3-install-path
and extract the archive:
tar zxvf sapjco3-linux*3.0.8.tgz
The last step is to configure the scripts used for the scripts in KLA for remote extraction.
The last step is to configure the scripts used for the scripts in KLA for remote extraction. Scripts for extracting source code (
You can find configuration files at $(AGENT_HOME)/conf/sapex directory of your Kiuwan Local Analyzer installation directory. |
As an alternative, you may use the extractor programs provided in SAP system, and then either transfer the results to the system where the KLA is deployed, or directly run the KLA in the target SAP system (in particular, when an automated audit should be performed before releasing a transport request/task).
Please note that the extraction programs for code / metadata allows you to specify a local directory (in the user host) where exported contents will be saved.
If extract operations will be performed manually, remote extraction scripts are not needed.
Please visit SAP Extractor- Remote use - Appendix Configuration Files for further information.
Once completed, you may test the installation:
You may run the run the extraction programs in SAP to check if programs and their dependencies are active.
If the remote sapex was configured, run command line scripts to ensure that the connection properties and extraction filters work.