Export SAP Data to different Excel Files with SAP GUI Scripting & Excel Macro VBA [english]

  Рет қаралды 23,356

Cust&Code in SAP ABAP

Cust&Code in SAP ABAP

Күн бұрын

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/CustAnd...
▶ Gamma AI: bit.ly/3nsdvgr
▬▬ Further Links 🔗 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⭐Become my subscriber: bit.ly/CustAnd...
🎬All videos in English: bit.ly/CustAnd...
☕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.c...
Sap icons created by Freepik - Flaticon
www.flaticon.c...
SAP® and SAP GUI Scripting are registered trademarks of SAP AG.

Пікірлер: 57
@pramodpandey1772
@pramodpandey1772 3 ай бұрын
Very helpful for every user. Thank you so much
@CustAndCode
@CustAndCode 3 ай бұрын
I'm glad you liked it. And thank you for watching! 🤗
@sjpt1434
@sjpt1434 Жыл бұрын
creative as usual.
@CustAndCode
@CustAndCode Жыл бұрын
Thank you very much for your feedback! 😀
@marthareyes5266
@marthareyes5266 5 ай бұрын
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.
@CustAndCode
@CustAndCode 4 ай бұрын
The closing command haven't worked for me. Don't know why. 🤔 Would be great if anybody would find a solution. 🤗
@daminifutane7199
@daminifutane7199 7 ай бұрын
Big help for me , thanks a lot , keep bringing more content , any possibility that output sheets could be made part of same workbook?
@CustAndCode
@CustAndCode 6 ай бұрын
Good Question, I will have a look at this. 🤗
@guardianjuan
@guardianjuan Жыл бұрын
This is so helpful. Thank you so much
@CustAndCode
@CustAndCode Жыл бұрын
Thank you for your kind feedback and your comment! 🤗😀
@Digitor7
@Digitor7 10 ай бұрын
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?
@CustAndCode
@CustAndCode 10 ай бұрын
Thanks for your positive feedback! You can pass your variables in the excel itself. I show this in this video: kzbin.info/www/bejne/bp_ZdIpjoZd9msU 🤗
@guardianjuan
@guardianjuan Жыл бұрын
Thanks!
@CustAndCode
@CustAndCode Жыл бұрын
Wow! Many thanks for your support! I appreciate it! 🤗😀😀🤗
@user-io8ug3pj7z
@user-io8ug3pj7z 10 ай бұрын
Great content bro, very helpful. how do i export SAP data onto the Macro enable spreadsheet, and not on the new sheet?
@CustAndCode
@CustAndCode 10 ай бұрын
The question really comes up more often. I'll have to take a look at it. 🤗🤔
@kamilagirona3120
@kamilagirona3120 2 ай бұрын
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
@saikrishnachiru
@saikrishnachiru 23 күн бұрын
Sorry i didnt understand your question clearly. I will try to help u. Please explain clearly
@tikammolo3052
@tikammolo3052 Жыл бұрын
Thank you 🎉🎉🎉
@CustAndCode
@CustAndCode Жыл бұрын
Thank you for your comment! 😀
@dawidpe1624
@dawidpe1624 4 ай бұрын
@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.
@CustAndCode
@CustAndCode 4 ай бұрын
You mean every carrid in a seperate tab?
@dawidpe1624
@dawidpe1624 4 ай бұрын
@@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) :)
@CustAndCode
@CustAndCode 4 ай бұрын
@@dawidpe1624 Ok, great to hear that you have achieved it! 🤗😀
@andyjohnson9714
@andyjohnson9714 11 ай бұрын
Nice but what to do if you have no authorization to run se16? I need download fse5n reports for each cocode…
@CustAndCode
@CustAndCode 11 ай бұрын
Of course, the user with which this script is executed must have the necessary rights! 🤗
@xuanthutran9758
@xuanthutran9758 Жыл бұрын
Thank you so much! So how can I automatically close opened excel files in this way? Pls show me!
@CustAndCode
@CustAndCode Жыл бұрын
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. 🤔
@xuanthutran9758
@xuanthutran9758 Жыл бұрын
@@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! 😍
@nagukanuri5885
@nagukanuri5885 4 ай бұрын
Hello sir im getting error in last row im stuck with that. can you help me on this
@CustAndCode
@CustAndCode 4 ай бұрын
What type of error?
@jellyacecream
@jellyacecream 8 ай бұрын
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
@CustAndCode
@CustAndCode 7 ай бұрын
I have tested several suggestions from the internet but unfortunately none of them have been successful. 🤔
@MaheshKumar-dr8xk
@MaheshKumar-dr8xk 8 ай бұрын
Bro can we create for background executed extraction
@CustAndCode
@CustAndCode 8 ай бұрын
I think not, for VBA you need an active SAP GUI session. For background execution you have to use/write an ABAP report. 🤗
@mihais83
@mihais83 10 ай бұрын
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
@CustAndCode
@CustAndCode 10 ай бұрын
It should be xlUp, not x1Up (a lower case letter L, not the number 1). 🤗
@mihais83
@mihais83 10 ай бұрын
Thank you!!@@CustAndCode
@CustAndCode
@CustAndCode 10 ай бұрын
@@mihais83 🤗🤗🤗
@mrunavailable5868
@mrunavailable5868 8 ай бұрын
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?
@CustAndCode
@CustAndCode 8 ай бұрын
But you use the SAP GUI or? What have you changed? 🤔
@mrunavailable5868
@mrunavailable5868 8 ай бұрын
@@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!
@CustAndCode
@CustAndCode 8 ай бұрын
@@mrunavailable5868 Thanks for your feedback! I think this could help other people too 🤗
@mrunavailable5868
@mrunavailable5868 8 ай бұрын
​@@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.
@CustAndCode
@CustAndCode 6 ай бұрын
Thank you for your valuable feedback and thanks that you help others in the community too! 🤗
@srqwnz
@srqwnz Ай бұрын
Hello! I need some help. :) :( Whatever folder path I add, I got error: runtime error 619 the control could not be found by id (Folder is already created!) And in Watchlist below the coding field: session.FindById("wnd[1]/usr/ctxtDY_PATH").Text = "C:\Users\myuserid\Desktop\bbb" session.FindById("wnd[1]/usr/ctxtDY_FILENAME").Text = "xyz.xlsx" Thanks a lot!
@CustAndCode
@CustAndCode 25 күн бұрын
Strange, should work, maybe you try to create a new script? 🤔
@gabrielasiqueira5272
@gabrielasiqueira5272 Жыл бұрын
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?
@CustAndCode
@CustAndCode Жыл бұрын
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 🤗😀
@SharadG84
@SharadG84 Жыл бұрын
excel to SAP - kzbin.info/www/bejne/aouleKyth5p3p68si=31yEGE4aXDAaWB7J
@CustAndCode
@CustAndCode 6 ай бұрын
Please check if the scripting option for Microsoft Windows is unchecked. 🤗
@christophwissing4877
@christophwissing4877 11 ай бұрын
It would be possible to run the Skripts automatically to every hour each day ?
@CustAndCode
@CustAndCode 11 ай бұрын
Maybe, but what is your demand? I think there are better solutions to do that, e.g. directly with ABAP. 🤗
@christophwissing4877
@christophwissing4877 11 ай бұрын
@@CustAndCode Directly by abab ok - but the result is pdf not excel I think ?!
@CustAndCode
@CustAndCode 11 ай бұрын
@@christophwissing4877 The result can be any file, but you have to code it 🤗
@christophwissing4877
@christophwissing4877 11 ай бұрын
@@CustAndCode Ok do you have a KZbin video how do code excel result via abab ?
@CustAndCode
@CustAndCode 11 ай бұрын
@@christophwissing4877 Sure, have alook at this video: kzbin.info/www/bejne/iGGZfouMj8eraM0 🤗
Automate Data Extraction with SAP GUI Scripting & Excel Macro VBA [english]
14:20
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 17 МЛН
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 6 МЛН
Log into SAP from Excel with SAP GUI Scripting API
8:58
ERP UP
Рет қаралды 2,2 М.
How to Master VBA loops FAST (with real coding examples)
8:37
Excel Macro Mastery
Рет қаралды 25 М.
SAP to Excel: Automate the export of SAP data to Excel ⚡
13:58
Log in to SAP with Excel and VBA - Open Transaction [english]
8:03
Cust&Code in SAP ABAP
Рет қаралды 4 М.
5 Excel Tools Most Users Never Think to Use (Files Included)
12:34
MyOnlineTrainingHub
Рет қаралды 201 М.
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 17 МЛН