<?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 to capture and store text using SAP Logon 770  GUI Scripting in python? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-to-capture-and-store-text-using-sap-logon-770-gui-scripting-in-python/qaa-p/12680250#M4757712</link>
    <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;epona1453&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;welcome in the SAP Community.&lt;/P&gt;&lt;P&gt;Your approach to store storage_bin_2 is correct. Here an example with WSH. Whether Python or WSH is used here makes no difference. The use of the SAP GUI Scripting API is independent of the programming language.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138898-image.png" /&gt;&lt;/P&gt;&lt;P&gt;To read a cell from a grid you need the column name. You can see an example below how to detect it (line 6 and with the index of Columns you can detect the name, line 11).&lt;/P&gt;&lt;P&gt;With that column name you can read the content of a cell with GetCellValue method (line 15).&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138899-image.png" /&gt;&lt;/P&gt;&lt;P&gt;You can see in the last line of the console the result AA of the selected line in the grid.&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Stefan&lt;/P&gt;</description>
    <pubDate>Sat, 18 Feb 2023 05:34:52 GMT</pubDate>
    <dc:creator>Stefan-Schnell</dc:creator>
    <dc:date>2023-02-18T05:34:52Z</dc:date>
    <item>
      <title>How to capture and store text using SAP Logon 770  GUI Scripting in python?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-capture-and-store-text-using-sap-logon-770-gui-scripting-in-python/qaq-p/12680249</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/2133147-screenshot-2023-01-31-165810.png" data-attachment="2133147"&gt;screenshot-2023-01-31-165810.png&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://answers.sap.com/storage/temp/2133157-screenshot-2023-01-31-165902.png" data-attachment="2133157"&gt;screenshot-2023-01-31-165902.png&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN class="mention-scrubbed"&gt;stefan.schnell&lt;/SPAN&gt; or anyone help me figure out how to store text within an element in the SAP Logon 770 GUI? I tried using the recording function to capture the element and then doing the .text at the end, but I keep getting errors every time. &lt;BR /&gt;This is the code below with the two elements I am trying to grab text from. I am able to click on the elements but not store their texts. Am I doing this correctly? If so please let me know the correction. I have also attached two images of the two elements I am trying to store the text for.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;storage_bin_1 = session.findById("wnd[0]/usr/shell/shellcont[1]/shell/shellcont[0]/shell").text&lt;BR /&gt;storage_bin_2 = session.findById("wnd[0]/usr/ctxt/SCWM/LAGP-LGPLA").text&lt;BR /&gt;print(storage_bin_1)&lt;BR /&gt;print(storage_bin_2)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Jan 2023 23:02:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-capture-and-store-text-using-sap-logon-770-gui-scripting-in-python/qaq-p/12680249</guid>
      <dc:creator>epona1453</dc:creator>
      <dc:date>2023-01-31T23:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture and store text using SAP Logon 770  GUI Scripting in python?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-capture-and-store-text-using-sap-logon-770-gui-scripting-in-python/qaa-p/12680250#M4757712</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;epona1453&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;welcome in the SAP Community.&lt;/P&gt;&lt;P&gt;Your approach to store storage_bin_2 is correct. Here an example with WSH. Whether Python or WSH is used here makes no difference. The use of the SAP GUI Scripting API is independent of the programming language.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138898-image.png" /&gt;&lt;/P&gt;&lt;P&gt;To read a cell from a grid you need the column name. You can see an example below how to detect it (line 6 and with the index of Columns you can detect the name, line 11).&lt;/P&gt;&lt;P&gt;With that column name you can read the content of a cell with GetCellValue method (line 15).&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138899-image.png" /&gt;&lt;/P&gt;&lt;P&gt;You can see in the last line of the console the result AA of the selected line in the grid.&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Stefan&lt;/P&gt;</description>
      <pubDate>Sat, 18 Feb 2023 05:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-capture-and-store-text-using-sap-logon-770-gui-scripting-in-python/qaa-p/12680250#M4757712</guid>
      <dc:creator>Stefan-Schnell</dc:creator>
      <dc:date>2023-02-18T05:34:52Z</dc:date>
    </item>
  </channel>
</rss>

