Export SAP Data to different Excel Files with SAP GUI Scripting & Excel Macro VBA [english]
Вставка
- Опубліковано 17 чер 2023
- In today's video I will show you how to combine SAP GUI Script and Excel macros with each other. Very handy for users who regularly export data from SAP to Excel. We select different data and save them in separate Excel files. The whole thing happens with a script and a loop.
#sap #excel #vba #export
▬▬ Literature 📚 ▬▬▬▬▬▬▬▬▬▬▬▬▬
▶ ABAP: An Introduction 2020 amzn.to/45CLTqk
▶ Complete ABAP 2023 amzn.to/45D5UNM
▶ ABAP to the Future 2022 amzn.to/42cgWGs
▶ Clean ABAP 2022 amzn.to/3KAqmow
▬▬ My Hardware 💻 ▬▬▬▬▬▬▬▬▬▬▬▬▬
▶ Microphone: amzn.to/3zj2UIz
▶ Headphone: amzn.to/3GUBRFg
▬▬ My Software (free) 💾 ▬▬▬▬▬▬▬▬▬▬▬
▶ Video Recorder: bit.ly/678fgh6
▶ Video Editor: bit.ly/38Rj9lb
▶ Thumbnail: bit.ly/CustAndCodeThumbnail
▶ Gamma AI: bit.ly/3nsdvgr
▬▬ Further Links 🔗 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⭐Become my subscriber: bit.ly/CustAndCodeSub
🎬All videos in English: bit.ly/CustAndCodeENG
☕Buy me a Coffee 😀: bit.ly/3dih2cl
*The links are affiliate links. There are no additional costs.
Microsoft excel icons created by Pixel perfect - Flaticon
www.flaticon.com/free-icons/m...
Sap icons created by Freepik - Flaticon
www.flaticon.com/free-icons/sap
SAP® and SAP GUI Scripting are registered trademarks of SAP AG.
This is so helpful. Thank you so much
Thank you for your kind feedback and your comment! 🤗😀
Very helpful for every user. Thank you so much
I'm glad you liked it. And thank you for watching! 🤗
creative as usual.
Thank you very much for your feedback! 😀
Big help for me , thanks a lot , keep bringing more content , any possibility that output sheets could be made part of same workbook?
Good Question, I will have a look at this. 🤗
Thanks!
Wow! Many thanks for your support! I appreciate it! 🤗😀😀🤗
Thank you 🎉🎉🎉
Thank you for your comment! 😀
This is so helpful, saving a lot of time!!!! What do I need to do for the excel files to get closed. Using this code for over 50 files downloads.
The closing command haven't worked for me. Don't know why. 🤔 Would be great if anybody would find a solution. 🤗
Great content bro, very helpful. how do i export SAP data onto the Macro enable spreadsheet, and not on the new sheet?
The question really comes up more often. I'll have to take a look at it. 🤗🤔
This tool is exceptionally handy, and I am curious if it offers the capability to generate reports for different months. Can you please provide some examples of how to modify the date and run the report via Macro setting?
Thanks for your positive feedback! You can pass your variables in the excel itself. I show this in this video: ua-cam.com/video/8nvCW-l2Jdc/v-deo.html
🤗
how can I automate download attached files related to doc SAP number? I did a scripting but I coudn't connect with file path where I would like to save files in my windows
hi, can you tell me how to close the workbooks opened after the extract from SAP? I'm running a different excel file in the next step where the extracted files are referenced. thanks
workbook.(filename).close at the end of the macro is showing a runtime error
I have tested several suggestions from the internet but unfortunately none of them have been successful. 🤔
Nice but what to do if you have no authorization to run se16? I need download fse5n reports for each cocode…
Of course, the user with which this script is executed must have the necessary rights! 🤗
Thank you so much! So how can I automatically close opened excel files in this way? Pls show me!
It should work with "Application.quit" but it hasn't worked for me... 🤔 I am not sure what here the problem is. Maybe I try it on another mahine of mine. 🤔
@@CustAndCode Thank you for replying to me. I still expect perfect results from you. If there is any way please help me. I look forward to you sharing your results with me! 😍
@CustAndCode could you make a video or help me what can i do in situation like in 4:31 on upper video but in my situation i want 1 report for all carryid from column A? i got over 10 carryid. big thank you for your helping.
You mean every carrid in a seperate tab?
@@CustAndCode thank you for your answer. iI already solved the problem. My problem was that i wanted 1 excel file, 1 table in 1 tab but which include all carryid (more than 7 was the problem for me) :)
@@dawidpe1624 Ok, great to hear that you have achieved it! 🤗😀
Bro can we create for background executed extraction
I think not, for VBA you need an active SAP GUI session. For background execution you have to use/write an ABAP report. 🤗
Hi,
When some users are saving the file opens the name and path window and others opens only the explorer window so the Macro stops. How to configure to show only the name and path window before saving?
Strange, I had never noticed this before with my users. Should there be a setting for this, I unfortunately don't know it. 🙄
I would check whether it depends on the computer or the user. To do this, user 1 should log in in SAP on the computer of user 2 and vice versa.
I guess it is the computer If yes, check security settings, user rights, reinstall SAP GUI, check Windows Profile... hth 🤗😀
excel to SAP - ua-cam.com/video/4ZBGywR5DqM/v-deo.htmlsi=31yEGE4aXDAaWB7J
Please check if the scripting option for Microsoft Windows is unchecked. 🤗
Does someone know why i receive this error " application defined or object defined error" for line lastRow = ThisWorkbook.Sheets("Sheet1").Cells(Rows.Count, 1).End(x1Up).Row
It should be xlUp, not x1Up (a lower case letter L, not the number 1). 🤗
Thank you!!@@CustAndCode
@@mihais83 🤗🤗🤗
So I do this for work, but I use to have that window that asks for Directory and file name, but I changed my layout and now it opens a file explorer how can i change that?
But you use the SAP GUI or? What have you changed? 🤔
@@CustAndCode I fixed it, I guess I had the open microsoft dialog box check marked, so it was opening a File exlporer save as window that VBA couldn't interact with, but now its good! thanks!
@@mrunavailable5868 Thanks for your feedback! I think this could help other people too 🤗
@@CustAndCode Awesome, well to anyone looking to find this make sure your scripting option for microsoft windows dialog is unchecked. this will prompt the SAP save as window instead of a file explorer type. this saves me a ton of time when exporting since the other option is choosing file path and name each time, when you could just have it auto save, and auto put the date on the title.
Thank you for your valuable feedback and thanks that you help others in the community too! 🤗
Hello sir im getting error in last row im stuck with that. can you help me on this
What type of error?
It would be possible to run the Skripts automatically to every hour each day ?
Maybe, but what is your demand? I think there are better solutions to do that, e.g. directly with ABAP. 🤗
@@CustAndCode
Directly by abab ok - but the result is pdf not excel I think ?!
@@christophwissing4877 The result can be any file, but you have to code it 🤗
@@CustAndCode
Ok do you have a UA-cam video how do code excel result via abab ?
@@christophwissing4877 Sure, have alook at this video: ua-cam.com/video/R06MXVZbx2k/v-deo.html
🤗