Liquid UI - WS Reference Library

del()


Purpose

With del(), you can remove native SAP screen elements. This command is used whenever you need to delete unnecessary native SAP screen elements such as pushbuttons, fields, groupbox, radiobutton, etc., on a particular SAP screen.


Syntax

del("[screen_element]",{"option":true..});


Properties

  • screen_element - Element code and name

Usage of del() command

Element

Syntax

Description

Checkboxes
del("C[checkbox_name]");
Use to delete a checkbox.
Inputfields
del("F[inputfield_name]");
Use to delete an inputfield.
Group boxes
del("G[groupbox_name]");
Use to delete groupbox.
Menu labels
del("M[menu_label]");
Use to delete menu label.
Menu function keys
del("M[/menuFunctionKey]");
Use to delete the menu function name.
Pushbuttons
del("P[pushbutton_name]");
Use to delete the pushbutton.
Radiobuttons
del("R[radiobutton_name]");
Use to delete the radiobutton.
Tabs
del("P[tab_name]");
Use to delete a tab.
Application Toolbar Buttons
del("P[application_toolbar_button]");
Use to delete the application toolbar.
Tab strips
del("S[tabstrip_name]");
Use to delete the complete tabstrip.
Tables
del("T[table_name]");
Use to delete the table.
Grids
del("X[grid_name]");
Use to delete the grid.


Available Options

You can use the following options with the del:

"box":".."

"box":true - This option removes the box element.

"keepfunctioncode":".."

"keepfunctioncode":true -  This option is applicable only to remove the pushbuttons.

"text":".."

"text":true - This option deletes the textfield from the screen.

"triple":".."

"triple":true - This option deletes label, textfield and the description box of the inputfield.

"value":".."

"value":true - This option deletes the value of an inputfield.

"withbox":".."

"withbox":true - This option removes the tabstrip and its associated elements.


Options Detail

box

  1. This option deletes a box around a group of elements. The elements within the box remain on the screen.

  2. del("G[Organizational Data]",{"box":true});
    
  3. Deleted the Organizational Data box element.

keepfunctioncode

  1. The keepfunctioncode option is used only with toolbar or onscreen pushbuttons that contain a process.

  2. This option lets the user to run the function code associated with the pushbutton, eventhough it is deleted.

  3. del("P[Item overview]",{"keepfunctioncode":true});
  4. As per the code, Item overview toolbar pushbutton is removed from the screen and the fcode of it is still accessible.

text

  1. The text option deletes a textfield.

  2. del("F[Order Type]",{"text":true});
  3. As per the code, textfield of an Order Type inputfield is deleted.

triple

  1. The triple option will delete label, textfield and the description box of an inputfield.

  2.  del("F[Order Type]",{"triple":true});
  3. As per the code, the label, textfield and the description box of an Order Type inputfield is deleted using the triple option. This option is only applicable for inputfields.

value

  1. The value option will delete only the actual entry field.

  2. del("F[Order Type]",{"value":true});
  3. As per the code, the value option of an Order Type inputfield is deleted.

withbox

  1. The withbox option is used only with tabstrips and specifies that only elements associated with tabstrips are removed.

  2. del("P[Sales]",{"withbox":true});
  3. As per the code, Sales tabstrip is removed from the screen.


Example

The following example demonstrates the usage of del() command by modifying the create sales order screen:


Script

del("G[Organizational Data]",{"box":true});
del("F[Order Type]",{"value":true});
del("P[Item overview]");

Script Details


Tips and Tricks

  • Re-Order List to Remove Empty Rows

    To remove all the empty rows in a list and move the populated rows in Order.

    del('P[SAP Business Workplace]');

    Learn more about Remove Empty Rows using del() command.

  • Delete only the tabstrip

    Here, you will see how to delete the tabstrip without deleting the box around it. This can be done with a single line of code.

    del('S[TAXI_TABSTRIP_OVERVIEW]',{"box":true});

    As per the code, you can view the tabstrip deleted in Change Standard Order: Overview screen as shown below:

  • Delete Toolbar Pushbutton using fkey 

    To remove the pushbuttons on the toolbar that does not contain text and having the fcode, you need to place the fkey of the pushbutton in the del() command.

    SAPMV45A.E0102.sjs

    del('P[/17]');

    As per the code, you can delete the toolbar pushbutton which does not have text using the fkey.