Liquid UI - Documentation - 6.07 columnwidth()

6.07 columnwidth()


Purpose

With columnwidth(), you can define the width of a SAP table column.

We can change the width of the table column by specifying the actual size in pixels. It is to be noted that the value doesn't exceeds the default column size as it is used primarily to restrict entry. The size cannot be set to a value greater than the column's original size. The columnwidth command differs slightly from the columnsize command although they are very similar in function. The major difference is that with the columnwidth command, the column size can be changed in a script with the 'size' option. However, once a size is set with columnsize, it cannot be changed in a script.

Note: Entire column will be deleted when we set the value to zero (0). This command works only with native SAP table columns.

 

Syntax

There are three possible syntaxes. The first is used if only a single table is present on a SAP screen:

columnwidth("[column_name]", value);

The other two syntaxes are interchangeable and are used when multiple tables are present on a SAP screen:

columnwidth("[Table_name, column]", value);
columnwidth("table_name,column_name",value);


Options

The columnwidth command does not take any options.


Examples


Resizing native SAP columns

Log into SAP. Navigate to the VA01 Overview screen and open the 'SAPMV45A.E4001.sjs' script file. Create this file if it does not already exist.The VA01 overview screen appears as follows:

 

To resize a native SAP table column with columnwidth, please do the following:

  1. Resize the width of the Material column in the All items table to 3 pixels. The code is as follows:
    columnwidth("[All items, Material]", 3);
  2. The screen will now appear as shown below:
     
  3. To change the width to a different value, change the code as follows:
    columnwidth("[All items,Material]",15);
  4. The resized column will appear as shown below:
     


Script Details

SAPMV45A.E4001.sjs

columnwidth("All items,Material",15);


Removing native SAP columns

Log into SAP. Navigate to the VA01 Overview screen in SAP and open the 'SAPMV45A.E4001.sjs' script file. Create this file if it does not already exist. The VA01 overview screen appears as follows:

 

To remove a native SAP table column, please do the following:

  1. Remove the entire Material column in the All items table. The code is as follows:
    columnwidth("All items,Material",0);
  2. The screen will now appear as shown below:
     


Script Details

SAPMV45A.E4001.sjs

columnwidth("All items,Material",0);

Can't find the answers you're looking for?