The getfieldattribute command is used primarily to get the attributes both of a given native SAP screen element and of a user-created GuiXT screen element. The getfieldattribute command uses the following syntax:
getfieldattribute(fieldName, {"option":value…);
The fieldname is the name of the element. For example, if we have a field 'F[Materials]', the field name would be 'F[Materials]'. This is used to define which screen element's attributes are being returned.
The getfieldattribute command takes the following options:
Specifies the column number of a text area for the text field. The syntax is as follows:
{"column":"column_number"}
Specifies the ID of a given column in a table. The syntax is as follows:
{"columnnumber":"number"}
Specifies the screen display number for columns in a table. The syntax is as follows:
{"displaycolumnnumber":"number"}
Specifies the header if the element is a table column. The syntax is as follows:
{"header":"header_name"}
Specifies if a given screen element is active or not. For edit fields, radiobuttons and checkboxes, '1' equals read-only and '0' equals editable. For pushbuttons, '1' equals inactive and '0' equals active. For all elements, 'null' equals not found. The syntax is as follows:
{"isprotected":1,0}
Specifies the onscreen label for a given screen element. The syntax is as follows:
{"name":"element_name"}
Specifies the row number of the text area for the given text field. The syntax is as follows:
{"row":"row_number"}
Specifies the number of characters a text field can contain. The syntax is as follows:
{"size":"size"}
Specifies the technical name of a screen element (eg. VBKD-BSTKD). The syntax is as follows:
{"techname":"technical_name"}
Specifies the column number of a screen element's label. The syntax is as follows:
{"textcolumn":"text_column_number"}
Specifies the row number of a screen element's label. The syntax is as follows:
{"textcolumn":"text_row_number"}
Specifies the width for columns in a table. The syntax is as follows:
{"width":"width"}
The properties of the field object can also be used as options in the fieldname command. For excample, the name property has several sub-properties, which are as follows:
Please see the examples for additional information.