Example: sapgui_table_is_column_selected

The following example uses sapgui_table_is_column_selected to determine which of the first thee columns is selected. For purposes of demonstration, the third column (column 2) is selected before running the check.

static char tableID[] = "usr/tblRSDEMO02TC_SPFLI";
int isSelected;
int i;
char sSelected[7];
char colNum[2];
for (i=0; i<4; ++i)
    colNum[0] = (char)(i + 48); 
    colNum[1] = '\0';
    isSelected= sapgui_table_is_column_selected(tableID,
    if (isSelected) 
        strcpy( sSelected, "is"); 
        strcpy( sSelected, "is not");
    lr_message("Column %d %s selected", 
        i, sSelected);
Example: Output:
Columns.c(30): Table - Selected column "Depart.city"
Notify: Table - Found column 0
Columns.c(42): Table - Column Airline carrier is unselected
Column 0 is not selected
Notify: Table - Found column 1
Columns.c(42): Table - Column Flight number is unselected
Column 1 is not selected
Notify: Table - Found column 2
Columns.c(42): Table - Column Depart.city is selected
Column 2 is selected
Notify: Table - Found column 3
Columns.c(42): Table - Column Dep. airport is unselected
Column 3 is not selected