Using del as a 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. The syntax would be as follows:

 var objectName = <'[screen_control]'>; 
objectName.del();
Note:

Using the del method with radiobuttons may return an error in certain situations. If this happens, use the standard del command instead of the object method to delete the element as shwon 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");
  1. Launch SAP and navigate to the Easy Access screen, as shown below:


  2. Open the 'SAPLSMTR_NAVIGATION.E0100.sjs' script file and enter the following code. Create the file if it does not exist.
    for(a=firstChild; a!=null; a=a.nextSibling)
    			a.del();
  3. The Easy Access screen will now appear as shown below: