I just launched "SAP GUI Scripting: Understanding the Basics" ebook! If you are interested to learn more, check it out in the link below: joelting.com/sap-ebook
@@JoelTing Sorry Sir, any sample script to combine sap macros and excel macros? because I want to export excel from sap, then automatic processing from excel macro at once..Thank you
@@titoyudatama5361 Hi, you can refer to the script used in the video in this workbook: drive.google.com/file/d/1-DGsD1jSPlpNZLX845Isuc03mg_edtfR/view?usp=sharing
hi Joel, thank for your sharing, I found your video is really helpful for me. would like to ask, if i extracted data from SAP, and my excel is automatically open. If it is possible, i want to continue in the workbook to remove the apostrophe symbol from the data number display from SAP?
Hi there. You can continue directly regardless of whether your Excel is opened. You just need to use the workbook.open method to bring that newly saved workbook into your script and continue working on the next your data processing steps within the exported workbook.
Hi Joel.. How can close the workbooks after export data from SAP . Bcz it’s showing run time error 91 ( Out of the script ) while workbooks already open and VBA code doesn’t work pls help.
Hi there. It's something that I have yet been able to solve at the moment. Workaround I did try is to export it into a text file instead, then copy the text file content into a new workbook and save it from there.
Thanks for the video. I see that you have the option to get the extract in xlsx format but I dont. You have explained in of your videos but I dont really have that option. Is there something else I could do ?
Hi Gio Gobronidze, you can try right click on anywhere of the table in SAP and click on "Spreadsheet". It should give you an option to choose the spreadsheet format that you can export. The unavailability of spreadsheet options seems to be due to the "Always use selected format" option being enabled.
@@JoelTing "Always use selected format" its frozen in my case and not enabled. Looking at all available formats but I dont have xlsx, I do have xlm, MHTML
@Gio Gobronidze I see. If that's the case, you can try using MHTML. I tried it from my end and the method work on MHTML file type as well. I seems to be able to treat MHTML as a normal Excel workbook. And by the end of the process, if you want to convert the MHTML to XLSX, you can simply do that by using the save as method in VBA.
Nice stuff Joel 👍👍 I am working on Sap ECC 6 version and now working on a Journal posting template in FICO. Any suggestions ? I can't use manual postings as an option as we post entries with more than 700 - 800 rows ...
Hi Abhishek, apologies for the late reply. I believe this can be done by using loop to help with the posting input. However, I do not have access to FICO modules, so I'm not able to test out from my end.
I need your help to pick up the data from vl03n in excel in different cells, can you please help me, i need data in excel via botton that i press the botton and data will com from SAP VL03N in excel in 4 required cells.
Hello! That can be done by just assigning the element text value to a cell value (for example: Cells(1,1).Value = session.findById(elementID).Text ). You just need to identify what the element ID in SAP, then assign it to a cell value in Excel
Hi Joel, please make a video on how to automate drag and drop using sap gui? My problem is whenever the box in FB03 appear where I save my attachment, hitlist is not working so I have to maually click the attachment and hit enter.
Hi Olly TV, I do not have access to FB03 to try out the process of drag and drop or saving attachment at the moment. Let me try out to see if I can simulate something similar in my test SAP server.
Hi santhosha, I have personally havent done that before. While researching, I found this video which might be helpful to you. But it prints to a word document instead of Excel.
Hi, thanks for the suggestion. I currently do not have access to the SAP FICO modules, so I'm only able to work with some basic concepts that we can apply when working with SAP GUI scripts. I'll put that into consideration once it is financially viable for me to subscribe to an SAP server which provides me with all the SAP FICO modules. Thanks again!
Hi, there's a workaround I found, but it involves quitting the whole Excel application. You can add the following line at the end of your script. Application.Quit You can refer to this video where I briefly touched on this. ruclips.net/video/G5qc2gcpyW4/видео.html
thank you sir for responding .I tried it ,but it just close the macro file not the extracted one.please any other solution cuz i need to to complete my project.
@@مريومالعشوان you can try some other methods suggested in stack overflow here: stackoverflow.com/questions/40729968/exported-file-opens-after-macro-completes-unwanted Hope this can resolves your issue.
Hey Gourav, I personally do not use the screenshot function myself. You can try check out this video: ruclips.net/video/W_J-9t_mWDU/видео.html&ab_channel=CsongorVarga It seems to be working for most.
When exporting out of SAP, the excel file will automatically open after it exports. I need my script to wait for the export to open, and then to close the newly opened export file. If I try to activate the export file immediately following the command to export the file in SAP GUI, I get a "subscript out of range" error. I thought maybe I could loop the activate command until it stops erroring (while the export.xlsx file is opening) but that causes excel to crash. I also tried using a delay, using application.wait but the download hangs no matter what time I input into the delay; 5 seconds, 15 seconds, it doesn’t matter. Manually, when exporting, it opens in about 3 seconds. Having said that, when the error pops up, it triggers the export to immediately open. Seems like when scripting, SAP doesn’t have the ability to recognize the export. When I step through the code manually, I don’t have any issues activating the export after it downloads and automatically opens. I’m not sure what to do here, any suggestions?
Hi M4KE4W1SH, I faced the same issue as you before this. I found out that only one of the exported spreadsheet will automatically open by the end of the process and not the end of the export. Instead of putting in a delay/activating it, you can try the open method to open the workbook based on exported file path and assign it to a variable. It may seems you are opening an already opened workbook, but this works for me and everything went through smoothly. Only at the end of the process, the workbook will be opened automatically again, but all the amendments and formatting would have been made.
The file is available here and in the description box: docs.google.com/spreadsheets/d/1-DGsD1jSPlpNZLX845Isuc03mg_edtfR/edit?usp=sharing&ouid=102044540683497440975&rtpof=true&sd=true
I just launched "SAP GUI Scripting: Understanding the Basics" ebook! If you are interested to learn more, check it out in the link below:
joelting.com/sap-ebook
Keep it up Joel! Thanks for the videos!
Thank you for the kind words!
Joel, you are the man
This is massive helpful videos for my job. Thank you very much for your sharing.
Glad it was helpful!
Excellent💯💯👏👏👏👏 I really love your sap GUI scripting videos. Please do more videos on SAP GUI SCRIPTING
From :India 🇮🇳 Hyderabad
Thanks for your kind words!
Thank you very much, nice info!! I've subscribed you, keep the spirit for the next videos
Thanks for the sub! I'll try my best to work on more content.
@@JoelTing Sorry Sir, any sample script to combine sap macros and excel macros? because I want to export excel from sap, then automatic processing from excel macro at once..Thank you
@@titoyudatama5361 Hi, you can refer to the script used in the video in this workbook:
drive.google.com/file/d/1-DGsD1jSPlpNZLX845Isuc03mg_edtfR/view?usp=sharing
@@JoelTing I'm so thankful for your reference
Love these videos
Thanks you!
hi Joel, thank for your sharing, I found your video is really helpful for me.
would like to ask, if i extracted data from SAP, and my excel is automatically open. If it is possible, i want to continue in the workbook to remove the apostrophe symbol from the data number display from SAP?
Hi there. You can continue directly regardless of whether your Excel is opened. You just need to use the workbook.open method to bring that newly saved workbook into your script and continue working on the next your data processing steps within the exported workbook.
Hi Joel..
How can close the workbooks after export data from SAP . Bcz it’s showing run time error 91 ( Out of the script ) while workbooks already open and VBA code doesn’t work pls help.
Hi there. It's something that I have yet been able to solve at the moment. Workaround I did try is to export it into a text file instead, then copy the text file content into a new workbook and save it from there.
Thanks for the video. I see that you have the option to get the extract in xlsx format but I dont. You have explained in of your videos but I dont really have that option. Is there something else I could do ?
Hi Gio Gobronidze, you can try right click on anywhere of the table in SAP and click on "Spreadsheet". It should give you an option to choose the spreadsheet format that you can export. The unavailability of spreadsheet options seems to be due to the "Always use selected format" option being enabled.
@@JoelTing "Always use selected format" its frozen in my case and not enabled. Looking at all available formats but I dont have xlsx, I do have xlm, MHTML
@Gio Gobronidze I see. If that's the case, you can try using MHTML. I tried it from my end and the method work on MHTML file type as well. I seems to be able to treat MHTML as a normal Excel workbook. And by the end of the process, if you want to convert the MHTML to XLSX, you can simply do that by using the save as method in VBA.
Thanks Joel
Nice stuff Joel 👍👍 I am working on Sap ECC 6 version and now working on a Journal posting template in FICO. Any suggestions ? I can't use manual postings as an option as we post entries with more than 700 - 800 rows ...
Hi Abhishek, apologies for the late reply. I believe this can be done by using loop to help with the posting input. However, I do not have access to FICO modules, so I'm not able to test out from my end.
amazing!
I need your help to pick up the data from vl03n in excel in different cells, can you please help me, i need data in excel via botton that i press the botton and data will com from SAP VL03N in excel in 4 required cells.
Hello! That can be done by just assigning the element text value to a cell value (for example: Cells(1,1).Value = session.findById(elementID).Text ). You just need to identify what the element ID in SAP, then assign it to a cell value in Excel
Hi Joel, please make a video on how to automate drag and drop using sap gui? My problem is whenever the box in FB03 appear where I save my attachment, hitlist is not working so I have to maually click the attachment and hit enter.
Hi Olly TV, I do not have access to FB03 to try out the process of drag and drop or saving attachment at the moment. Let me try out to see if I can simulate something similar in my test SAP server.
Hi Joel, can we automate the system to capture the SAP screen prints to excel file?
Hi santhosha, I have personally havent done that before. While researching, I found this video which might be helpful to you. But it prints to a word document instead of Excel.
Make a playlist of SAP FICO module tutorial
Hi, thanks for the suggestion. I currently do not have access to the SAP FICO modules, so I'm only able to work with some basic concepts that we can apply when working with SAP GUI scripts.
I'll put that into consideration once it is financially viable for me to subscribe to an SAP server which provides me with all the SAP FICO modules. Thanks again!
@@JoelTing thank you
How can I close the exported excel file ? Because it opens automatically after the extraction .Any tips
Hi, there's a workaround I found, but it involves quitting the whole Excel application. You can add the following line at the end of your script.
Application.Quit
You can refer to this video where I briefly touched on this.
ruclips.net/video/G5qc2gcpyW4/видео.html
thank you sir for responding .I tried it ,but it just close the macro file not the extracted one.please any other solution cuz i need to to complete my project.
@@مريومالعشوان you can try some other methods suggested in stack overflow here:
stackoverflow.com/questions/40729968/exported-file-opens-after-macro-completes-unwanted
Hope this can resolves your issue.
Very much appreciate your content! It’s made a big difference in my life
Hey joel how can we script if we want to take a Screenshot
Hey Gourav, I personally do not use the screenshot function myself. You can try check out this video: ruclips.net/video/W_J-9t_mWDU/видео.html&ab_channel=CsongorVarga
It seems to be working for most.
Hi there, not sure if you still need it. I just released a video for taking SAP Screenshot with VBA.
ruclips.net/video/lFLIwcRi0_U/видео.html
When exporting out of SAP, the excel file will automatically open after it exports. I need my script to wait for the export to open, and then to close the newly opened export file. If I try to activate the export file immediately following the command to export the file in SAP GUI, I get a "subscript out of range" error. I thought maybe I could loop the activate command until it stops erroring (while the export.xlsx file is opening) but that causes excel to crash. I also tried using a delay, using application.wait but the download hangs no matter what time I input into the delay; 5 seconds, 15 seconds, it doesn’t matter. Manually, when exporting, it opens in about 3 seconds. Having said that, when the error pops up, it triggers the export to immediately open. Seems like when scripting, SAP doesn’t have the ability to recognize the export. When I step through the code manually, I don’t have any issues activating the export after it downloads and automatically opens. I’m not sure what to do here, any suggestions?
Hi M4KE4W1SH,
I faced the same issue as you before this. I found out that only one of the exported spreadsheet will automatically open by the end of the process and not the end of the export. Instead of putting in a delay/activating it, you can try the open method to open the workbook based on exported file path and assign it to a variable. It may seems you are opening an already opened workbook, but this works for me and everything went through smoothly. Only at the end of the process, the workbook will be opened automatically again, but all the amendments and formatting would have been made.
how to exit from sap page?
Hi Chola, what do you mean by how to exit from SAP page? Closing SAP entirely?
Thanks
Please share the file
The file is available here and in the description box:
docs.google.com/spreadsheets/d/1-DGsD1jSPlpNZLX845Isuc03mg_edtfR/edit?usp=sharing&ouid=102044540683497440975&rtpof=true&sd=true