SAP GUI Scripting 1 - Running scripts from Excel

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

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

  • @dipeshbhardwaj1945
    @dipeshbhardwaj1945 7 ปีที่แล้ว +17

    Thank you so much.. This is very helpful and informative.

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

      why is sap so complicated ?

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

      @@trimerista So it can keep all the SAP consultants with jobs :)

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

      @@csongorvarga hahaha

  • @SogaMaplestory
    @SogaMaplestory 3 หลายเดือนก่อน +2

    Just coming back to this to say that this video somewhat started my career for real

    • @csongorvarga
      @csongorvarga  3 หลายเดือนก่อน

      Thanks for this comment :)

  • @thebiggarbox
    @thebiggarbox 7 ปีที่แล้ว +9

    Varga, you are THE MAN. Very well explained. 2417 Task Lists released without breaking a sweat. Now to think what else this could be used for!

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

    I watch this without SAP yet for my new job that will start tomorrow. lols. but I do understand the execution and content. Very helpful. Thank you sir!

  • @paulskelton8799
    @paulskelton8799 ปีที่แล้ว

    This is excellent and as relevant today as when Csongor took the effort to share. I've used SAP for some time but only very recently learned of this scripting functionality. Also playing with using Power Automate Flow (executing the SAP VB Scripts) & SAP scripting to effectively export SAP report data to automatically update Power BI reports. I struggled with the same issue as I can see several others have which is the system / client name. My test system is QU1 and Client is 003 hence enter QU1003 in cell 8 of the Excel. Many thanks for sharing your knowledge and can imagine many applications for this

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

      Power Automate and Power BI is a good combination. I did not think about that!

  • @Peter86G
    @Peter86G 3 ปีที่แล้ว +2

    Thank you very very much for this. Very helpful. I edited your script for MM01-Material master data creation. Starting the script is saving my wrist pain 😊

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

    I've used your excel as a basis for a script I made. This saves us a lot of time. Thanks for sharing and taking your time to make such a deatiled video. Highly appreciated.

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

    Thank you very much ! It solved my problem to mass data load that was not working with LSMW. You have my subscription.

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

    Csongor, igen menő vagy, köszi szépen. Pár nappal ezelőtt kerestem rá guglin a SAP scriptingre és Te voltál az első találat. Videóidnak köszönhetően sikerült is saját scripteket készítenem, aminek nagyon örülök. Köszönöm, hogy megosztottad a tudásodat!

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

      Orulok hogy segitett. Ez a slager temaja a csatornamnak, annak ellenere hogy ez csak 5-6 video.

  • @felipeandrade709
    @felipeandrade709 5 ปีที่แล้ว +2

    It worked perfectly to us!!! You saved a lot of effort and time from my team by sharing your work and knowledge!! Thank you!!

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

    how would you capture the error from the display at the bottom or if any windows appear at the front... I tried it but vbscript just loop over the error message

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

    That was extremely well done and easy to follow. THANK YOU TONS AND TONS.
    I just executed my first script and have a list of new ones that I am going to start developing.

    • @SandeepSingh-xg6sz
      @SandeepSingh-xg6sz 5 ปีที่แล้ว

      Hello.. Can u please tell me how to write that language format.. I want to make a script to run on SAP.. Pls ans me.. It would be appreciated

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

    THANK YOU VERY MACH FROM RUSSIA, MAN! I LOVE YOU! THE BEST GUIDE I'VE EVER SEEN! TOTALLY UNDERSTAND! THANK YOU!

  • @Maxim.Teleguz
    @Maxim.Teleguz 7 ปีที่แล้ว +3

    is there a way of running scripts local/client only without server option? Moving the menu's around like that shouldn't be Dependant on the server. This is what is freaking out the place i work for, they are worried at backend issues and wont enable the scripting. If i could show them that this is only local then they might enable it.

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

    Dear Varga, today the macro stopped working (after I allowed standard windows update) - Error I got concenrns this line:
    objSess.findById("wnd[0]").maximize. Erorr msg: Method Maximize of object 'IsapMainWindowTarget' failed. Any idea what happened? Thank You

  • @TaraCotz
    @TaraCotz 2 ปีที่แล้ว

    How do you use this with SAP BI ( online)? We have a broadcaster function on our company SAP. To extract data to be used in Excel, we use a hyperlink which takes us to a prompt window and from there we choose the month for which we want to extract data for and the query presents itself in table format online. Then we export it to excel and work with it in excel. My question is how to automate this? How to get multiple reports set on broadcaster with dynamic prompt? Is there a way?

  • @99josna
    @99josna 8 ปีที่แล้ว

    Hi Csongor Varga, I just started exploring SAP Scrit and saw the Video, excellent explanation and learned lot, Thanks

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

      You are welcome!

    • @99josna
      @99josna 8 ปีที่แล้ว

      If you don't mind can I ask a question, for some changes we do in SAP there will be pop up window how do
      I read it in macro and press enter only when there is window popped up.

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

      +Satish Kumar I have covered this in another episode in my channel. Before the line for the pop-up window add "on error resume next" that will ignore any errors and continue the next line in the code.

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

    what us Tcode is just in excel hardcoded or is this anything related SAP?
    and where do we get DCG210 (A8 CELL VALUE).

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

    i have SAP v7.6 but cant find the SAP Gui Scripting API even using browse. did it get changed or integrated in anything else?

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

    Hi Csongor ,
    I was using the code and during the execution of my code, I have one error as follows " No active session to system P01 with transaction MM02 or scripting is not enabled.
    How to proceed? Any advice

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

    When I open up C:\Program Files(X86)\GUI, I only get the following two folders:
    SAP Business One
    SAP Business One DI API
    no sign of ...SAP\frontend\sapgui . Using Agent Ransack, file name *GUI*, I only find \SAP Business One\GUI, and no files with the string GUI or gui in it.
    Do I have the wrong version of the client?

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

      It looks like you have Business One. To be honest, I don't know how that compares to the ERP SAP, but I think that does not use GUI. So this will not be any use for you.

  • @AndresGarcia-ju7wm
    @AndresGarcia-ju7wm 2 ปีที่แล้ว

    Hi! Thank you a lot! I only have one question. I can run a vba code that runs different transactions in different SAP sessions? Thank you!

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

      Yes, in my code I create a variable for a session and connect to a gui session based on the sid and client id. You can create another session variable and connect to another session in the same system or even different system. I have never done an example like that, but I see no reason why it would not work.

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

    HI Csongor,
    This has helped me a lot when updating Multiple PO Lines in ME22N.
    I just have one question though.
    When I first recorded it, it is working.
    However after a few days, it is no longer working.
    I have rerecord the steps again for it to work.
    Not sure what the problem is.

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

      Thanks. Well, I am not sure what the reason can be. You can always debug the code and run the scripting part step by step. That way you see which lines are executed and where the script stops. It is possible that there is a pop-up message which will block the script from running the next line. You can also comment out the "On Error Resume Next" line and your script will stop where the issue is. Warning messages, confirmation pop-up messages could be causing the script to fail in certain cases.

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

    Thanks for video . I have a question about data extraction from SAP, for example, I have an excel file and I want to feed them from SAP as real-time or whenever I want due to this file feeds to other system Power BI or Other Reporting tools
    what is the best solution for this case ? Could you please give me a recommendation ?

  • @ManishSingh-to7cz
    @ManishSingh-to7cz 8 ปีที่แล้ว

    Hi Varga,
    I am facing error while connecting to SAP, Error is received on the bellow statement:
    " For il = 0 To objGui.Children.Count - 1 "
    Error: Run-time Error '91'
    Object Variable or With block Variable not set.
    Request your help in letting me know which variable need to be defenied.
    Thanks

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

    Hi Csongor
    when I use an vpn server connection and I start the vba-script in Excel then I get an error
    no active session to system ...., or scripting is enabled andbefore I start the vba-script I was login in Sap.
    After I select the OK button of the error message box I get the error Run-time error '91': Object variable or with block variable not set
    Do you have an solution for this issue?
    regards Gerrit

  • @pythonlearn4752
    @pythonlearn4752 2 ปีที่แล้ว

    Hi Varga,
    Is there any way to initialise array in the script as my idea is to iterate through the index of the variable which is stored with different text values

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

      Sorry, what is this question related to? Initalize array in VBA or in SAP?

  • @thomasb.1390
    @thomasb.1390 2 ปีที่แล้ว +2

    Hello Varga, great video! You have great skills in simple explanation of complex aspects. I am a SAP developer and I have two questions:
    (1) Why did you not used the batch input technique of SAP for your own project? It's more integrated in SAP / ABAP and runs much faster than VBS scripting. Recording batch inputs with transaction SHDB is as easy as recording a GUI script?
    (2) Is SAP GUI compatible with SAP S/4HANA? I don't think so.
    Kind regards,
    Thomas

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

      To be honest, besides GUI scripting I only know LSMW. And it does struggle with some complicated GUI transactions with lot of tabs. This is why I started looking elsewhere. Maybe the batch input would be just as good. But I was knowledgeable in VB script and also in Excel macros so this seemed a perfect tool for me. And the fact that no transports are required for it.

    • @YvesMédardNGWAT
      @YvesMédardNGWAT 9 หลายเดือนก่อน

      (1) you are certainly right on that. Batches are faster. But GUI scripting is the best tool to create cross SAP-Excel App. For VBA users, its gold. They make useful apps for reporting and analytics faster than making a z-transaction.
      (2) Yes, it still used in S/4HANA. There's no anouncement stating that SAP GUI will be definitively discarded.

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

    Thank you for doing these videos. Speaking of one of your cons, I have noticed that if I minimize the SAP window while the script is running in a loop, it goes about twice as fast.

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

      Good to know. I usually running modest scripts, so speed is not an issue for me. And I like to see it running.

  • @alteavanloggerenberg2464
    @alteavanloggerenberg2464 ปีที่แล้ว

    Hi, at 20:13 you mention the selection SAP GUI Scripting API or the "sapfewse.ocx", what do I do if I don't have those options at all? You mentioned without this selection the scripting won't work.

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

      Unfortunately I have no idea why that would be missing, that is part of my SAPGUI installation. Maybe you can try to re-install the SAPGUI, or upgrade it.

    • @alteavanloggerenberg2464
      @alteavanloggerenberg2464 ปีที่แล้ว

      @@csongorvarga Hi, I followed the file path manually which was not available in tools of VBA, copied the path and then in VBA in the browser section past the file path, and then only did it become available for selection. Thank you so much.
      Is it possible to schedule one on one sessions with you? I have very basic/starter knowledge and need some guidance on the SAP part of the scripting. I'm busy with a project to automate various manual steps of our operations.

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

      @@alteavanloggerenberg2464 I am quite busy and it is hard to find time, but you can email me on csongor dot varga at gmail dot com. That would be easier.

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

    Do you know if you can run SAP scripts from an excel macro in this version: SAP_BASIS 620 SAP_APPL 470?

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

      I don't remember the exact versions, but I started using GUI scripting back in 2008, 2009 so this is certainly not recent feature.

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

    Really helpful!!! you are one of the few youtoubers that actually tells you how to do it. Many many thanks!!!!

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

    Hi, Csongor, Thanks for sharing the vb script. I would like to add some if else statement into the recorded script section. Do you have some examples how to do it?

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

    - 11:04 recording starting
    - 12:43 Code Explanation
    - 15:26 Explaining Excel
    - 17:24 system variable in excel
    - 19:31 Visual Basic code

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

    Hi Mr. Csongor, I encountered an issue when trying to save the Scripting.vba into the local file, which previously had no any issue, until these few days I encountered an popup warning message -- Frontend Server : -- this process cannot access the file because the folder is used by another process...' not sure if you know how can I get this resolve...I asked a colleague to try SAP scripting from their laptop by their user account, they don't have such issue, as I didn't have this issue before either...ThanksEric

  • @metconte
    @metconte 2 ปีที่แล้ว

    Hi! Thank you for sharing this immense work. I’ve tried to use the file GUI_Scripting_SSOLogin and change some data in order to connect to my client. I see that in the function Attach_Session it is not set the check if the session is already open use that and do not connect again. Am I correct? Thank you in advance for any additional help

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

      Yes that is correct. But I seem to have run the same Excel multiple times, and it does not make a difference if the session is already connected or not.

  • @rminjoe
    @rminjoe 2 ปีที่แล้ว

    I am having difficulty with identifying the session to put in cell A8. I can't determine what it is and if you need access to SCC4 to determine, I don't have permission. I tried to identify by reading the SAP bottom right corner where I see system which reads "PR1 (1) 100" and client "100". When I put any guess in cell A8 it does bring up a dialog box "No active session" followed by "Not connected to client" followed by "Script complete". When I used 100 it error to "MsgBox "No active session to system " + W_System + " with transaction " + tcode + ", or scripting is not enabled.", vbCritical + vbOKOnly". HELP!

    • @rminjoe
      @rminjoe 2 ปีที่แล้ว

      Yeah - I figured out where I was going wrong - code works great! Dipesh you rule!

    • @imrankhanhsk
      @imrankhanhsk ปีที่แล้ว

      @@rminjoe Hi Minjoe, I am getting the same error
      How did you fix it. Pls tell me

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

    I have a question, if I can use this in MARC table(ZSE16) How to copy paste 1 column (Range A:A) using VBA. Where do I edit it in your code? Thanks

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

      I am not sure I understand what you want to do. Start marco recording in Excel, copy the column and stop recording. Excel will generate the code for you.

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

      I will try it.Thanks

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

    If you just want to connect to an instance of SAP with VBA, do you need the RZ11 transaction or anything else to enable this, or can you just do it?

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

      Just to connect to the session, I don't think you need anything. But what is the point in that?

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

      @@csongorvarga I guess there isn't much of a point. Aside from copying the snippets of script I can see in your videos and other forums it would be difficult to figure out how to do things programmatically in SAP without recording enabled.

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

    hi! i'm looking for a way to run sap scripts faster. is there a workaround like "Application.ScreenUpdating = False
    " for sap gui? Still have no idea how to solve it...

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

      No, I am not aware of anything like that on the GUI side.

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

    Hi Csongor. What should I adjust for my SAP scripting if I do not have the system DCG210?

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

      In this example, the SID and the client is in cell A8.

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

    Can I use this to automate the BW Process chains ? I have a case where we have run process chains one after the other. If the running process chain completes successfully, we need to trigger the next one, else in case of error we need to halt. Can I capture the status from ST13 and build a condition with it to handle this scenario? If so, appreciate if you would share the details.

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

      Yes, you should be able to do this. Anything in the gui can be scripted.

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

    Hi Varga,
    When I try executing the script, it pops out an error saying "User defined type - not defined" at the line
    "Public objGui As GuiApplication". Can you please help me here.

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

      You are missing the SAP GUI Scripting API reference. It is under the VBA editor, Tools, Preferences.

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

      Thank you so much. Now I am struck at the below line. I get "variable not defined" error message
      'Turn On Srcipting
      If IsObject(WScript) Then
      WScript.ConnectObject objSess, "on"

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

    Hello Csongor, Thanks for making this video, I have one question. After saving a Order I can see Order number in the information message. Can I get that number in a excel or file ?

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

      I have another video on how to create an order. In that I am getting the order number from the status bar message. Please check that code.

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

      @@csongorvarga Can you give me the link for that video

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

    Am kind of lost here. You are showing recording of the script using the button and then you went to the spreadsheet. Do we need to create the spreadsheet with the datas to be loaded already? But how come it will be in the same order like the script you created?

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

      There are basically 3 steps. You create a script recording in the GUI, you prepare the input data in Excel, than you import the VB code created by the recording and amend the code so it reads the correct fields from your spreadsheet to that goes into SAP.

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

      @@csongorvarga First of all thanks alot for sharing this video. Am not a vba expert, looks like lots of things has to be done in vb code too. When you are recording you are going in one order, but when we are creating an excel input sheet do we need to follow the order for the fields?

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

      @@gaja37 This is quite heavy on the development side. So you do not need to stick to the same order, as you have to adjust to code anyway. There you can do any order you want.

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

    Is it possible to execute the task even if my sap is closed? Or do i need to open first my sap before clicking the button?

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

      I don't think so. I have not tried if it is possible open a session programatically. Anyway, I have no solution for that.

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

    Hello Varga,
    Thank you very much and it's the really very informative course.
    it saved my day!

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

    Hi Csongor,
    Greetings.
    Great video. Learned new things in GUI scripting.
    I have a question. Do we have any GUI script where it opens reference number and Co. Code through FB03 - tcode and check whether any clearing document generated for the reference number and if yes copy the clearing document number to excel and if not not yet paid.
    Awaiting for your response.

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

      Thanks. I only have scripts which was shown here on TH-cam. No other cases at the moment.

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

    Hi Csongor, thanks for the information, it´s been very helpful. I've been used this structure few months with SAP logon 750 and it´s ok but some collogues gets the update to 760 and they can´t run any script. Do you know how can I fix it?

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

      That is a very good question. I don't have 760 to test and running a quick Google search also suggests that upgrading to 760 should not impact scripting. I am puzzled. Is there a specific message? Could it be that with the new installation scripting on the saplogon instance is disabled? There is an option in the GUI settings to enabled/disable scripting.

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

      ​@@csongorvarga The error is this: "Run-time error "13"; Type mismatch", I already send the case to the system administration, i hope it´s a system parameters

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

    hi varga, i tried building one more macro with more variables (columns). The macro works but it picks only the 1st line (11th row) it comes back to SAP with the same value and stops. it does not move to the next line. can you please help me?

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

      Have you forgotten to add "i = i + 1" somewhere in your loop?

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

      but i dint use that condition for the other macro and it worked fine.. can you also tell where should i use this?

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

    Hello Varga,
    Thank you for the much helpful video, I only have one question if you could please help me with; I was able to successfully record the session on SAP and able to run the script afterwards. However, I'm not able to import the script to excel in order to create the macro. Do you mind telling me please how you managed to open the recorded script on excel.
    Thank you

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

      The recorder created a vbs file. I just open that with Notepad and that's it.

  • @briarcarlisle1222
    @briarcarlisle1222 2 ปีที่แล้ว

    Why do you use replace the start of the code, "session." with "objSess." ?

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

      My global variable is called objSess and not session.

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

    Hi Csongor, Your links to Google Drive are broken.
    Are the files still available at a new URL?

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

      Those links are working. If you are looking them for work, they might be blocked. I can email them to you. first name dot last name at gmail dot com.

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

    Thank you, i use win7 sap, but finally I was able to use with your example to capture the status bar

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

    Hi Csongor,
    Content is very helpful.
    References which u have shown is not reflecting in my Excel.
    How can we add that reference or is there any alternate way to proceed further?
    Need your assistance.

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

      Suhail Surve uh, I don't remember from the top of my head (I am away from the computer), but it is the sapfewse.ocx which should be somewhere in the sap gui folder.

  • @bedayan
    @bedayan ปีที่แล้ว

    I am running script for VT02N but its not updating the value.Script saying completed. Can you help

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

      If the script has "On error resume next" comment it out and see what happens. Also run the code step by step and see what is going wrong.

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

    Hi, your work is very helpful! Just one question, I tried using this in a firefighter ID (Im not sure if you are familiar with this, but this is the superuser privilege access) and the code does not read system. Using this, you open a system say AA1, then you enter the tcode for privelege access, then a new system namely AA2 (client 100) is opened.
    However, when I inputted AA2100, the code cannot read it. The error you have coded prompted.
    Can you please help?
    One theory Im seeing is that the new system is using an SNC name.

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

      I used firefighter before. You are doing all of this correct, it should be AA2100 which is the final system you are logged in. So the questions are: is scripting enabled in that system? You you see that chevron red-white icon? Are you using a code which also checks if the session is in a particular transaction?

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

      @@csongorvarga I have tweaked your code to handle a specific Tcode, and it works fine in the test system [Thanks for your code!!]. However, in firefighter it did not work.
      1. Yes, scripting is enabled. Checked via Local Layout (Alt + F12) > Options > Accesibility and Scripting > Scripting
      2. No, the red-white thing does not open as the code stops at the error message "No active session to system..."
      Is there any config I've missed?

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

      @@csongorvarga I think I saw it, in non-prod, the red-white thing is almost transparent but is still visible. When you hover it, it says "Script is not running"
      However, in firefighter, it says "Scripting support is diabled on the server"
      I think enabling this is done thru tcode RZ11, and not in Local Layout>Options
      Thanks for the tip!

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

      @@jideos I think that means that the session is not enabled for scripting. You see that spinning red-white chevron at 43:23 in the status bar. If you hover over that icon when you log it, the tooltip would way if scripting is enabled in the client or not. This is independent of the GUI setting. If it is not enabled you can't run scripting and the VBA will not find the session. This can be turned on or off in the system parameters in RZ11. Parameter is something like *gui*scripting (sorry not in front of a system right now).

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

      Oh, just read the your other comment. So scripting support is disabled. So it will not work. It can be turned on in RZ11, the parameter is called *gui*scripting* something (can't remember from the top of my head). Maybe you can request it to be turned on.

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

    This is amazing content. Thank you for sharing this with everyone.

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

    A very informative vlog. Will be very helpful for me to learn the basics. Thank you

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

    How do I find my Secession? Down on my SAP task bar bottom left I see System WE1 (5) 110? What would I type in A8?

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

      Than, it is WE1110.

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

      @@csongorvarga Mine is not working as intended, it appears to work with just the client '100' but then errors on a run time error '13' match issue. But WE1110 calls no active session. I have one instance running, it is matching what I put in Excel and my client does have scripting on.

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

    I am getting error no active session to system s4dclnt320 with transaction bp or scripting is not enabled, can you please help maybe I am mistaking in client name how do i find it ?,

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

    Such a clear explanation. Can we run this without showing sap window update.?

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

      No, gui scripting works like that. Unless you minimise the gui window so you don't see it.

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

    Still relevant! Thank you so much🙌

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

    This is amazing!! You have saved me hours out of every week.

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

    Hi, thank you, this was very helpful. Do you know if it is possible to get a screenshot of each change made in SAP. I need to document all the changes that my script made in SAP, it done manually this will involve multiple screenshots.

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

      Thanks. Check this thread out. There are a few examples how to take a screenshot from VBA: stackoverflow.com/questions/43904385/using-excel-vba-macro-to-capture-save-screenshot-of-specific-area-in-same-file. As far as I can see there some examples how to save the image in to a jpeg (otherwise it is only pasted into the Excel document). Having a quick look in the Object Browser it seems Application.ActiveWindow.WindowState = xlMinimized can be used to minimize the Excel once the script starts running so the screenshot is taken from your SAP GUI screen. Just make sure that SAP GUI is under Excel not something else. I think that could work.

  • @Anthony-jd1nl
    @Anthony-jd1nl 6 ปีที่แล้ว

    Great video, thanks!
    Quick question, If i have a value already in SAP and want to copy and paste it into another field in SAP, is there an easy way write that into the macro, as it will not record copy and paste.
    Thanks!

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

      Yes, you can create a recording doing the copy paste. The system will record as the first field gets focus. It will be a ...SetFocus line. You replace the SetFocus property with Text and save the value into a local variable. And on the target field you put that value in.

    • @Anthony-jd1nl
      @Anthony-jd1nl 6 ปีที่แล้ว

      Wow! thanks for the quick response. Thanks again :)

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

    For me it's working just session in beginning is the each row of scripting.
    Why I want to change as objsess

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

    Nagyon hálás vagyok a videóért!
    Sokat segített.

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

    hello , i tried click recording and set the save path. but when i stop the vbs file doesnt exist. any idea?

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

      Uh, sorry. I have never seen that happening. Do you have write access to that folder? Is it possible that it is there but with a different extension? Nothing else I can think of right now.

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

    Hi Csongor
    Congratulations for de video. So fellow, I have a doubt. Is it necessari I to download the library SAP GUI Scripting API? Where can I to get?
    Thanks.

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

      I don't know to be honest. It should be part of the SAP GUI installation.

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

      Ok
      Thanks!

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

    Hey excellent, quick question, do you know how to add attachments to the orders created using the visual basic macros

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

      I have not tried that. I did download from SAP in SE16 which worked, so I have no reason to say that SAP did not build some support for upload.

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

    Hi can you please make a macro based on SAP GUI Scripting for internal order settlement through KO88. I have around 127 internal order error to be settled in one day
    please help.

  • @pushpabhattarai7934
    @pushpabhattarai7934 9 หลายเดือนก่อน +2

    Hello Verga great video. I am trying to automate VA02, these code works perfect for me but since it’s VA02, can you please help me with the code to find the first empty row in sap? I want to add more items on to the same order thanks hips

    • @csongorvarga
      @csongorvarga  9 หลายเดือนก่อน

      Thanks. You can just loop through the items and look for the first item where the product field is empty.

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

    Thanks very much, I've created a macro and want to run it first in the test environment rather than the production environment but the script got stuck at the sap children 0 step in the beginning. It was running fine in the production environment though. I would appreciate if you could help please

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

      The script takes the SID and client form a cell on the sheet. So you just need to change that to your test client... I am not sure why it is not working.

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

    Thank you very much for this video! It helps me so much on my automations for SAP
    I have a code, which opens the SAP Logon and logs into my system using my username and password. The code works well, but only if sap is not open at all
    Do you know how i could include a check whether sap is open already?
    Logic should be, that if the SAP Logon is already open, the code should skip the part where it tries to open the SAP Logon.
    And if there is an active session on my system(e.g. P1), it should skip the part logging into it.
    But if there is an active session on another system(e.g. P2), it should still log into the system which i defined in the code (P1)
    Im struggling with that
    Maybe you know a way how to do it :)
    Thank you in advance!

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

      In my example you find and Attach_Session function which attaches to an open session. That returns false if it was unsuccessful. You can use that to try to attach to a session and if it is False, you can bring in the logon window.

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

    Hi this script is not working after the Ms office update. How can we correct this.

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

    Hi sir.. I'm trying to automate few check points in manual Purchase order creation apart from catalogue. My simple check point is to check vendor is XK03 with corporate group.
    Please help me how can I run it macro..

  • @86darklive
    @86darklive 6 ปีที่แล้ว

    thank you... so to let's sap play i only need to copy that part of code in a macro?
    for the ex.: if i need to copy one by one a series of data from excel to sap is that possible? can you send me that part of code please? really need that thanks again Varga

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

    Hello, can any one tell me how much it costs to enable the RZ11 transaction if you already have SAP? I've heard a few numbers for the yearly rate and I just want to clarify. Thanks.

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

      Sorry, but I have no idea. Frankly I did not even know it is linked to a license.

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

    Man this is so awesome! Thank you a lot!!!! My co-worker will love my future scripts =)))) There is so much bullshit on TH-cam, but this content is so usefull! Thank you for sharing your efficient skills with us!

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

      Thanks a lot! Happy scripting!

    • @AKASHMANDAL2386
      @AKASHMANDAL2386 ปีที่แล้ว

      Can I automate SAP GUI without RZ11 authorization?

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

    eu consigo executar o script do SAP no Excel através de VBA?

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

    Thank you very much for the tutorial.Can you give me the link for downloading sap GUI script API library link?

  • @nileshvispute999
    @nileshvispute999 2 ปีที่แล้ว

    Hi, Please provide MACROS program code used in click button , I'm not developer so it's hard for me to write such codes. If possible provide the Excel sheet you are using.

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

    Hi Mentor! First of all I want to thank you for sharing your knowledge about Macro with SAP scripting. I am really greatful for that because I have created a lot of scripting.
    I was able to adopt your codes here but I just have 1 question. I am working on to change asset on SAP transaction code AS02.
    It is working perfectly fine if I have data on the cells from excel that I want to change on AS02 but, if there's no data on cell, SAP will copy the blank cell to the look up field in SAP.
    Is it posible to skip populating the SAP data if the excel cell is empty?
    Thank you so much for your help!

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

      +michael Angelou Megio well, just check if the cell has a value and execute that field update within the if statement. SAP would not mind if you don't execute one line. So If Cells(x,y).Value"" Then objses.... End If

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

    Hi Can you share this excel code or file.. i can not login from path you mentioned @Csongor Varga

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

    Fantastic tutorial! Very helpful. Thank you very much!

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

    Hi Varga, I used your code as reference to start setting up a fully automated regression test set for SAP HR, so thanks a lot!

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

      I am glad to hear that. I started this whole journey for the very same reason (automate testing).

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

      Hi Varga, I've just 1 question. I am able to log in in SAP using different users, though logging off is really difficult. Do you know the VBA code to log off from SAP?

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

      The connection object (objConn) has a CloseConnection method. Try that. It also has a CloseSession method, but for that you need to provide the session id. So close connection could be easier if works. Sorry I don't have time to try them out myself.

    • @Maxim.Teleguz
      @Maxim.Teleguz 7 ปีที่แล้ว

      @Csongor Varga how are you able to connect to SAP without loading the .dll's that are required for Excel to speak to SAP?

    • @naveenkumar-mh3sf
      @naveenkumar-mh3sf 7 ปีที่แล้ว

      what happen if i keep SAPFEWSE.OCX file in D:\ folder,, is it mandatory to keep in c:\program files..........

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

    After each executing cycle open print dialog box so I am unable to automate please suggest code so I can automate

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

    Ola Varga....
    Hi, how can I select a line from the sap table, to return the number of a request?

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

    Is it possible to run a scrip where you copy a list of invoice numbers and paste FBL5N to extract open invoices?

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

      Yes, you can copy numbers to the clipboard in Excel, and just paste them into the selection screen like you do it manually.

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

      @@csongorvarga Thanks I will give it a go. What about script to release PO in ME28?

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

      @@obrienmponela6678 There is no limit to GUI scripting. Which you do manually in any transaction you can make a recording out of and use Excel to automate it.

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

    Where do I find the system code I want to connect to? You connected to DCG210, where do I find my code?

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

      You can change the system id in cell A8. I will check the code as well when I am at my computer.

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

      +Csongor Varga Is the system code specific to each user of SAP? Where do I get that from my SAP GUI?

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

      +John Cusack System code should be the same for all users. If you are in the GUI there is a field on the right side of the status bar. That normally shows your userid, or transaction. Click on that and it will tell you the system id and the client as well you are logged into.

    • @renanhms
      @renanhms 8 ปีที่แล้ว

      Csongor you could send a print of the field? I don't see the code. tks

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

      Sorry, I don't understand.

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

    Good Work and Thanks for your help to understand the concept. . SAP MM Mock Interview videos can be accessed in below play list
    @

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

    Is there a way to get low inventory alert from SAP TO EMAIL?

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

    Hi, great videos! really helpful. I have one report that i am extracting data from ....cs11 - BOM extract. But i need to get the Base qty from the BOM header. I cannot find how to reference the report header in the code...and the recording doe not pick it up. The field i need is "Base Qty (EA)". any help appreciated. thks.

  • @guille1313
    @guille1313 8 ปีที่แล้ว

    Hi Csongor and thank you in advance
    I can´t connect with SAP and when I run the script turn up the next error
    No active session to system E1P701 with transaction VA01, or scripting is not enable
    can you help me? i only change the cell A8 wiht my SID and Client

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

      +Guillermo López Benavides Most probably the scripting is disabled in E1P701. Check the settings in RZ11. It is mentioned in the video.

    • @guille1313
      @guille1313 8 ปีที่แล้ว

      +Csongor Varga Hi Csongor, thanks for your answer, i check this and scripting runs ok

    • @guille1313
      @guille1313 8 ปีที่แล้ว

      +Guillermo López Benavides but the error continues

    • @guille1313
      @guille1313 8 ปีที่แล้ว

      +Guillermo López Benavides do you have email to send the problem, because is unusual, if I start the trnasaction in the middle it´s run ok, but if i start since 0 it doesn´t run, said the error and not connected to client

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

      +Guillermo López Benavides yes, send it to my first name dot last name at gmail.com.

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

    Nézem a videot, hallgatom, mondom, de frankó az angolja, ahhoz képest, hogy külföldi, és KIDERÜL, HOGY MAGYAR :D:D

  • @SBAZ-t7n
    @SBAZ-t7n 8 หลายเดือนก่อน

    merci pour toutes ces videos très utilie. j'en profite pour poser une question sur un souci d'enregistrement des scripts qui s'arrete au lancement de la trasaction SAP BExanalyzer et toutes les étapes d'après ne sont pas transcrites dans le script pour avoir le code VBA par la suite. si qq'un peut m'aider là-dessus ? merci d'avance pour votre aide.

    • @csongorvarga
      @csongorvarga  8 หลายเดือนก่อน

      Thanks. I don't think I have a solution for your problem. BExanalyzer is probably a different app, not part of the SAP GUI, therefore anything you do in that is not scripted. It is like when the SAP GUI opens a Windows Open, or Save as dialog. That is not part of the GUI, and does not get scripted. I have no solution to that.

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

    Thank you so much for this thoroughly made video. Keep up the good work

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

    Hi Everyone, I can't seem to find "SAP GUI Scripting API" in References. I have SAPGUI 740 installed. Please help?

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

      Use the browse button and fine the sapfewse.ocx file which is in your Program Files (x86)\SAP\FrontEnd\SAPgui

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

      Wow thanks for the reply! I did that and sapfewse.ocx is not in that folder. Something wrong with my sap gui installation?

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

      Could be. I am sorry, I never faced this problem before.

  • @JohnDeibler
    @JohnDeibler 8 ปีที่แล้ว

    20:01 I do not have that connection available in that folder. Is there another path that can be used?

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

      You need the sapfewse.ocx as a reference. If you have it in a different folder, use the Browse button to add it to the list. It does not matter where it is in your computer. I hope this is what you asked.