Тёмный
No video :(

SAP GUI Scripting - Extract Data from SAP GUI Transaction to Excel 

Csongor Varga
Подписаться 36 тыс.
Просмотров 49 тыс.
50% 1

This video provides and example of loading objects in a GUI application and extracting information from the GUI screen. This is an alternate process of extracting data for table or query when it is complicated to get.
GUI scripting allows external applications like MS Excel to connect to an existing GUI session and execute operations within the GUI. Excel does not hold and authorization and access information as it relies on you logging into SAP first.
This example is in CRM but it can be used in any GUI based SAP system.
Download the Excel file in this example from here:
drive.google.c...
Playlist of my SAP GUI scripting RU-vid playlist: • SAP GUI Scripting 1 - ...
All my GUI scripting files on Github (in case you cannot access the above link):
github.com/nyg...

Опубликовано:

 

18 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 60   
@noravaladez5918
@noravaladez5918 5 лет назад
Sir, you saved my team form an extense night of copying and pastying alot of information.
@juniormartins4509
@juniormartins4509 4 года назад
Hey Mr. Varga! Thanks in advance! You are incredible. You explains everything quite good, really easy to understand. U have just saved a lot of time!
@mamedova.5513
@mamedova.5513 3 года назад
Thanks a lot. you helped us to optimize our work pretty much... live long...
@viktorsvitek8274
@viktorsvitek8274 2 года назад
Great video, great code. Thank you.
@amandafernandesramospasson5862
@amandafernandesramospasson5862 4 года назад
great!! thank you so much
@rodrigogoni6743
@rodrigogoni6743 Год назад
Hello, Thank you for sharing all of this with everyone. Quick consult. Do you know how to close all downloaded files automatically?
@csongorvarga
@csongorvarga Год назад
What do you mean close downloaded file? Why would it be open?
@leonhart48
@leonhart48 8 лет назад
Thank you very helpful and very well detailed I like your videos
@csongorvarga
@csongorvarga 8 лет назад
+Leonardo Alcantara I am glad you like it. It appears these GUI scripting with Excel seem to interest a few people. I will try to come up with a few more scenarios and package them as separate videos.
@emolinamrtz
@emolinamrtz 7 лет назад
Do you know how to create a PO using as reference a Purchasing requisition?
@Jigor969
@Jigor969 4 года назад
Thanks for the useful information ! I've noticed that even though it is faster than a person, SAPGUI scripts run kinda slow, probably due to long response times. Would you happen to know if SAP offers some other way of automating a task ? Like an API or something similar that doesn't rely on the GUI.
@csongorvarga
@csongorvarga 4 года назад
I am pretty sure that there are many different ways to connect to SAP. I only used GUI scripting and LSMW which is almost the same thing. I think if you need performance or volume you could use RFC or BAPIs (either standard or bespoke). That way you interact with SAP directly and not via a UI layer.
@noobster9212
@noobster9212 6 лет назад
Hi there good sir, for mass extraction I recommend to clear the memory at the end of VBA coding in the RunGUIScript function
@csongorvarga
@csongorvarga 6 лет назад
Thanks for the tip.
@tpdakc7904
@tpdakc7904 4 года назад
You can make videos automatically import data from excel to SAP NetWeaver Portal
@rolandmartingumapac
@rolandmartingumapac 23 дня назад
Hi im new to VBA, i always encounter complie error in Public Sub RunScript (Currentline) i cannot troubleshoot it
@csongorvarga
@csongorvarga 23 дня назад
Hi, what is the error message?
@steverandall5977
@steverandall5977 6 лет назад
Loving these videos. This is helping me automate a whole lot of stuff that used to be very painful. 1 thing i am stuck with. i need to look at table T439C passing in a 'Scope of Planning (PUWNR), and then the last Counter (PUCNT) and then add 1 to this value so i can then use the new number to input a new record. Any ideas appreciated?
@csongorvarga
@csongorvarga 6 лет назад
Maybe you can create a script in SE16 with the output turned to ALV grid. Filter in PUWNR execute the query, sort descending on PUNCT and get the top value. It should not be complicated with an ALV grid.
@steverandall5977
@steverandall5977 6 лет назад
worked it out. im extracting from sap to txt and then importing csv into another tab, then using "=LOOKUP(2,1/(planningScope!E:E""),planningScope!E:E)+1" to find the last value and then adding one. Probably long winded but seems to work
@marceloestrada1934
@marceloestrada1934 Год назад
sorry when "On error" mine stops and doesn't continue to the next line. What could it be?
@csongorvarga
@csongorvarga Год назад
Did you use "On error resume next". Otherwise it will stop.
@hanaejabri9735
@hanaejabri9735 6 лет назад
Hello sir, I hope you are doing well. In fact, I'm in a graduation internship and I'm totally stuck in an extraction method. I have an excel sheet that contains a set of components. My goal is to extract for each component the data found with transaction md04 using excel vba. It really takes a lot of time when i use the script that allows me to extract informations for every components. Do you have an idea about another method that can help me to reduce the time of the extract data ? Thank you very much.
@dasarigayatri9278
@dasarigayatri9278 4 года назад
Hello Sir, i am able to run the script but i am not able to extract the fields as they are non editable fields in sap.I will be grateful if you could guide me on how to extract particular fields from SAP to excel
@csongorvarga
@csongorvarga 4 года назад
That does not matter. Each field have a Caption or Text property which holds the current value even if it is read only. I have a tips & tricks video where I explain how you can find your fields in the watch list and see which property holds the value.
@hemanthmaharana
@hemanthmaharana 7 лет назад
Can any possible using VBA macro to place any online orders.
@didi3d
@didi3d 7 лет назад
+Csongor Varga thx for share this video, but the script always show this error "No active session to system XXX or scripting is not enabled." how i get the SAP Active Session ?
@csongorvarga
@csongorvarga 7 лет назад
Do you have scripting enabled? Please watch my first video in this playlist, it has these details explained.
@gowthamt7955
@gowthamt7955 7 лет назад
I tried but it extracts the first line only and showing error "Run-time error 91. Object variable or with block variable not set"
@gowthamt7955
@gowthamt7955 7 лет назад
Pls help me to solve this.
@csongorvarga
@csongorvarga 7 лет назад
Did you check that in the VBA editor / Options / Preferences, the SAP GUI Scripting API is added (checked) in the list of references?
@diegodebalcarce
@diegodebalcarce 6 лет назад
In case you need to extract a Status? not a field, the status, if is green, yellow or gree, it is posible? thanks!
@csongorvarga
@csongorvarga 6 лет назад
Uh, that is a tough question. I did a very quick test. I created a simple recording using FB50 where there is a status light. It is possible to click on that and it comes to focus, therefore the script has recorded that: session.findById("wnd[0]/usr/txtRF05A-AMPEL").setFocus. You can put this into your Excel, put a breakpoint here, and add session.findById("wnd[0]/usr/txtRF05A-AMPEL") to the watch. You should see all the properties this object has and see which one has a value which represents the green/amber/red state.
@ericsanchez8692
@ericsanchez8692 6 лет назад
a question, how do you do it so that you see on the screen the excel, while working the macro? please
@amandafernandesramospasson5862
@amandafernandesramospasson5862 4 года назад
you can just reduce the size of the VBA window. another tip is that you can run the code line by line by pressing "F8", so you can see the code step by step on SAP or excel. it's easier to fix some errors
@pmorales0702
@pmorales0702 5 лет назад
Hello man, great videos, could you please put a link to the first video you mention ?
@csongorvarga
@csongorvarga 5 лет назад
There is a link to the SAP GUI playlist in the video description.
@pmorales0702
@pmorales0702 5 лет назад
@@csongorvarga thanks man!
@hanaejabri9735
@hanaejabri9735 6 лет назад
Hello,First i wanna thank you for this great video. I had a problem with the connection part. i'm connected with the user session so i had always the same msg: "No active session to system XXX or scripting is not enabled" is that related to the fact that i'm connected with the user session??
@csongorvarga
@csongorvarga 6 лет назад
The scripting functionality may not be enabled in your system. Watch the first video in the playlist or the trick and tips video, I talk about it there.
@hanaejabri9735
@hanaejabri9735 6 лет назад
I think that the script works because when i pressed extract i had the msg that shows that SAP GUI is connected.. but the macro stoped in the interface of SAP.. wich mean that the code is not able to enter to the session even that my session was already opened :( . In the W_SYSTEM i entered the ID of my system. Is that correct? Thank you so much.. i'm really confused..
@csongorvarga
@csongorvarga 6 лет назад
Well, you should have done everything as you said. You enter your SID and client in VBA here: W_System = "DCG210" (replace DCG210). That should work. If I could see your screen I would probably know more.
@hanaejabri9735
@hanaejabri9735 6 лет назад
On monday morning i will send to you the screen of SAP interface ( wich shows the SID) and my code ( because i can't open my session now) . i'm really so grateful to you sir, i'm stocked here from tuesday and i need to complete my project as soon as possible. Thank you so much.
@hanaejabri9735
@hanaejabri9735 6 лет назад
Hello sir,I sent to you ( you adress mail: csongor.varga@gmail.com) my code. I solved the problem of W_System but know i have another problem :( . My problem is that when i run the macro, i have the msg : error 91 object non défini.. i don't know where is exactly the problem .
@ruhhangaikwad6572
@ruhhangaikwad6572 7 лет назад
Hi Csongor, Thanks for such excellent video on data extraction directly from excel. Can we download expense gl data from code fs10n on similar lines ? If yes then please share video on that as well. Thanks.
@csongorvarga
@csongorvarga 7 лет назад
I am not doing videos on request. These videos show you how you can build a script for yourself.
@rennymon1
@rennymon1 7 лет назад
Hi Varga, while I opened your template in excel I can see as missing Sap gui scripting API How can I enable this, if you don't mind can you please share your mail id
@csongorvarga
@csongorvarga 7 лет назад
It is sapfewse.ocx, it should be under program files, sap, frontend, sapgui folder. Just use the Browse button to add it manually.
@Medialna_Sova
@Medialna_Sova 7 лет назад
Hi Csongor, I have a problem, excel is not pasting data from sap. Quick watch found the text all ok but it is not pasting it into excel. Any idea? Thank you sht.Cells(i, 2) = session.findById("wnd[1]/usr/ctxtRIPW0-MATNR").Text
@csongorvarga
@csongorvarga 7 лет назад
Hmm, can you try sht.Cells(i,2).Value = ...? Does your session.findById() function return the value you are after?
@sander1128
@sander1128 6 лет назад
I have exactly the same problem. When i run the script with a breakpoint and add this breakpoint to the "add watch" list it does not recognize the type as a SAP field. Therefore the result is that I cannot extend the field and choose another value that I would like to extract.
@CentroCoronelAprende
@CentroCoronelAprende 3 года назад
how to get "W_System" ??
@csongorvarga
@csongorvarga 3 года назад
That is the SID for your system and the client. You find it in the status bar of your GUI when you are logged in.
@sakthivelcslm
@sakthivelcslm 2 года назад
@@csongorvarga Sir, not able to find this..c
Далее
SAP GUI Scripting 1 - Running scripts from Excel
47:34
Просмотров 440 тыс.
7 Days Stranded In A Cave
17:59
Просмотров 52 млн
GUI Scripting - Extract Large Tables
41:54
Просмотров 19 тыс.
SAP GUI Scripting - Order Creation from Excel
20:49
Просмотров 48 тыс.
Exporting data from SAP using GUI scripting
8:36
Просмотров 24 тыс.
SAP GUI Scripting - Reading GridView Control
31:25
Просмотров 24 тыс.
SAP GUI Scripting - Office Reporting
34:39
Просмотров 21 тыс.