Liquid UI - WS Reference Library

del() example


Purpose

The following example demonstrates the usage of del() command.


User Interface


Modifying Create Sales Order screen:

To delete

  • groupbox
  • Inputfield
  • pushbutton

The modified Create Sales Order screen from the Original screen is shown below:


Script

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

Modifying Standard Sales Order screen:

To delete

  • tab item
  • tab strip

The modified Standard Sales Order screen from the Original screen is shown below:


Script

del("P[Item detail]");
del("S[TAXI_TABSTRIP_OVERVIEW]");

Using del() as an object method

In addition to being used as a standalone command, the del() command can also be used as an object method to remove elements of the referenced object.

var objectName = <'[screen_control]'>; 
objectName.del();
Note: Using the del() command with radiobuttons may return an error in certain situations. If that happens, use the standard del() command instead of the object method to delete the element as shown in the following example.
delete testbutton1;
radiobutton([6,15],"Test 1",{"name":"testbutton1",[Field1]:'001'});
radiobutton ([6,37],"Test 2",{"name":"testbutton1",[Field1]:'002',"default":true});
box([4,8],[8,55],"Group");

The following example demonstrates the usage of del() command as an object to clear SAP Easy Acces screen:

for(a=firstChild; a!=null; a=a.nextSibling) 
a.del( );