@Csongor Varga - thanks for this. I have a question about the grid view object. I am running a report in SAP that contains several thousand records and in the grid view of SAP, I have to page down to get to the end. When I execute the script in Access, I am only extracting a few hundred records. Is there a way to define the grid view object in the code so that it includes all the records in the SAP screen? I was thinking that because my grid view in SAP contained many records that were not visible until I scrolled down, that somehow that was causing Access to only extract the 'visible' records from SAP.
Actually, I think faced the same issue before. The gridview has a VerticalScrollbar object. It has some attributes like Maximum. Create your main for loop 'i' from 1 to VerticalScrollBar.Maximum. And within the loop issue a VerticalScrollBar.Position = i command. This will simulate the scroll action which will make GUI to read the data and you will be able to export everything. I used this in CRM in transaction SMW01. There is probably a Gridview as well, but I am not 100% sure. Try this, it will hopefully work.
Thanks - I tried looking for the VerticalScrollBar object in the Watch, but was unable to find it. To see if I had the object name right, I recorded another script while scrolling down on the grid view. What I was able to find was a property called 'FirstVisibleRow'. I tried several different ways of scrolling down my report - using the vertical scroll bar, the arrows, page down, etc. but the only script recorded for each was FirstVisibleRow, which would increase as I moved down the report. My report had over 16k records and it seemed to be stopping around record 100. Stepping through the code, I found it was error-ing out at that point. There are about 50 visible rows at any given time on my screen, so I believe the program needs to 'see' where the records are in order to perform the script (just a guess, I honestly don't know if that's really what is required). Maybe I have a different 'type' of grid view in this particular report. Anyway, what I ended up doing was taking the FirstVisibleRow and adding it along with the counter - GridView.FirstVisibleRow = i - this solved the issue, but with 16k lines, it took a while to run through it, as it scrolled down the report on screen as the code was running. Regardless - thanks for your help - it has really opened my eyes to the possibilities of gaining some productivity!
I like this method, but after scripting running about 100 row, all row after that always blank . I try to make it slowdown but nothing change. Can you have me pls!
Yes, I have noticed the same too. I have a tips and tricks video in which I talk about this. But in summary GUI does not load the entire list view, but the content is loaded on demand when you scroll in the view. So for very large lists, you need to scroll the view as you read the data and GUI will always read the data from the server before you extract it. These controls have a properties for scroll position which I update to move the view along with the data I am extracting.
Hi Csongor, Thanks your video. I got a error message "Object doesn't support this property or method" on the code: GirdView.GetCellValue, do you know why? I use Access2010.
Thanks Csongor, you've come to my rescue again - very useful transformation of the SAP GUI to excel extract query
Excellent!!!!! Great, I will try to use it soon
it is working thanks so much
Hi !
Why the script takes only 84 rows from sap.. i need the complete table.. have anyone an idea how i can realize it
@Csongor Varga - thanks for this. I have a question about the grid view object. I am running a report in SAP that contains several thousand records and in the grid view of SAP, I have to page down to get to the end. When I execute the script in Access, I am only extracting a few hundred records. Is there a way to define the grid view object in the code so that it includes all the records in the SAP screen? I was thinking that because my grid view in SAP contained many records that were not visible until I scrolled down, that somehow that was causing Access to only extract the 'visible' records from SAP.
Actually, I think faced the same issue before. The gridview has a VerticalScrollbar object. It has some attributes like Maximum. Create your main for loop 'i' from 1 to VerticalScrollBar.Maximum. And within the loop issue a VerticalScrollBar.Position = i command. This will simulate the scroll action which will make GUI to read the data and you will be able to export everything.
I used this in CRM in transaction SMW01. There is probably a Gridview as well, but I am not 100% sure. Try this, it will hopefully work.
Thanks - I tried looking for the VerticalScrollBar object in the Watch, but was unable to find it. To see if I had the object name right, I recorded another script while scrolling down on the grid view. What I was able to find was a property called 'FirstVisibleRow'. I tried several different ways of scrolling down my report - using the vertical scroll bar, the arrows, page down, etc. but the only script recorded for each was FirstVisibleRow, which would increase as I moved down the report. My report had over 16k records and it seemed to be stopping around record 100. Stepping through the code, I found it was error-ing out at that point. There are about 50 visible rows at any given time on my screen, so I believe the program needs to 'see' where the records are in order to perform the script (just a guess, I honestly don't know if that's really what is required). Maybe I have a different 'type' of grid view in this particular report. Anyway, what I ended up doing was taking the FirstVisibleRow and adding it along with the counter - GridView.FirstVisibleRow = i - this solved the issue, but with 16k lines, it took a while to run through it, as it scrolled down the report on screen as the code was running. Regardless - thanks for your help - it has really opened my eyes to the possibilities of gaining some productivity!
Thanks for the feedback. I am glad that it worked out.
@@aldonova266 Awesome
Hi Varga, any idea about how to extract more than 8 millions records from one SAP table to a MS. access table?
Thanks in advance.
Where are those 8 million records?
Set GridView = objSess.FindById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell/shellcont[0]/shell") HELP ?????
I like your work. I have to ask I am try to take the access and pull the data in se16. any is on the right path?
James Gilliam I do have a video on how to get data out via se16. You can always export to csv, txt and import it into access or excel.
thanks I didn't think about exporting it than importing back into access.
Sorry, I did not understand you. What is it you are trying to do?
I like this method, but after scripting running about 100 row, all row after that always blank . I try to make it slowdown but nothing change. Can you have me pls!
Yes, I have noticed the same too. I have a tips and tricks video in which I talk about this. But in summary GUI does not load the entire list view, but the content is loaded on demand when you scroll in the view. So for very large lists, you need to scroll the view as you read the data and GUI will always read the data from the server before you extract it. These controls have a properties for scroll position which I update to move the view along with the data I am extracting.
I have found the website erptrainingtech and it is working well, have you guys tried?
Hi Csongor, Thanks your video. I got a error message "Object doesn't support this property or method" on the code: GirdView.GetCellValue, do you know why? I use Access2010.
It is hard to tell without seeing the actual setup. But it is possible that the GUI control is not a gridview, but something else.