Resolved deliveries - automated audit before release of a transport order
This uses the Classic BAdI CTS_REQUEST_CHECK
SAPEX provides an implementation for it that leverages Kiuwan audits to check that the source code in the transport order to be released satisfies quality / security constraints.
Such an implementation will:
- Extract source code for objects in the transport order.
- Run the analysis with Kiuwan Local Analyzer.
- Check that the audit checkpoints passes.
- Cancel the release when the audit does not pass.
To use it, you must follow the two steps:
Registration of SAPEX Implementation
A candidate implementation for the CTS_REQUEST_CHECK is provided in the ZCL_IM_KW_BADI_REQ_CHECK.
For registration,
- Open transaction SE19.
- In the Create implementation section, choose under Classic BAdI the CTS_REQUEST_CHECK.
- Click Create.
- Give ZKW_BADI_REQ_CHECK an implementation name (so the generated implementation class will be named ZCL_IM_KW_BADI_REQ_CHECK)
- Replace the source with the one in the provided ZCL_IM_KW_BADI_REQ_CHECK.abap codes.
- Click save.
Activation of SAPEX Implementation
- Open transaction SE19.
- Choose Edit Implementation and Classic BAdI Implementation, specifying ZKW_BADI_REQ_CHECK.
- Click Change
- Click the Activate icon
Automatic analysis before releasing a Change Request
Once activated, the automatic Kiuwan analysis is triggered as soon as a CR is to be released. The process can be depicted as follows:
- Source code associated with CR is downloaded
- Download directory is <DIR_HOME>/sape4k/code/<CR_ID> (you can use the AL11 transaction to inspect the DIR_HOME value)
- In Linux,typically /usr/sap/<SAP_SID>/D<Instance_Number>/work
- In Windows, change / by <drive>:\
- Under <DIR_HOME>/sape4k/code/<CR_ID>, there will be a directory for every SAP Package involved in the CR
-
Important: Only Active objects will be exported and analyzed
- Download directory is <DIR_HOME>/sape4k/code/<CR_ID> (you can use the AL11 transaction to inspect the DIR_HOME value)
- For every SAP package contained into the Request/Task, a Kiuwan analysis is executed:
- Using SAP package name as Kiuwan application name (-n <SAP_package_name>, see Kiuwan Local Analyzer CLI - Command Line Interface)
- Using <DIR_HOME>/sape4k/code/<CR_ID>/<SAP_Package_Name> as source dir ( -s <DIR_HOME>/sape4k/code/<CR_ID>/<SAP_Package_Name>)
- Using CR description plus SAP package as a Kiuwan analysis label (-l <CR desciption-Analysis label>)
- The analysis is executed as a Partial Delivery (-as partialDelivery)
- The analysis will use Request/Task ID as Kiuwan Change Request name (-cr <CR_ID>)
- The delivery will be marked in Kiuwan as Resolved (-crs resolved)
- the analysis will wait for the results (-wr) from the Kiuwan cloud (i.e., it will be blocked until the cloud analysis finishes)
- The process will analyze every SAP package unless an unsuccessful return code is received (ret code != 0)
- In case of an unsuccessful analysis (ret code != 0), the release does not proceed and a window is displayed with the message
- Bear in mind that a special case is when the Audit associated with the analysis of a package fails. This condition will stop the release process.