Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: title(), _database
Purpose
You will learn how to retrieve database name of your SAP server using "_database" system variable. This system variable holds database name or system ID in the string format. This can be useful to conditionalize scripts based on the system ID. The script might need to modify, based on QAS system versus the PRD system. We will walk you through the following steps.
- Add a condition to check the system ID value.
//Create this file inside your script folder for customizing SAP Easy Access screen: SAPLSMTR_NAVIGATION.E0100.sjs
//Now let's start adding the content to the above file.
- Add a condition to check the system ID to change the screen title.
// If the system ID value is TR1, then the screen title will change as ZEUS
if(_database == "TR1"){
title("Welcome to ZEUS");
}
// If the system ID value is TRX, then the screen title will change as JUNEAU
else if(_database == "TRX"){
title("Welcome to JUNEAU");
}
// If the system ID value is ID7, then the screen title will change as ORION
else if(_database == "ID7"){
title("Welcome to ORION");
}
- You will enter into ZEUS SAP server if the system ID is TR1.
- You will enter into JUNEAU SAP server if the system ID is TRX.
Next Steps
Learn how to retrieve the transaction name and customize the screen based on the transaction.
5 min
This article is part of the Conditional scripts tutorial.