11.06 Message command with pop-up - GuiXT

7
WS Date and Time 11.06 Message command with pop-up Prerequisites Products: Liquid UI WS, Liquid UI Server or Local DLL , Client Software Commands: message(), pushbutton(), enter() , del() Purpose You will learn how to create a pop-up to confirm the action to be performed. Using the message command, you can create different types of pop-ups for different scenarios and do different logic depending on their choice. We will walk you through the following steps. Delete unnecessary screen elements Add pushbutton Add functionality to create a popup Note: This feature does not work for LiquidUI Server. //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 1. Delete redundant/unneeded screen elements on the SAP Easy Access screen. del("X[IMAGE_CONTAINER]"); del("P[Documentation]"); del("P[Assign Users]"); Page 1 / 7 (c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48 URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html

Transcript of 11.06 Message command with pop-up - GuiXT

Page 1: 11.06 Message command with pop-up - GuiXT

WS Date and Time11.06 Message command with pop-up

Prerequisites

Products: Liquid UI WS, Liquid UI Server or Local DLL, Client SoftwareCommands: message(), pushbutton(), enter(), del()

Purpose

You will learn how to create a pop-up to confirm the action to be performed. Usingthe message command, you can create different types of pop-ups for differentscenarios and do different logic depending on their choice. We will walk you throughthe following steps.

Delete unnecessary screen elementsAdd pushbuttonAdd functionality to create a popup

Note: This feature does not work for LiquidUI Server.

//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

1. Delete redundant/unneeded screen elements on the SAP Easy Accessscreen.

del("X[IMAGE_CONTAINER]");del("P[Documentation]");del("P[Assign Users]");

Page 1 / 7(c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48

URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html

Page 2: 11.06 Message command with pop-up - GuiXT

WS Date and Time

2. Add a pushbutton on the toolbar to run a navigateVA02 process on click.

pushbutton([TOOLBAR],"GO TO VA02","?",{"process":navigateVA02});

Page 2 / 7(c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48

URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html

Page 3: 11.06 Message command with pop-up - GuiXT

WS Date and Time

3. Add navigateVA02 function to create a popup with YES or No options. Basedon the option selected, you will be navigated to VA02 transaction or remainon the same screen.

function navigateVA02(){ onscreen 'SAPLSMTR_NAVIGATION.0100' // message_result will hold a value that depends on what the user clicks in the pop-up// in the message command, specify the type, 4 is a Yes or No message box// in the message command, specify the title you want the message box to havemessage_result = message("ARE YOU SURE YOU WANT TO GO TO VA02?", {"type":4,"title":"NAVIGATE TO VA02?"});// if the result is 6, the user clicked yesif(message_result == 6){ enter("/nva02"); }// if the result is 7, the user clicked noelse if(message_result == 7){ enter("?");

Page 3 / 7(c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48

URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html

Page 4: 11.06 Message command with pop-up - GuiXT

WS Date and Time }}

4. Click GO TO VA02 toolbar pushbutton. You will see a popup message todecide a step with a message.

5. Select either Yes or No to either navigate to VA02 or stay on the samescreen. If you click Yes, then you will be navigated to Change Sales OrderInitial screen as shown below.

Page 4 / 7(c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48

URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html

Page 5: 11.06 Message command with pop-up - GuiXT

WS Date and Time

The pop-up will vary on how it looks depending on what “type” is specified in theoptions for the message command. The “type” is calculated by adding the IconConstant and Popup Type Constant.

POP-UP TYPE VALUE

ABORT, RETRY, IGNORE 2

CANCEL, TRY, CONTINUE 6

HELP 16384

OK 0

OK, CANCEL 1

RETRY, CANCEL 5

YES, NO 4

YES, NO, CANCEL 3

ICON TYPE VALUE

INFORMATION ICON 64

QUESTION ICON 32

Page 5 / 7(c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48

URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html

Page 6: 11.06 Message command with pop-up - GuiXT

WS Date and TimeSTOP ICON 16

Using the table above, we can see if we wanted a Pop-up that gave the options“ABORT, RETRY, IGNORE”, with a STOP ICON, we would need to add 2+16. Ourcalculated “type” is 18.

The below is from the following command:

message("CALCULATED TYPE is 18!",{"type":18});

Our process can flow a certain way depending on what button is clicked by the user.Each button has specific value we can use to check in an “if” condition.

BUTTON VALUE

FUNCTION FAIL 0

ABORT 3

CANCEL 2

CONTINUE 11

IGNORE 5

NO 7

OK 1

RETRY 4

TRY 10

YES 6

Page 6 / 7(c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48

URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html

Page 7: 11.06 Message command with pop-up - GuiXT

WS Date and TimeNext Steps

Edit and save text on the same screen.Learn how to edit and save the text in the textbox.

5 min

This article is part of the Conditional scripts tutorial.Unique solution ID: #1957Author: Sarvani KusuriLast update: 2021-08-26 12:04

Powered by TCPDF (www.tcpdf.org)

Page 7 / 7(c) 2022 Liquid UI | Synactive | GuiXT <[email protected]> | 2022-02-21 14:48

URL: https://www.guixt.com/knowledge_base/content/140/957/en/1106-message-command-with-pop_up.html