Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: pushbutton(), getfieldattribute()
Purpose
This document provides instructions on utilizing the getfieldattribute command to retrieve multiple attributes associated with a specified input field. This enables users to effortlessly acquire extensive details, including label name, text row and column indices, field row and column indices, technical name, size, and width. The following steps will guide users through the process effectively.
- Add a push button to trigger the process
- Add a function to display the attributes of an input field
- Check the console window for the input field attributes
User Interface
//Create this file inside your script folder for customizing the Create Sales Order: Initial Screen, SAPMV45A.E0101.sjs
//Now, let's add the Liquid UI script to the above file and save it.
Customization
- Add a toolbar push button labeled Get Field Attribute.
// Creates a push button on toolbar to run printInfo process on click pushbutton([TOOLBAR], "Get Field Attribute", {"process":printInfo});
- Add a printInfo function to retrieve and display the input field attributes on the console window.
// Creates a function with an icon, tooltip and label function printInfo(){ println("Executing getfieldattribute command"); getfieldattribute("F[Order Type]", {"name":"fname", "textrow":"ftextrow", "textcolumn":"ftextcolumn", "row":"frow", "column":"fcol", "techname":"ftechname", "size":"fsize", "isprotected":"fprotected", "header":"fheader", "columnnumber":"fcolumnnumber", "displaycolumnnumber":"fdisplaycolumnnumber", "width":"fwidth"}); println("Printing Order Type inputfield attributes!"); println("\t fname = " + fname); println("\t ftextrow = " + ftextrow); println("\t ftextcolumn = " + ftextcolumn); println("\t frow = " + frow); println("\t fcol = " + fcol); println("\t ftechname = " + ftechname); println("\t fsize = " + fsize); println("\t isprotected = " + fprotected); println("\t fheader = " + fheader); println("\t fcolumnnumber = " + fcolumnnumber); println("\t fdisplaycolumnnumber = " + fdisplaycolumnnumber); println("\t fwidth = " + fwidth); }
SAP Process
- Refresh the VA01 screen and click the Get Field Attribute toolbar push button. This action retrieves and displays the input field attributes on the console window, as shown below.
Next Steps
Learn how to retrieve attributes of a table
10 min.
This article is part of the Invoking functions tutorial.