SAP GUI Scripting Tricks, Tips and Basics

  Рет қаралды 166,598

Csongor Varga

Csongor Varga

Күн бұрын

Пікірлер: 106
@glinkot
@glinkot 6 жыл бұрын
This was fantastic Csongor. Exactly what I was looking for! I'm going to try and do it with C#, but this answered lots of my questions. I liked the idea of scrolling the window to get all records too - though I might try just hitting 'end' to see if it gets them all that way too. Thanks again
@prieshvalabh6562
@prieshvalabh6562 7 жыл бұрын
Hi Csongor,Thank you for all the useful and helpful scripts/videos you share, I use them in my daily work to develop reports.I thought I share my loop where you scroll line by line in the gridview table, this I have used for SAP GUI Scripting in MS Access:Once you are at your relevant GRIDVIEW table you want to extract , then below script to follow:' Save the gridview control as a local object Set GridView = objSess.FindById("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell") If GridView.RowCount >= 1 Then Do GridView.SelectedRows = CStr(sapRow) GridView.SetCurrentCell sapRow, "VTGNR"{{{{1st Field of my GRIDVIEW Table}}}}} >you need to change to your field name. GridView.SetFocus sapRow = sapRow + 1 If sapRow >= GridView.RowCount Then Exit Do GridView.FirstVisibleRow = sapRow GridView.SelectedRows = CStr(sapRow) Loop End IfI hope this will members who will be interested. Best RegardsPriesh ValabhP.S. Do you perhaps , have any VBA scripts for SAP analysis for office data to be transferred into MS Access:Much Appreciated.
@johnsnodgrass839
@johnsnodgrass839 3 жыл бұрын
Thank you for your selfless contribution!! Very helpful and very much a time-saver for those of us just getting on our feet :)
@amandafernandesramospasson5862
@amandafernandesramospasson5862 4 жыл бұрын
again: thank you very much!!!!!!!! this playlist made my work so much easier
@allabout1135
@allabout1135 6 жыл бұрын
Thank You so mutch! This was amazing. I am on way to learn GUI Scripting. For now This was great introduction in topic. Pleas continue explain and educate us in this topic. Waiting for next videos / SAP GUI Scripring and VBA Macros/ Thanks one more time! MY FAVORITE CHANEL :)
@dpworld7714
@dpworld7714 6 жыл бұрын
I am getting an error the control could not be found by id while creating PO's by using script in me21n could you please advise me any solution.Thank you so much!!
@kevinxu3859
@kevinxu3859 6 жыл бұрын
Thank you for the new post. Good video for script learning.
@kalimullah7768
@kalimullah7768 4 жыл бұрын
Hello sir good day sir my question is How to bulk picking list post and generate many invoices I tried in VL06 mark picking list and selected date then post picking list posted but invoice one ready
@kavitadevupalli4676
@kavitadevupalli4676 3 жыл бұрын
Hello Csongor, thank you for your valuable contribution. Could you please share the above scripting example(Order creation) templet for ref. I couldnt able to find that in your above-shared folder.
@garycalverley6988
@garycalverley6988 3 жыл бұрын
Thanks for posting the video's, these are all very helpful. However; I don't find your excel example to download now... has it been removed?
@csongorvarga
@csongorvarga 3 жыл бұрын
Oh yes, I must have forgotten it. Link is added now.
@jagadeshk2759
@jagadeshk2759 6 жыл бұрын
Hi Csongor, All the tutorials you explained are awesome. I have gone through all the xlsm files which you shared except this scroll down file. If you share that file too, that will be really helpful. Thanks and keep up doing this for work.
@karthikgunda4602
@karthikgunda4602 5 жыл бұрын
Wonderful, thank you very much for making these videos
@limwei2634
@limwei2634 2 жыл бұрын
Hi Csongor, thank you for the video. The debugging using add watch is very useful. Would that work for before recording the script? I am trying to find the ID whenever I face pop up during loggin in session.
@csongorvarga
@csongorvarga 2 жыл бұрын
I would record the script that goes to that pop-up window and debug that.
@limwei2634
@limwei2634 2 жыл бұрын
@@csongorvarga thanks csongor. Didn't realized I could do that when logging in. I managed to automate report generation and is looking into python script to run sap GUI script. Thanks again
@mohammadsuheb.l9872
@mohammadsuheb.l9872 Жыл бұрын
How to set date from - to in excel and what's the code i have to add ?
@siddheshguravg8
@siddheshguravg8 3 жыл бұрын
I need help with the right bottom arrow button (status fields).. the details currently shown is the system name... My requirement is to click on it using automation to take screenshot of system, client, user, etc. Any help is appreciated..
@amitkumaramit8384
@amitkumaramit8384 3 жыл бұрын
Is there a way to get the list of SAP GUI connection names in the system using VBA?
@sandornyemcsok4168
@sandornyemcsok4168 5 жыл бұрын
Helló Csongor, a mappa és/vagy filenév kiválasztás egyszerűen megoldható a VBA-ban (van rá parancs, egy sima Windows API hívást generál). Ha érdekel, megmutatom, hogyan lehet használni.
@mayurrathor3897
@mayurrathor3897 4 жыл бұрын
I want to copy a comment from Sap and pest in my excel sheet How can I do ? Please help me with small video or code
@mitchfoley816
@mitchfoley816 5 жыл бұрын
Hello Csongor, Thank you for making these helpful videos. I don't currently have access to script recording, but am in the process of gathering information so I can propose the idea to management. Winshuttle is currently used where I work, and I was wondering if you had any idea of how scripting compares to what is offered by Winshuttle. I am under the impression that Winshuttle provides templates for batch processing where as scripting basically allows you to make your own template. Thanks again.
@csongorvarga
@csongorvarga 5 жыл бұрын
Thanks. I never used Winshuttle but I think it also uses scripting and builds an environment around it so you do not have to do any coding at all. Create a recording, Winshuttle identifies the variables in the recording, puts them into Excel and loops the script over and over with the data you maintain in Excel.
@kaiqueWinicios
@kaiqueWinicios 2 жыл бұрын
Hisongor, can you recomend me a pdf guide about it?
@raulenriquez2313
@raulenriquez2313 6 жыл бұрын
how can you connect Excel with SAP? do you need to activate aomething in Excel? or to download some pluins?
@csongorvarga
@csongorvarga 6 жыл бұрын
Didn't you watch this video? Everything you need is explained here.
@cassiowunsch
@cassiowunsch 2 жыл бұрын
I need to select an item from a dropdown list in SAP via VBA, but I cannot find a code that works. Could you help?
@csongorvarga
@csongorvarga 2 жыл бұрын
Record with a script. It is just setting the field value to the code behind the dropdown value.
@cassiowunsch
@cassiowunsch 2 жыл бұрын
@@csongorvarga the recorded script part for this step is "...Key. = "B9" Where B9 is the output of the drop-down list which I want to use, but the macro doesn't recognize it. It just ends without any error.
@agamtyagi4129
@agamtyagi4129 2 жыл бұрын
Hello Csongor, Thank you for making these helpful videos. can we do multiple sap sessions at same time using sap gui scripting? Please respond.
@csongorvarga
@csongorvarga 2 жыл бұрын
You mean connecting to different SAP systems? Yes of course. You probably need to create different objects for each session, but there is no reason it would not work.
@harmeetsingh1991
@harmeetsingh1991 2 жыл бұрын
Hi Csongor, In my organization Script record is disabled, is there any other way to run script?? If we have readymade
@csongorvarga
@csongorvarga 2 жыл бұрын
If only script recording is disabled, you can play the script. That is two different system settings. If you cannot play a script, probably the entire scripting is disabled.
@jameszack7158
@jameszack7158 8 ай бұрын
14:35 why don't you automatically export the grid data to an excel file and read this excel file, instead of scrolling down to the end?
@csongorvarga
@csongorvarga 7 ай бұрын
To be honest, I was 5-6 years ago when I started to work on this, when the SAP GUI was older version and direct Excel export never worked reliably for me. But it may be easier to do nowadays.
@tpdakc7904
@tpdakc7904 4 жыл бұрын
You can make videos automatically import data from excel to SAP NetWeaver Portal
@carlosdelacruz9910
@carlosdelacruz9910 6 жыл бұрын
Hello Csongor, thank you for putting together these videos. I have a question, can you replace the Id with the IconName? For example, replacing "wnd[0]/usr/txtRF05A-AMPEL" with "S_TL_Y". I'm getting started with SAP scripting and I wonder if there's a way to shorten the lines of code since they are sometimes hard to read with such long Ids. Thank you.
@csongorvarga
@csongorvarga 6 жыл бұрын
No, the ID is the ID of the screen element. That is controlled by SAP, so it has to stay like that. S_TL_Y is SAP's ID for the amber icon. Most probably that is the icon's internal technical ID. We have to use it like that.
@carlosdelacruz9910
@carlosdelacruz9910 6 жыл бұрын
Thank for getting back to me. Once again, thank you for putting together these helpful videos.
@empressjaylinton8317
@empressjaylinton8317 6 жыл бұрын
Need to know how I can export from SAP to Excel, however; the video is not available. Can you assist?
@csongorvarga
@csongorvarga 6 жыл бұрын
Sorry, what do you mean the video is not available? I did not put any restriction to the video, it should be available everywhere, unless Google has other ideas.
@jonCEF
@jonCEF 3 жыл бұрын
HI! I am trying to use the SAP script but in my SAP, it's grey out and when I go into the setting trying to be enable it, its "Scripting is not installed". Do you have the steps or ways to download it?
@csongorvarga
@csongorvarga 3 жыл бұрын
Where does it says that "scripting is not installed"? You may have to talk to your basis people about that.
@ahmed_elalfy
@ahmed_elalfy 6 жыл бұрын
Hi there Csongor. Brilliant video series on SAP GUI Scripting thanks for that. Have got a problem with Playing back in the recorder. I have recorded the Scripting, and when i tried to play it in the recorder, nothing happened. Or do i need to only playing it back using the code in Excel? Any help with that would be great thank you.
@csongorvarga
@csongorvarga 6 жыл бұрын
No, the playback from the GUI tools should be working all the time. I can't tell why this is not working for you.
@chijinkumar7995
@chijinkumar7995 3 жыл бұрын
Hi Sir, how to enable virtual keys in SAP GUI as when I try to use sendVkey 82 (for downarrow key ) it throws an error saying "Virtual key is not enabled".How to solve it?
@csongorvarga
@csongorvarga 3 жыл бұрын
I don't know, never heard of virtual key. But why do you want to send a down arrow key?
@chijinkumar7995
@chijinkumar7995 3 жыл бұрын
@@csongorvarga I wanted to download a series of files from SAP directory so putting in a loop and moving down to next files requires that key so I asked. Anyways thanks for the reply
@csongorvarga
@csongorvarga 3 жыл бұрын
@@chijinkumar7995 OK, I understand. The list which contains your files, probably has some different ID. So it would be possible to highlight each line using scripting and not rely on the down arrow keypress.
@deepakkumar-hs1oe
@deepakkumar-hs1oe 6 жыл бұрын
Hi Csongor Very informative videos and really you have explained it very well. i have learnt a lot from your videos. keep posting :) i have a doubt can we take a screenshot in sap not from keyboard but from sap so i can use it in scripting and also can we send that screenshot to a word doc? or save it in my PC as a image or mail it to my Email. i have searched there are some codes on google which do something like this but iam not able to get that code some errors i get. if possible can you post a video which can cover my query. Thanks a lot for your videos very very helpful. Please keep posting i have some more doubts but one at a time.
@csongorvarga
@csongorvarga 6 жыл бұрын
Thanks. Interesting issue. I have never tried this before. I have found a few examples in which you simply send the PrintScreen key combination from Excel which triggers Window Screen Capture and just paste it into your Excel document. I assume the same can be done with Word as well: stackoverflow.com/questions/43904385/using-excel-vba-macro-to-capture-save-screenshot-of-specific-area-in-same-file
@deepakkumar-hs1oe
@deepakkumar-hs1oe 6 жыл бұрын
@@csongorvarga Hi Csongor Writing again 😊 also want to thanks for your videos very helpful. Coming to point. Need a small help from you. Can you provide me your email address or just ping me on dkdeepak45@gmail.com so I can take help from you via mail. Thanks in advance session.findById("wnd[0]").maximize session.findById("wnd[0]/tbar[0]/okcd").text = "/nsmlg" session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/mbar/menu[2]/menu[0]").select session.findById("wnd[0]/tbar[0]/btn[71]").press session.findById("wnd[1]/usr/txtRSYSF-STRING").text = "number of users" session.findById("wnd[1]").sendVKey 0 session.findById("wnd[2]/usr/lbl[18,2]").setFocus session.findById("wnd[2]/usr/lbl[18,2]").caretPosition = 8 session.findById("wnd[2]").sendVKey 2 session.findById("wnd[0]/usr/lbl[18,7]").caretPosition = 7 session.findById("wnd[0]").sendVKey 0 This is a code in which I want to get the number of users from the smlg tcode and to Excel I want to save that so . My question is I am changing caretposition by text then it gives error in the code can you please shed some light on this. Again thanks in advance
@dinaaltamimi179
@dinaaltamimi179 3 жыл бұрын
Hi, i want to select for an everday report the date from yesterday, nut only the working days. How can i do that? I tried "Date - 1" but also for saturdays and sundays. This is not what i want. Could you please help me. Thank you :-)
@csongorvarga
@csongorvarga 3 жыл бұрын
Yes you can do that in variants. Save a variant, and when you are in the variant screen, find your date field in the list, go to the Selection variable field, and pick "D", and in the Name of the Variable, you can select "current date +/- ??? work days. Set Include and the operator for that option. When you click OK on that screen you can enter the day value with sign, for example -1 and the factory calendar based on which the work days will be calculated.
@dinaaltamimi179
@dinaaltamimi179 3 жыл бұрын
@@csongorvarga Thank You so much 🙏
@deandog7223
@deandog7223 Жыл бұрын
Hi Csongor, is there a function that you have, where I can find the object, without having a full path? for example, FindByName, but a short way. Example: "FindById(wndpath & "/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB1:SAPLMEGUI:6000/cmbDYN_6000-LIST").setfocus" ... is there a way to myObj = function(inputs). Then myObj.setfocus or Text = myObj.value ?
@csongorvarga
@csongorvarga Жыл бұрын
Oh yes sure. You can use findbyid and put the result into an variable (type Object) and later reference to that as variable.property.
@JorgeOyanadel
@JorgeOyanadel 5 жыл бұрын
Espectacular...muchas gracias
@chandankumar-go4jc
@chandankumar-go4jc 3 жыл бұрын
Is it possible to run previously recorded macro if recording script and playback option is disabled. If yes please let me know how.
@csongorvarga
@csongorvarga 3 жыл бұрын
If the playback is disabled, no. If only the recording is disabled it is possible to play.
@chandankumar-go4jc
@chandankumar-go4jc 3 жыл бұрын
@@csongorvarga Script recording and playbck is grey out.
@RuiMourisco
@RuiMourisco 5 жыл бұрын
Everything was working fine (all configurations are ok) , but suddenly the GUI Script's play button stopped working, I can't run scripts anymore , but I can record scripts, but then I can´t play them, I don't even can choose a script to run, , but they are in the folder. That's weird. I'm running SAP GUI 750 final release with win 10 pro 1903 ( an update was performed 2 days ago...). I don't know what's wrong, I suspect it can be the windows update, or not... :(
@csongorvarga
@csongorvarga 5 жыл бұрын
Uh, I have not experinced it myself. Could be new basis/security settings in RZ11 which disabled script playback?
@dimasjimenez3396
@dimasjimenez3396 3 жыл бұрын
Is there a tcode/table where we can get a list of all the fields avaible in every tcode? Something like tcode SE75, but that it contains the field as they are required in the script, something like from: /app/con[0]/ses[1]/wnd[0]/usr/lblRV45S-BSTNK > this part: lblRV45S-BSTNK?
@csongorvarga
@csongorvarga 3 жыл бұрын
Sorry, I have no idea how to get that. I don't think that is something that would be stored in a table. But if you get the object /app/con[0]/ses[1]/wnd[0]/usr/ you can go through it's child items in the code one-by-one. And you can get the information that way.
@dimasjimenez3396
@dimasjimenez3396 3 жыл бұрын
@@csongorvarga Ok thanks. It will work out that way.
@claudioferreira6861
@claudioferreira6861 3 жыл бұрын
Hi Csongor, How can i run in PRD system a script recorded in QA? thanks
@csongorvarga
@csongorvarga 3 жыл бұрын
In my examples, I either have a reference to the system in the VB code, or a cell in the worksheet. You just change that and the script connects to your PRD system.
@claudioferreira6861
@claudioferreira6861 3 жыл бұрын
@@csongorvarga Thanks a lot, but the PRD System not recognise the transaction ID.
@deepakkumar-hs1oe
@deepakkumar-hs1oe 6 жыл бұрын
Hi Csongor Please can you help me with some issue ... I have mentioned them in my last comments reply to you. Please thanks in advance
@Toxice404
@Toxice404 3 жыл бұрын
Im a beginner and I have a sap gui script that i want to debug, what should i do?
@csongorvarga
@csongorvarga 3 жыл бұрын
You can put a breakpoint in the code in Excel document where you pasted in the recorded script. The execution will stop at that point, you can put variable into the watch window. I don't think you can debug outside Excel.
@marcelknegt6521
@marcelknegt6521 3 жыл бұрын
I'm struggling with the connection to SAP Gui 7.4. This is different then the SAP Gui 4.6 right. Can you help me with this? I'm also searching for your first training, but can't find that video.
@csongorvarga
@csongorvarga 3 жыл бұрын
I think you are looking for this: kzbin.info/www/bejne/pYGzmXRnabWgY5o. I am at 7.6 at the moment. I did not use scripting recently, but I am sure I used it on 7.4 in the past. What is your issue?
@marcelknegt6521
@marcelknegt6521 3 жыл бұрын
@@csongorvarga Somehow my Excel scripting can't seem to connect with the SAP Gui 7.4 and then select needs yo find the correct SID and Instance number. It should be PRD500 but in the properties I see System ID = PRD and Instance number = 54. I have tried both but I get every time an error: "No active session to system PRD500, or scripting is not enabled. Then the scripting stops at " Set objSbar = objSess.FindById("wnd[0]/sbar")" Btw I doesn't have access to RZ11. I have requested that and I hope I get it!!!
@csongorvarga
@csongorvarga 3 жыл бұрын
@@marcelknegt6521 Well, first of all in your SAP gui, select Customize Local Layout button, and pick Script Recording and Playback from the menu. If the play button is disabled there, scripting is disabled in PRD 500. So you need to enable it (get RZ11 access or get basis to do it).
@postvdo6313
@postvdo6313 3 жыл бұрын
great vdo indeed
@GuiiiMonteiroo
@GuiiiMonteiroo 6 жыл бұрын
How can I study SAP in home? today i can use SAP only in the job =/ There's some test Version that i can download?
@csongorvarga
@csongorvarga 6 жыл бұрын
I don't think there is a free open system and there is certainly no version that you can download. Open.sap.com has a lot of free courses (mostly high level), maybe some will allow to create a test account to a cloud version to try.
@dasarigayatri9278
@dasarigayatri9278 3 жыл бұрын
Hi Csongor, can you upload a video for exporting sap data directly to ms access table using GUI scripting
@csongorvarga
@csongorvarga 3 жыл бұрын
I did one video how you can use Access with GUI scripting: kzbin.info/www/bejne/pnyki6SJlNl4oJY
@dasarigayatri9278
@dasarigayatri9278 3 жыл бұрын
@@csongorvarga I couldn't set grid view
@dasarigayatri9278
@dasarigayatri9278 3 жыл бұрын
@@csongorvarga It is throwing an error that control could not be found by id
@csongorvarga
@csongorvarga 3 жыл бұрын
@@dasarigayatri9278 The example is specific to the screen I designed it for. You need to create your own recording for your own transaction and adjust the VB code.
@PedroTancredo
@PedroTancredo 5 жыл бұрын
Hi! Great video, already helped me alot with the scrolling tip! Where can I download the example file GUI_Scripting_BDN_Download.xlsm? Thanks!
@csongorvarga
@csongorvarga 5 жыл бұрын
Thanks. There is a link in each video description. I have a separate video on BDN Download.
@muhammednooh1
@muhammednooh1 5 жыл бұрын
How to avoid errors
@dunhacoxinha
@dunhacoxinha 4 жыл бұрын
if I make you a question, is it possible to you answer me? Sorry my bad english :(
@muhammedcansoy1434
@muhammedcansoy1434 4 жыл бұрын
Thank you god bless you
@blessfuljewellozano9635
@blessfuljewellozano9635 4 жыл бұрын
Hi Thank you so much for this ... highly appreciated.... Can I have a request ... hoping you can also have a video regarding to looping and variables in the SAP script ex. session.findById("wnd[0]/usr/tblSAPLKOBSTC_RULES/txtCOBRB-GBISP[10,0]").Text = Selection.Offset(0, 1).Value i want to part [10,0] became variable
@csongorvarga
@csongorvarga 4 жыл бұрын
I don't have access to SAP right now. But you can use a for loop, and use the loop variable as part of the statement like session.findById("wnd[0]/usr/tblSAPLKOBSTC_RULES/txtCOBRB-GBISP[" + i + ",0]").Text
@srivatsa2233
@srivatsa2233 3 жыл бұрын
@@csongorvarga Very thanks for your reply!!! It really solved my problem :)
@slipvanei
@slipvanei 7 жыл бұрын
Great tricks
@osmanalbakheit575
@osmanalbakheit575 4 жыл бұрын
SAP GUI Scripting ‘How to avoid system messages during recording/playback’
@csongorvarga
@csongorvarga 4 жыл бұрын
Go into the GUI Options and there you can turn off notification when scripting starts.
@torrentpharmaceuticalsltdv4240
@torrentpharmaceuticalsltdv4240 5 жыл бұрын
hi boss how to download pdf format in sap plzzz tell me boss
@Deedington
@Deedington 5 жыл бұрын
Please dont swallow your words. That will improve your presentation.
SAP GUI Scripting - Extract SAP report data to Excel
17:40
Csongor Varga
Рет қаралды 321 М.
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 81 МЛН
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 7 МЛН
Человек паук уже не тот
00:32
Miracle
Рет қаралды 4,3 МЛН
10 Tips and Tricks for all types of SAP Users
7:56
Sampath Kumar
Рет қаралды 41 М.
SAP GUI Scripting - Order Creation from Excel
20:49
Csongor Varga
Рет қаралды 49 М.
SAP & Excel - 10 SAP GUI Scripting Tips 🚀
27:37
ERP UP
Рет қаралды 3,6 М.
Automate Data Extraction with SAP GUI Scripting & Excel Macro VBA [english]
14:20
SAP GUI Scripting - Reading GridView Control
31:25
Csongor Varga
Рет қаралды 24 М.
IPC: To Share Memory Or To Send Messages
14:15
Core Dumped
Рет қаралды 45 М.
GUI Scripting - Extract Large Tables
41:54
Csongor Varga
Рет қаралды 19 М.
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 81 МЛН