Liquid UI - WS Reference Library

Get attributes of a pushbutton


The getfieldattribute() command can be used to return pushbutton attributes.

This example explains on how to display icon ID, tooltip and label values of a pushbutton using the name option of the getfieldattribute(). The properties of the field object can also be used as options in the field name command. Please do the following:

User Interface

  1. Open the script file for the Easy Access screen (SAPLSMTR_NAVIGATION.E0100.sjs).
  2. Enter the following code:
  3. Add an onscreen pushbutton or an enter command to trigger the process. We will use a pushbutton and the code is as follows:
  4. Save the file and launch SAP.
  5. Go to the Easy Access screen and press the pushbutton.

The following output appears on the Console screen, as shown:


Note: To display output on the screen, use the message command.

Liquid UI Script

pushbutton([5,25], "@01\\QHELLO@Pushbutton attributes",{"process":printbutton});
function printbutton(buttonName)
getfieldattribute("P[Pushbutton attributes]", {"name.icon":"fbuttonicon","name.tip":"fbuttontip", "name.label":"fbuttontext"});
println("\t fbuttonicon = " + fbuttonicon);
println("\t fbuttontip = " + fbuttontip);
println("\t fbuttontext = " + fbuttontext);
} pushbutton([5,25], "@01\\QHELLO@Pushbutton attributes",{"process":printbutton});

Was this information helpful? Send Feedback