Share this page

# Example: sapgui_set_collection_property

The following example uses sapgui_set_collection_property to set the selected columns in the grid control to CITYFROM and CITYTO.

    Action() {

    //Load the sample

    sapgui_set_ok_code("/ndwdm", LAST );

    sapgui_send_vkey(ENTER, LAST );

    sapgui_tree_select_item(

        "Grid demo with menu button & detail grid, REPTITLE",

        "shellcont/shell",

        "000740",

        "REPTITLE", LAST );

    sapgui_tree_double_click_item(

        "Grid demo with menu button & detail grid, REPTITLE",

        "shellcont/shell",

        "000740",

        "REPTITLE", LAST );

    // Grid control: Select "CITYFROM" and "CITYTO" columns

    sapgui_set_collection_property(

         "usr/cntlBCALVC_TOOLBAR_D100_C1/shellcont/shell",

         "SelectedColumns",

         "CITYFROM", "CITYTO", LAST );

    sapgui_call_method(

         "usr/cntlBCALVC_TOOLBAR_D100_C1/shellcont/shell",

         "PressToolbarButton", "&SORT_DSC", "LAST");

    return 0;

    }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: