Introduction
The Focused Build standalone extension 'Cutover Checks and Post Cutover Activities' was introduced several years ago. Besides the Cutover Checks it also provides a set of activities to ensure seamless synchronization of changes between implementation and corresponding maintenance landscapes. Users can create and import Transports of Copies (ToCs) for each system within the maintenance landscape directly from the cutover system.
ST-OST SP13 has brought improvements to these activities. Nonetheless, it can still happen that an activity does not meet your requirements fully or lacks a particular feature. In such situations, users can easily develop and integrate their own activities to enhance or replace the existing ones.
This blog post will illustrate this process using a practical example, focusing on the necessary BAdIs implementation and the customization required for the new activity.
Theoretical Framework
Before looking at the example, I'd like to explain some basic knowledge: cutover checks and post-cutover activities are available for implementation cycles. If you use the business role /SALM/SM_PRO - Solution Manager ITSM, the assignment block for Cutover Checks and Post-Cutover Activities is displayed if the cycle is assigned to a branch other than the maintenance branch. The system automatically determines the related maintenance landscape based on the production system, where the cutover system is the first common system in both the implementation and maintenance landscapes.
These activities are designed to be executed after the cutover, taking into account the transports of the current cycle that have been imported into the cutover system. You can start one activity for a system at a time, but as long as there are no dependencies, they can run them in parallel.
Cutover supports various combinations of implementation and maintenance landscape. The different scenarios are listed in the Focused Build Configuration Guide, whereas the cutover from the project landscape takes place
1. into the productive system of the maintenance landscape
2. into the pre-production system of the maintenance landscape.
3. into the development system of the maintenance landscape and repack needs to be done after the cutover.
4. into the development system of the maintenance landscape and the changes are then transported through the maintenance landscape to the production system
Synchronization and import activities are available for systems preceding the cutover system, so they are needed for scenarios one and two.
My used landscape is like the fourth scenario, which means using the default configuration will only have the activity "Logon to System" available for the systems in the maintenance landscape, as they are completely after the cutover system.
Implement the activity's execution
The objective is to develop a new activity for the cutover system that will identify the transports that have been imported there and write them in the application log. The first step is the implementation of the execution part.
Navigate to the IMG node: SAP Solution Manager -> Focused Build -> Change Control Management Extensions -> Cutover Management -> BAdI: Post-Cutover Activity. Here, you can find the existing implementations of the BAdI Definition /SALM/CHARM_PCA_EXECUTION. You can also create new implementations.
After selecting the "Create Implementation" button, adhere to the displayed instructions to create the enhancement implementation and the BAdI implementation. The outcome will be an enhancement implementation that includes an implementation of the BAdI definition /SALM/CHARM_PCA_EXECUTION.
The subsequent step is adding a unique filter value, which is important later when the activity will be customized.
Following this, the creation of the method implementation /SALM/IF_CM_PCA_EXECUTION~EXECUTE_ACTION within the designated implementation class is required. For guidance, you can have a look into class /SALM/CL_IM_PCA_DEF_EXECUTION. The determination of the transport requests or the writing of the application log are already implemented there.
Add a popup to the activity
Dialog boxes can be helpful to guide users through activities, such as confirming whether to proceed with an action. An example of this is the activity "Synchronize Deployment (TOC to buffer)" , which prompts users with a dialog if the previous run resulted in an error, allowing them to choose to continue or to restart the activity.
In this blog, we focus on using the existing BAdIs and show how to integrate an existing popup into a new action. The used popup is already defined in BSP component /SALM/CM_CUTOVR, more precisely in window /SALM/CM_CUTOVR/PopupSyncTRWindow with default view /SALM/CM_CUTOVR/VPopupSyncTR.
In case a new dialog should be used, the BSP component /SALM/CM_CUTOVR needs to be enhanced to add the new window. The existing window /SALM/CM_CUTOVR/PopupSyncTRWindow and /SALM/CM_CUTOVR/SystemLogonWindow can be used as templates for this purpose.
To display a popup at the beginning of an cutover activity, the BAdI /SALM/CHARM_PCA_POPUP_CONTROL must be implemented. Since it is part of a different enhancement spot, the previous enhancement implementation cannot reused here. To create a new implementation, use the IMG node: SAP Solution Manager -> Focused Build -> Change Control Management Extensions -> Cutover Management -> BAdI: Popup for Post-Cutover Activities.
The next step is to create a filter value, which has to be the same as used for the execution part.
Implement the CHECK_POPUP_NEEDED method to determine the necessity of showing the dialog box. If you want the dialog box to be displayed, set the export parameter EV_POPUP_NEEDED to 'X'. Below example is the implementation in case the popup should be displayed every time.
Upon closing the dialog box, the ON_CLOSE_EVENT method is triggered. Utilize the EV_DO_NOT_START_ACTION export parameter to cancel the post-cutover action if needed. Parameters can be passed from the dialog to the actual activity via the ET_VALUES table. These values will be accessible as the it_params import parameter in the /SALM/IF_CM_PCA_EXECUTION~EXECUTE_ACTION method within your BAdI /SALM/CHARM_PCA_EXECUTION implementation. The implementation from /SALM/CL_IM_PCA_DEFAULT_POPUP, designed for the reusable popup, has been adapted for this purpose.
Finally, activate all components to enable the new activity and the repurposed popup.
Necessary Configuration
The newly implemented activity requires configuration before use. Navigate through the IMG path: SAP Solution Manager -> Focused Build -> Change Control Management Extensions -> Cutover Management -> Define Settings for Post-Cutover Actions. Within the section "Define Actions" , insert a new entry with the details of the newly created activity:
◉ Action ID: The filter value specified during the BAdI implementation.
◉ Description: The text that will be displayed in the user interface.
◉ Execution Type: Determines the frequency and kind of method execution:
◉ Single/Multiple: Activity can be executed only once or multiple times.
◉ Online/Batch: Executed synchronously or asynchronously as a background job.
These attributes can be mixed, offering four possible combinations (e.g. Multiple Batch = schedules a batch job to execute the action as often as you like ).
◉ Validity: Specifies where in the system landscape the activity can be executed, based on the cutover system's position (Before, after or for the cutover system).
◉ Sort Order: The sequence order in which the activities will be displayed.
◉ Predecessor ID: The activity here must be successfully completed for the current system before this new activity can be started.
The values for my new activity with ID are as follows:
◉ Action ID: ACT1
◉ Description: new Activity
◉ Execution Type: Multiple Online Execution
◉ Validity: Cutover System
◉ Sort Order: 90
◉ Predecessor ID: none
Using "Multiple Online Execution" as the execution type is advantageous during the development of new activities by a simpler debugging process. Once development is complete, the switch to "Multiple Batch Execution" can be a smarter choice, especially for resource-intensive or long-running activities.
Once the activity is defined, select its entry and select the "Assign Relevant System Roles" step. In my current system landscape, the cutover system is the development system of the maintenance track. Therefore, the new activity will be assigned to the corresponding system roles:
◉ Role Type: Source System
◉ SysRole ID: C (Wildcard could be also used here.)
To define the created Popup, navigate to the "Define Popups" node. Input the name of your view as it is specified in the BSP component. The dialog window title may be set using OTR. While specifying the width and height of your popup window is optional, it allows you to customize a fixed size. For consistency, I have used the same values as the "SYNC Synchronize Deployment (TOC to buffer)" activity:
◉ BSP Application: /SALM/CM_CUTOVR
◉ Interface Window: /SALM/CM_CUTOVR/PopupSyncTRWindow
◉ Dialog window title: /SALM/CHARM_CUTOVER_UI/TITLE_SYNCT
Please check the IMG Nodes BAdI: Post-Cutover Activity and BAdI: Popup for Post-Cutover Activities, which can be found under SAP Solution Manager -> Focused Build -> Change Control Management Extensions -> Cutover Management. Make sure your implementations are activated.
Conclusion
Everything is complete and ready for testing. After adding the activity in customization, it becomes visible in the CRM Web UI and is executable.
Creating custom activities eliminates gaps in standard functionality, increasing efficiency and adaptability within cutover processes. I have familiarized you with the complex framework that is used for the post-cutover activities and have demonstrated how users can adapt the activities to their individual requirements.
No comments:
Post a Comment