Introduction
- SAP Landscape Management is an add-on to SAP NetWeaver 7.5 installed as an application with the SAP NetWeaver Application Server for Java (SAP NetWeaver AS for Java).
- It uses the underlying SAP NetWeaver AS for Java technology. Therefore, to monitor and manage the SAP Landscape Management system, you use the monitoring and managing mechanisms of SAP NetWeaver AS for Java.
- Simplify and standardize the management of your SAP operations with a powerful orchestration solution.
- SAP Landscape Management provides a central point of control for flexibly assigning computing hosts and managing application instances in the system landscape.
Technical System Landscape
The following graphic depicts the main components of SAP Landscape Management:
Capabilities
Some key features include:
i. Intersystem dependency framework
ii. Single system and mass operations (for example, starting and stopping)
iii. Relocating systems from one host to another
iv. Schedule operation templates
v. Application server (un-)installation
vi. Diagnostics Agent (un-)installation
vii. Custom operations and hooks
Note : Additional functions are available in the enterprise edition of SAP Landscape Management. For information about these functions and to obtain a license, please contact your SAP representative.
Integrate Custom Operations with LAMA
Step 1 : Create a script for Kernel Backup & Upgrade.
Custom Script for Kernel Backup
LVM_backup_kernel.conf (root:sapsys)
Name: LVM_backup_kernel_SID
Username: $[SAPSYSTEMNAME:#tolower]adm
Command:pkill -u sidadm
Command:cleanipc xx remove
Command:cp -avr /sapmnt/SID/exe/uc/linuxx86_64 /sapmnt/SID/exe/uc/linuxx86_64_backup
Command:cp -avr /usr/sap/SID/DVEBMGSxx/exe /usr/sap/SID/DVEBMGSxx/exe_backup
Platform: Unix
Custom Script for Kernel Upgrade
Name: LVM_Kernel_Upgrade
Username: $[SAPSYSTEMNAME:#tolower]adm
Command:/usr/sap/trans/kernel_upgrade/SAPCAR -xvf /usr/sap/trans/kernel_upgrade/SAPEXEDB_* -R /sapmnt/H71/exe/uc/linuxx86_64/
Command:/usr/sap/trans/kernel_upgrade/SAPCAR -xvf /usr/sap/trans/kernel_upgrade/SAPEXE_* -R /sapmnt/H71/exe/uc/linuxx86_64/
Command:/usr/sap/trans/kernel_upgrade/SAPCAR -xvf /usr/sap/trans/kernel_upgrade/SAPEXEDB_* -R /usr/sap/H71/DVEBMGS00/exe/
Command:/usr/sap/trans/kernel_upgrade/SAPCAR -xvf /usr/sap/trans/kernel_upgrade/SAPEXE_* -R /usr/sap/H71/DVEBMGS00/exe/
Platform: Unix
Step 2 : Introduce scripts to SAP Host agent.
- For introducing script to SAP Host Agent, move the script with '.sh' extension in the directory “/usr/sap/hostctrl/exe/operations.d/”.
Note:- The script must be present in each host for execution.
Step 3 : Introduce script to SAP LaMa by creating a "Provider Definition".
- Create a Provider Definition.

- Select Provider Type “Script Registered with Host Agent”.

- Enter the Name, Registered script and Host name and Select Instance in Operation Uses.

Step 4: Create a LaMa "Custom Operation" for Kernel Process.
Click on “Custom Operation”.

Enter the mandatory fields- Name, Provider Definition, Entity Type, Permission and Group.

Now, a Custom Operation is built and the required script is attached. Now, the required operation can be triggered either through Scheduler or by Manually selecting the instance make a Right Click on that instance to get Kernel Options and finally execute it.

Create Operation Templates.
Select Operation Template Tab and then click on Create Button.

Give a Name and description.

Click on Steps Tab and make a Custom Process:
- Select Stop option for stopping your Instance. Please select your Instance in "Entities".
- Then connect Next Step as Kernel Backup.
- Now, Connect to Kernel Upgrade step.
- Finally Start your Instance using Start Operation.
Save it.

Execution through Scheduler
Go to Schedules and click on 'Create'.

Give a Name & Description and Select Operation Template as "Kernel Activity" (as created in above steps).

Go to Scheduling Details and fill it.

E-mail Alerts
Go to Notification Setting Tab and fill the required selection & your E-mail id. And Save it.

You may get a similar mail as of below type:

Parameter Validation
Similarly, we can create a custom script for any Parameter which needs to be validated as part of BASIS Activity and Introduce it to SAP LaMa.
One example of parameter validation script is below which validates a parameter called - "
login/no_automatic_user_sapstar" across our landscape or in all our instances without any manual efforts like executing T-codes RZ11 in all systems. Below script checks whether the parameter-
login/no_automatic_user_sapstar is enabled or disabled in all our systems. And this script also create logs and save it in a file.
Custom Script for Parameter Validation - login/no_automatic_user_sapstar
#!/bin/bash
echo "=== Custom validation $0 called with parameters:"
echo "$*"
while getopts "p:" opt; do
case $opt in
p)
PROFILE=$OPTARG
;;
esac
done
if [[ ! -f $PROFILE ]]; then
echo "[RESULT]: Instance profile $PROFILE not found!"
exit 0
fi
no_automatic_user_sapstar=$(sappfpar pf=$PROFILE login/no_automatic_user_sapstar)
if [[ $no_automatic_user_sapstar == 1 ]]; then
{
echo "[RESULT]: login/no_automatic_user_sapstar is enabled in $SAPSYSTEMNAME ."
echo "[RESULT]: login/no_automatic_user_sapstar is enabled in $SAPSYSTEMNAME at `date`." >>/media/starstatus.txt
}
else
{
echo "[RESULT]:Possible security issue: Profile parameter login/no_automatic_user_sapstar is disabled in $SAPSYSTEMNAME ."
echo "[RESULT]:Possible security issue: Profile parameter login/no_automatic_user_sapstar is disabled in $SAPSYSTEMNAME at `date` ." >>/media/starstatus.txt
}
After Creating Script, follow the same procedure as we did for Kernel Backup and Upgrade.
Benefits
The standard edition of SAP Landscape Management software helps users reduce the total cost of ownership (TCO) of their SAP systems and improve their business agility by simplifying and automating the efforts required to configure, provision, deploy, monitor, and manage their systems in both physical and virtualized infrastructures.
SAP Landscape Management is built on four key principles:
- Unified - Reduce the time and effort to migrate to virtual and cloud environments by decoupling the application from the underlying infrastructure; by providing a unified view and management of the hardware, software, and virtualization layers; and by automating system relocation.
- Complete - Improve your ability to react to business needs by supporting the configuration, deployment, monitoring, and management of your SAP systems and landscapes in both physical and virtualized infrastructures, offering you additional infrastructure options and faster time to value.
- Simplified - Simplify the management of SAP landscapes by hiding the technical complexities of physical and virtualized infrastructures from day-to-day operations.
- Automated - Reduce the capital investment and operational costs (that is TCO) of your SAP systems by scheduling system operations; and leveraging virtualization to reduce your hardware requirements and improve resource utilization.
Hope this blog post is useful to you!