Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: inputfield()
Purpose
This article explains how to assign the searchhelp of any SAP field to a Liquid UI Input Field in various ways. You can also restrict searchhelp values or retrieve searchhelp values from an F4 searchhelp using options defined for an Input Field.
To demonstrate how to assign different types of searchhelp to an Input Field, we will use the SAP Easy Access screen as an example and we’ll walk you through the following steps:
- Delete the Image container on the SAP Easy Access screen
- Add an Input Field with a basic searchhelp option
- Restrict searchhelp values
- Add an Input Field with restricted searchhelp using a default value
- Add an Input Field with restricted searchhelp using a dynamic value
- Retrieve additional data from searchhelp using searchhelp options
- Add an Input Field to retrieve the description associated with the selection
User Interface
//Create this file inside your script folder for customizing the SAP Easy Access screen SAPLSMTR_NAVIGATION.E0100.sjs
//Now, let's start adding the Liquid UI script to the above file and save it.
Customization
- Delete the Image container on the SAP screen using the del command.
//Deletes the Image container on the screen del("X[IMAGE_CONTAINER]");
- Add two Input Fields with labels Sales Org and Mat Grp, with a basic searchhelp option to view their possible entries.
//Creates Input Fields to enable user with basic searchhelp option inputfield([2,4],"Sales Org.",[2,16],{"name":"z_va01_salesorg","size":4,"searchhelp":"H_TVKO"});
inputfield([4,4],"Mat Grp.",[4,16],{"name":"z_mm01_matgrp","size":3,"techname":"MARA-MATKL"});
- To restrict searchhelp values for an Input Field based on the value entered in the other field, you can use the shselname1 and shselvalue1 options. You can restrict the material field f4 list based on the specific plant value. The search help parameters of the material field with the import flag can only be passed.
II. You will be navigated to the Dictionary: Display Search Help screen.
III. Now, select the required searchhelp parameter with the import flag to restrict its values in the plant field.
- Add an Input Field with the label Material to restrict searchhelp using a default value.
//Creates a Input Field that restrics search help with a default value inputfield([6,4],"Material",[6,16],{"name":"z_mm01_material","size":18,"searchhelp":"MAT1","shselname1":"WERKS","shselvalue1":"1000"});
- Add two Input Fields with labels Plant, and " " to restrict searchhelp using a dynamic value.
//Creates a Input Field which restricts search help with dynamic value inputfield([8,4],"Plant",[8,10],{"name":"z_mm01_plant","size":4}); inputfield([8,17],{"name":"z_mm01_material", "size":18,"searchhelp":"MAT1","shselname1":"WERKS","shselvalue1":"V[z_mm01_plant]","nolabel":true});
- To retrieve additional data from searchhelp using the shname1 and shdest1 options.
- Navigate to SE11 transaction. Enter the Industry sector searchhelp name(H_T137) in the searchhelp field and click Display.
- Select the required searchhelp parameter with the export flag to retrieve the value from searchhelp.
- Add an Input Field with the labels Industry Sector, " " to retrieve the description associated with the selection.
//Creates a Input Field which retrieves the description associated with the selection inputfield([10,4],"Industry Sector",[10,18],{"name":"z_mm01_indsec","size":2,"searchhelp":"H_T137","shname1":"MBBEZ","shdest1":"V[z_mm01_inddesc]"}); inputfield([10,23],{"name":"z_mm01_inddesc","size":8,"nolabel":true});
Next Steps
Learn how to extract numbers from the message and display it on the inputfield.
10 min.
This article is part of the Take a deep dive into the input field and pushbutton tutorial.