<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: How Fetch Highlighted Rows from a SAP Table in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-fetch-highlighted-rows-from-a-sap-table/qaa-p/13901323#M4888444</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;GuiTableControl organizes the rows in a collection of objects of type GuiTableRow.&lt;BR /&gt;See also:&lt;BR /&gt;&lt;A href="https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/ce1d9e64355d49568e5def5271aea2db.html" target="_blank"&gt;https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/ce1d9e64355d49568e5def5271aea2db.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Each of the rows is an object in this collection and has properties like "Selected". See also:&amp;nbsp;&lt;A href="https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5341bac75c8d428eb8460f6c84b13eee.html" target="_blank"&gt;https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5341bac75c8d428eb8460f6c84b13eee.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Frank&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Oct 2024 13:21:35 GMT</pubDate>
    <dc:creator>FrankKrauseGUI</dc:creator>
    <dc:date>2024-10-16T13:21:35Z</dc:date>
    <item>
      <title>How Fetch Highlighted Rows from a SAP Table</title>
      <link>https://community.sap.com/t5/technology-q-a/how-fetch-highlighted-rows-from-a-sap-table/qaq-p/13900479</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just wanted to ask how to fetch data rows from SAP table (type of GuiTableControl).&lt;/P&gt;&lt;P&gt;I want to fetch the values for the highlighted/selected rows only and save it to a DataTable.&lt;/P&gt;&lt;P&gt;Example of the reference SAP Table where I only want to grab the data for row 2 &amp;amp; 3 (the selected rows).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_Ikuta01_1-1729060094735.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/179766i0999A3412E513820/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_Ikuta01_1-1729060094735.png" alt="_Ikuta01_1-1729060094735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But I don't know what property to achieve the "IsHighlighted" logic below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using System;
using System.Data;
using SAPFEWSELib;

class Program
{
    static void Main()
    {
        GuiTableControl SapTable = (GuiTableControl)session.FindById("your_tablecontrol_id");

        DataTable selectedRowsTable = new DataTable();
        selectedRowsTable.Columns.Add("Column1", typeof(string));
        selectedRowsTable.Columns.Add("Column2", typeof(string));

        for (int rowIndex = 0; rowIndex &amp;lt; SapTable.RowCount; rowIndex++)
        {
            if (IsHighlighted(rowIndex))  // Todo: How to detect if highlighted
            {
                DataRow newRow = selectedRowsTable.NewRow();
                newRow["Column1"] = SapTable.GetCellValue(rowIndex, "Column1");
                newRow["Column2"] = SapTable.GetCellValue(rowIndex, "Column2");
                selectedRowsTable.Rows.Add(newRow); // Add only highlighted rows
            }
        }

        foreach (DataRow row in selectedRowsTable.Rows)
        {
            Console.WriteLine($"{row["Column1"]}, {row["Column2"]}");
        }
    }

    
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 06:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-fetch-highlighted-rows-from-a-sap-table/qaq-p/13900479</guid>
      <dc:creator>_Ikuta01</dc:creator>
      <dc:date>2024-10-16T06:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: How Fetch Highlighted Rows from a SAP Table</title>
      <link>https://community.sap.com/t5/technology-q-a/how-fetch-highlighted-rows-from-a-sap-table/qaa-p/13901320#M4888443</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;GuiTableControl organizes the rows in a collection of objects of type GuiTableRow.&lt;BR /&gt;See also:&lt;BR /&gt;&lt;A href="https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/ce1d9e64355d49568e5def5271aea2db.html" target="_blank"&gt;https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/ce1d9e64355d49568e5def5271aea2db.html&lt;/A&gt;&lt;BR /&gt;-&amp;gt; Rows&lt;BR /&gt;&lt;BR /&gt;Each row is an object with certain properties. See also:&lt;BR /&gt;&lt;A href="https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5341bac75c8d428eb8460f6c84b13eee.html" target="_blank"&gt;https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5341bac75c8d428eb8460f6c84b13eee.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And one of the properties is "Selected".&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Frank&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 13:23:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-fetch-highlighted-rows-from-a-sap-table/qaa-p/13901320#M4888443</guid>
      <dc:creator>FrankKrauseGUI</dc:creator>
      <dc:date>2024-10-16T13:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: How Fetch Highlighted Rows from a SAP Table</title>
      <link>https://community.sap.com/t5/technology-q-a/how-fetch-highlighted-rows-from-a-sap-table/qaa-p/13901323#M4888444</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;GuiTableControl organizes the rows in a collection of objects of type GuiTableRow.&lt;BR /&gt;See also:&lt;BR /&gt;&lt;A href="https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/ce1d9e64355d49568e5def5271aea2db.html" target="_blank"&gt;https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/ce1d9e64355d49568e5def5271aea2db.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Each of the rows is an object in this collection and has properties like "Selected". See also:&amp;nbsp;&lt;A href="https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5341bac75c8d428eb8460f6c84b13eee.html" target="_blank"&gt;https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5341bac75c8d428eb8460f6c84b13eee.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Frank&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 13:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-fetch-highlighted-rows-from-a-sap-table/qaa-p/13901323#M4888444</guid>
      <dc:creator>FrankKrauseGUI</dc:creator>
      <dc:date>2024-10-16T13:21:35Z</dc:date>
    </item>
  </channel>
</rss>

