sapgui_table_is_row_selected

Table Functions

Checks if a table row is selected.

int sapgui_table_is_row_selected( const char *tableID, const char *row, [args,] LAST );
tableIDObject ID Strings
row Row number. The first data row is numbered zero (0). If there is a header row it is numbered (-1).
argsOptional Arguments
LAST A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The sapgui_table_is_row_selected verification function applies to a row in a table control. It returns whether the row is selected.

Return Values

This function returns True (-1) or False (0).

Parameterization

You can parameterize all string (char type) arguments.

Example

The following example uses sapgui_table_is_row_selected to confirm success of a select operation.

//Click on record tab to select the 6th row of the table
sapgui_table_set_row_selected("usr/tblRSDEMO02TC_SPFLI", 
    "5", 
    "True",        
    BEGIN_OPTIONAL, 
        "WhyDoThis=To get to the other side", 
    END_OPTIONAL);
// Check if select succeeded. Output is "Row selected"
if (sapgui_table_is_row_selected(
        "usr/tblRSDEMO02TC_SPFLI", // Table ID
        "5",        // Sixth row
        BEGIN_OPTIONAL, 
            "WhyDoThis=To check if we're there", 
        END_OPTIONAL)
    )  
        lr_output_message("Row selected");
    else
        lr_output_message("Row not selected");
//Click on record tab to unselect the row 
sapgui_table_set_row_selected("usr/tblRSDEMO02TC_SPFLI", 
    "5", 
    "False", LAST );
// Check if unset succeeded. Output is "Row not selected"
if (sapgui_table_is_row_selected(
        "usr/tblRSDEMO02TC_SPFLI", 
        "5", LAST)
    )  
        lr_output_message("Row selected");
    else
        lr_output_message("Row not selected");