SAP GUI Scripting - Reading GridView Control

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 มี.ค. 2017
  • This example shows how to read a gridview ui control which is used all over transactions. The example here uses the lock entries from SM12.
    Download link to the Excel document: drive.google.com/file/d/0Bw1X...
    GUI Scripting playlist: • SAP GUI Scripting and ...
    First video with basics: • SAP GUI Scripting 1 - ...
    All my GUI scripting files on Github (in case you cannot access the above link):
    github.com/nygma2004/km/tree/...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 56

  • @bilianaklissurova9544
    @bilianaklissurova9544 6 ปีที่แล้ว +4

    All videos in GUI scripting Playlist are professional, meaningful and really useful. All visitors can only be thankful for this knowledge shared only by good will.

  • @amandafernandesramospasson5862
    @amandafernandesramospasson5862 4 ปีที่แล้ว +4

    i'd like to thank you again. the whole playlist helped me a lot! please continue teaching about sap!! it's so complicated and yet you make it sound a lot easier... cheers!

  • @gamemenot
    @gamemenot 4 ปีที่แล้ว +2

    Very good tutorial, i love how you used the watch window and the object browser to find the objects/properties/methods you needed to complete the task.

  • @ricardopiedade9346
    @ricardopiedade9346 4 ปีที่แล้ว +1

    Man, I was stuck in several development projects and this playlist set me free and took me to another level! THANK YOU, brother!!

  • @tavar123
    @tavar123 3 ปีที่แล้ว +1

    Just found this excellent tutorial. Great job thanks a lot. Can't wait to see more videos !!

  • @jgalbino2231
    @jgalbino2231 2 ปีที่แล้ว +1

    This video is old but it helped me a lot. Saved me my job. Thanks

  • @joem112
    @joem112 4 ปีที่แล้ว +1

    Excellent video. I especially like the way you used the watch window to find properties, and then tested them right in the watch window, Bravo!

  • @RPApapq9038
    @RPApapq9038 ปีที่แล้ว +1

    It is an awesome solution., I managed to extract all the information I need

  • @davidgoes2950
    @davidgoes2950 6 ปีที่แล้ว +1

    This is a gorgeous tutorial, thanks it will help me a lot!

  • @slipvanei
    @slipvanei 6 ปีที่แล้ว +1

    Thanks this is very helpfull, please continue teaching about sap

  • @luca75tubo
    @luca75tubo ปีที่แล้ว +1

    Great video! Thank you for sharing!

  • @witchertaylor1732
    @witchertaylor1732 7 ปีที่แล้ว +1

    can't thank you any more !very useful !! save me a lot of time !! this is just what I need

  • @user-sp3zo6uv8j
    @user-sp3zo6uv8j 2 ปีที่แล้ว +1

    really excellent, thank you so much for this sharing.

  • @luinux23ify
    @luinux23ify ปีที่แล้ว +1

    Thank you so much... very useful videos...

  • @rafaeldossantos2019
    @rafaeldossantos2019 6 ปีที่แล้ว

    Great job! Thanks!

  • @muhamadsyarifurrohman376
    @muhamadsyarifurrohman376 4 ปีที่แล้ว

    Awesome works Varga!. Thank you so much for your teaching. I you can make another video about SAP GUI Scripting - Download attachments from Display Document (FB03)

  • @fcomosan
    @fcomosan 5 ปีที่แล้ว +1

    "Object doesn't admit this property or method", in line
    For i = 0 To GridView.ColumnCount - 1
    Cells(13, i + 1).Value = GridView.GetColumnTitles(GridView.ColumnOrder(i))(0)
    Next i
    Thanks for your videos

  • @admirdutovic990
    @admirdutovic990 5 ปีที่แล้ว

    Hello Sir. Very thankfull for teaching how to combine the SAP GUI Scripting & VBA. It is very helpfull, and I think I´ll speak for everyone wathcing your Videos. Much more I would appreciate helping me with some VBA Code and combining two of your(Tutorials) Codes into one. Extracting the Datas Using the "Referenze Number" (Video Tut #4) and Pasting into the Excel Sheet is the first Step and it Works like a charm.The next Step i have to use some of the extracted data as a search condition in another SAP TCode and take/copy the data from the Grid View (but not the whole line, only 2 fields) in an anotehr transactions. I would appreciate your time by helping me. Thanks in advance.

    • @csongorvarga
      @csongorvarga  5 ปีที่แล้ว

      Thanks for your comment. I am not sure which part you are missing, but the GridView has a GetCellValue method. You pass the line number and column name (technical name of the column) and you get the value.

    • @admirdutovic990
      @admirdutovic990 5 ปีที่แล้ว

      Thank you. Using this for loop extracts all the data from the GridView. As Im not needing all the data, i have to extract only specific columns and rows.
      For i = 0 To GridView.ColumnCount - 1
      For j = 0 To GridView.RowCount - 1
      Cells(10 + j, i + 1).Value = GridView.GetCellValue(j, GridView.ColumnOrder(i))
      Next j
      Next i
      In the GridView i have always 63 columns and 2 rows. I need (Row1 Column3) (Row1 Column37) & (Row2 Column3) (Row1 Column37) data to be extracted. What should be changed in the code? Thanks in advance for your time. Kind regards.

    • @csongorvarga
      @csongorvarga  5 ปีที่แล้ว

      Something like that:
      Cells(11, 1).Value = GridView.GetCellValue(3, GridView.ColumnOrder.Item(0))
      Cells(12, 1).Value = GridView.GetCellValue(37, GridView.ColumnOrder.Item(0))
      Cells(13, 1).Value = GridView.GetCellValue(3, GridView.ColumnOrder.Item(1))
      Cells(14, 1).Value = GridView.GetCellValue(37, GridView.ColumnOrder.Item(1))
      This will extract these 4 values to A11, A12, A13, A14. Keep playing around with the numbers if it is off by a row or column.

    • @admirdutovic990
      @admirdutovic990 5 ปีที่แล้ว

      Thank you once again, but this is not working for me.

  • @fredsohou8869
    @fredsohou8869 6 ปีที่แล้ว +1

    Csongor, very good video> Thanks a lot ! I have done it for the Tcode ZTB but the macro doesnt download the report till the last row. Do you know why ?

    • @csongorvarga
      @csongorvarga  6 ปีที่แล้ว

      Yes, that is something I have not covered in this video. Sometimes when the GridControl has many items, SAP only reads some of the items up front, and it reads the rest when you start scrolling. I don't know from the top of my head the moment, but there is a scroll property you can set and simulate scrolling in the GridView. Best if you do it line by line to make sure the line are read by the GUI.

  • @vasanthvasu8456
    @vasanthvasu8456 4 ปีที่แล้ว

    How to adda row inside a grid view ?

  • @borofornes
    @borofornes 7 ปีที่แล้ว +2

    it's very good, I did some scrips for MM01 and FB01, THANKS.
    You saved my life and my users too.
    now I'm trying to select all fields of the table by script. is this possible?
    Bye from Spain.

    • @csongorvarga
      @csongorvarga  7 ปีที่แล้ว

      It depends, the GridView has a SelectAll method which should work. But if it is a different control, it may work in a different way.

  • @dunhacoxinha
    @dunhacoxinha 3 ปีที่แล้ว

    I need to verify a grid to check if there is a variant created and then select it
    How can I use your example to check the value in the grid?

  • @briarcarlisle8080
    @briarcarlisle8080 3 ปีที่แล้ว

    How do I get SAPFEWSELib in my object browser library? Without it, I can't use the objects/properties/methods such as ".GetColumnTitles" or ".ColumnOrder"

  • @TH34693
    @TH34693 4 ปีที่แล้ว

    How do you find the SID+Client?

  • @ThejaswiS
    @ThejaswiS 5 ปีที่แล้ว

    Hi, Good Morning. May I know how to export entire MARA/MARC table from SE16N grid view to excel? Recording stops soon after the 'Save As' dialog comes up. Is there any other methods to export using VBA/VBS-GUI Scripting?

    • @csongorvarga
      @csongorvarga  5 ปีที่แล้ว

      You cannot record Save As. That is a Windows dialog box and SAP cannot script that. Enter the file name manually on the dialog box. That is the only way.

    • @ThejaswiS
      @ThejaswiS 5 ปีที่แล้ว

      Thank you so much. You saved my browsing time. Was doing R&D on this since last few weeks. May be then I need to explore some other ways then.. using SAP standard features. Somehow I wanted to get rid of this manual task.

  • @nikitlune9526
    @nikitlune9526 2 หลายเดือนก่อน

    How to loop through cntlContainer ?

  • @emolinamrtz
    @emolinamrtz 7 ปีที่แล้ว +2

    Csongor excellent videos, it is possible to execute this from Microsoft access? if so, can you show us how? thank u!!

    • @csongorvarga
      @csongorvarga  7 ปีที่แล้ว

      VintaGCR Must be, let me investigate.

    • @csongorvarga
      @csongorvarga  7 ปีที่แล้ว

      Check the latest in the playlist. I just uploaded a new video: th-cam.com/video/pKAZqS_tEj4/w-d-xo.html

  • @harriscastro535
    @harriscastro535 7 ปีที่แล้ว

    Great tutorial,, will this also work in VK13?

    • @csongorvarga
      @csongorvarga  7 ปีที่แล้ว +1

      I don't have system access at the moment, but this should work with any gridviews. List type of data in SAP screen are usually use gridview.

    • @harriscastro535
      @harriscastro535 7 ปีที่แล้ว

      Thanks for the reply

    • @harriscastro535
      @harriscastro535 7 ปีที่แล้ว

      If you can, please do a macro tutorial using AL11. on How to download/export files to local drive. A big thanks

  • @fabiob_1987
    @fabiob_1987 3 ปีที่แล้ว

    Good morning, Varga!
    Its content is of the highest value, congratulations.
    I'm trying to read a GridView Control from transaction MD04, but I'm not having success.
    the problem appears in:
    Set GridView = objSess.findById ("wnd [0] / usr / cntlGRID1 / shellcont / shell / shellcont [0] / shell")
    Would you know how to guide me?
    Thanks.

    • @csongorvarga
      @csongorvarga  3 ปีที่แล้ว +1

      Thanks. Did you just put spaces in the ID for the comment? There should be none in your code.

    • @fabiob_1987
      @fabiob_1987 3 ปีที่แล้ว

      @@csongorvarga is just in the comment. There's no spaces in the code

    • @csongorvarga
      @csongorvarga  3 ปีที่แล้ว +1

      @@fabiob_1987 OK good. Are you sure that it the correct handle for the GridView you need? Did you get it from the watch window or was that generated by the script recording?

    • @fabiob_1987
      @fabiob_1987 3 ปีที่แล้ว

      @@csongorvarga got by recording the script
      at the moment I don't know how to get this information by the watch window.
      would you know a way to get the correct handle for the Grid View from transaction MD04?

    • @csongorvarga
      @csongorvarga  3 ปีที่แล้ว +1

      @@fabiob_1987 Well, if you record a script where you go into the screen where the Gridview is, click on the gridview and stop the recording the last line in the code should have the gridview handle.

  • @desordi2001
    @desordi2001 7 ปีที่แล้ว

    The image quality is bad.

    • @csongorvarga
      @csongorvarga  7 ปีที่แล้ว

      Rodrigo Luiz de Sordi What do you mean?

    • @emolinamrtz
      @emolinamrtz 7 ปีที่แล้ว +1

      In the setup video you can select the quality, it is available in 1080p

    • @desordi2001
      @desordi2001 7 ปีที่แล้ว +1

      Sorry. You're right. tks.

    • @dunhacoxinha
      @dunhacoxinha 3 ปีที่แล้ว

      Sempre um brasileiro cagando