Using SAP GUI from Excel on MacOS
I have large data sets that I manipulate in excel and copy paste manually to SAP using a variety of different t-codes. I am looking to automate this by running SAP GUI from my excel to copy and paste the data in specific fields. What I am struggling with is getting the initial connection from Excel VBA to SAP. I have gone through several of the stack overflow questions on this topic but I am not finding any good answers for Mac OS specifically. Please let me know what code I can use to control SAP from Excel VBA. Thank you!
See also questions close to this topic
Open file dialog popup when trying to enter formula referencing sheet
I am programmatically creating a set Excel sheets from my C# code.
In the code, I create and populate my first sheet (call it Parts), then I create and populate my second sheet (call it Lookup).
Now when I populate the Lookup sheet, some of the cells are utilizing a formula for a sheet to be created (Analysis).
so the fomula is this:
= VLOOKUP(C2, Analysis!A:B, 2, FALSE)
When I am running this code, a file dialog pops up, and I think it's looking for a file Analysis.
How do I get around this? Should I turn off calculations (and how would you do this?) or some other method?
How would I check if a date is between two dates and return a number based on the response in Excel VBA
I want to have a system in place that means that I can have a table of 5 columns and x rows such that, in a different sheet, I can check whether the date is between two weeks, and return the correct value based on the check. ie if the date was between 2 and 3 weeks ago return the first number, if between 4 and 5 weeks, second number, 6 and 7 weeks, 3rd number, 8 weeks, 4th number. If it is more than 9 weeks ago it should not return a number for that row.
I want it to be able to sum up payments as well. So if there are multiple payments in a week, return the sum of those payments. I could manually get it to look at five rows, but I really don't want to do that as it would get messy if I needed to increase it.
I was thinking along the lines of a for loop that first checked if there was a description for the row, and then if there was, run the program.
Why error 462 with Excel VBA trying to connect to wikipedia?
This is my code in Excel VBA that I'm trying to use to extract contect from wikipedia but anytime I run it, I get "run-time error '462'
the remote server machine doe not exist or is unavailable
can someone assist with this?
Sub CountryPopList() Dim ieObj As InternetExplorer Dim htmlELe As IHTMLElement Dim i As Integer i = 1 Set ieObj = New InternetExplorer ieObj.Visible = True ieObj.navigate "https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population" Application.Wait Now + TimeValue("00:00:03") For Each htmlELe In ieObj.document.getElementsByClassName("wikitable")(0).getElementsByTagName("tr") With ActiveSheet .Range("A" & i).Value = htmlELe.Children(0).textContent .Range("B" & i).Value = htmlELe.Children(1).textContent .Range("C" & i).Value = htmlELe.Children(2).textContent .Range("D" & i).Value = htmlELe.Children(3).textContent .Range("E" & i).Value = htmlELe.Children(4).textContent End With i = i + 1 Next htmlELe End Sub
In a VBA Userform, which event is triggered when exiting a filed
I'm using Microsoft Office Professional Plus (64 bit) on a Windows 10 (64 bit) platform. I have a subroutine that is processed when I make a change to a Userform field called
MyDate. It's called
Private Sub MyDate_AfterUpdate(). It's the second field on a form. It works fine as long as the contents of the
MyDatefield are edited. However, if the user doesn't need to update the contents of the
MyDatefield because they accept the default of the field and just presses the tab key past that second field, I'd still like the subroutine to be executed. What event can I use to activate code when I simply tab through the field and don't necessarily edit the contents? Thanks for looking at this.
Detect the protobuf REST api with OWASP ZAP on iPhone
I want to test Network Communication with OWASP ZAP.
I could get the general RESTful command. But I can't get any protobuf RESTful result.
I have no idea what happen and how to setup the environment of OWASP ZAP for protobuf.
This is my environment I want to test.
My App(Real iPhone Device) <-> OWASP ZAP(Mac) <-> Our Server
Please help or try to give some ideas how to achieve this. Thanks!
ICS file not attaching when viewed in Mac Client (using Ical.net c#)
I have a strange issue with sending an ICS file using ical.NET and the built in MailMessage class(https://github.com/rianjs/ical.net).
In Outlook, Gmail and on iPhones everything works as expected when sending an email with the ICS file generated from the above library. I see the email message and an appointment (either found by Siri or shown as a normal appointment in Outlook / Gmail).
The ICS file passes the standard validator (I used this one https://icalendar.org/validator.html) however when the email is received on a Mac Client (I don't know the version of the OS, the client isn't tech savvy) I get the following:
- ICS file is only shown (even attached) when the email message is blank
- If there is ANY text in the email message, no ICS file is attached and no appointment shows
Has anyone had this experience before? Either with ical.NET or without. It's driving me insane and as I don't have a Mac to test on, is very difficult to diagnose.
Why trust list of keychain on mac also needs login password?
There are two mac applications. One application create a keychain item and set trust list. Another one to get that item. But, it's need login password, why? And, if I set "allow all applications to access this item", it's need login password too.
What is the integration process from ServiceNow to SAP? can we transfer the live data from SAP?
service now integration with SAP by automate process? how to establish connection to SAP for data transfer?
SAPUI5 Not clearing view after browser back button pressed
I have a 2 page app..
First time into the 2nd page, it performs the onInit() and works fine.
If the browser back button is hit and the 2nd page is entered into again onRouteMatched() is no triggered, the view is not cleared and this causes issues in that elements of the view are duplicated etc.
I've tried a number of things: - Clearing the view model, - Destroying the page on Exit, - Duplicating onInit into onRouteMatched.
but nothing seems to work.
Reloading fixes the issue.
Converting ABAP 740 syntax to 700 - VALUE & LOOP AT ... GROUP BY
I found a demo program for the tree salv online that I wanted to use, but since it uses 740 syntax, I have to convert it first. Which is also a good opportunity to learn more about the new syntax.
I already did almost all of it, but am having trouble with
VALUE. Reading this wiki entry, among others, couldn't help me.
Original code in 740:
" Treenodes einfügen LOOP AT it_spfli ASSIGNING FIELD-SYMBOL(<c>) GROUP BY <c>-carrid. DATA(it_cp) = VALUE ty_it_spfli( FOR <cp> IN GROUP <c> ( <cp> ) ). DATA(o_parent) = o_tree->get_nodes( )->add_node( related_node = '' relationship = cl_gui_column_tree=>relat_last_child collapsed_icon = CONV #( icon_closed_folder ) expanded_icon = CONV #( icon_open_folder ) row_style = if_salv_c_tree_style=>intensified text = CONV #( <c>-carrid ) ). IF lines( it_cp ) > 1. o_parent->get_item( 'CARRID' )->set_type( if_salv_c_item_type=>button ). o_parent->get_item( 'CARRID' )->set_value( 'all' ). ENDIF. LOOP AT GROUP <c> ASSIGNING FIELD-SYMBOL(<f>). DATA(o_carrid) = o_tree->get_nodes( )->add_node( related_node = o_parent->get_key( ) relationship = cl_gui_column_tree=>relat_last_child data_row = <f> row_style = if_salv_c_tree_style=>intensified text = CONV #( <f>-connid ) ). o_carrid->get_item( 'CARRID' )->set_type( if_salv_c_item_type=>checkbox ). o_carrid->get_item( 'CARRID' )->set_editable( abap_true ). ENDLOOP. ENDLOOP.
New code in 700, except for line with
" new variables added to convert code to 700 DATA: o_nodes TYPE REF TO cl_salv_nodes, o_parent TYPE REF TO cl_salv_node, o_carrid TYPE REF TO cl_salv_node, o_item TYPE REF TO cl_salv_item, o_key TYPE lvc_nkey. DATA: h_collapsed_icon TYPE salv_de_tree_image VALUE 'icon_closed_folder', h_expanded_icon TYPE salv_de_tree_image VALUE 'icon_open_folder', h_text_carrid TYPE lvc_value. DATA: it_cp TYPE STANDARD TABLE OF ty_it_spfli. SORT it_spfli BY carrid. " Treenodes einfügen LOOP AT it_spfli ASSIGNING <c>. AT NEW carrid. it_cp = value TY_IT_SPFLI( for <CP> in GROUP <c> ( <CP> ) ). <--- Here o_nodes = o_tree->get_nodes( ). h_text_carrid = <c>-carrid. o_parent = o_nodes->add_node( related_node = '' relationship = cl_gui_column_tree=>relat_last_child collapsed_icon = h_collapsed_icon expanded_icon = h_expanded_icon row_style = if_salv_c_tree_style=>intensified text = h_text_carrid ). IF LINES( it_cp ) > 1. o_item = o_parent->get_item( 'CARRID' ). o_item->set_type( if_salv_c_item_type=>button ). o_item->set_value( 'all' ). ENDIF. ENDAT. o_key = o_parent->get_key( ). o_carrid = o_nodes->add_node( related_node = o_key relationship = cl_gui_column_tree=>relat_last_child data_row = <c> row_style = if_salv_c_tree_style=>intensified text = h_text_carrid ). o_item = o_parent->get_item( 'CARRID' ). o_item->set_type( if_salv_c_item_type=>checkbox ). o_item->set_editable( abap_true ). ENDLOOP.
My questions are now:
- Did I convert the
LOOP AT ... GROUP BYcorrectly by using
- How do I convert the line with
Thank you in advance for your help.
- Did I convert the
How to get the SAP GuiComponent of a button in a SAP GuiToolbarControl?
I want to fetch a button in a SAP
GuiToolbarControlto calculate the rectangle.
First, I fetch the Id base on the index, then fetch a
GuiComponentof the button using
string id = toolbarcontrol.GetButtonId(1); GuiComponent item = tf.FindById(id);
Is there a possibility to switch off date expanding at the user level?
Here is one for you.
I have a requirement to switch off the date expanding for some users in SAP GUI.
What I mean is the following feature. When I tip
010101in the date field and press enter it will be automatically expanded to
01.01.2001. When I tip
010199it will be expanded to
01.01.1999and so on. The same with
This would sound like some SAP GUI settings, however I could not find anything in the Visual Design options. The second place I tried was the user level settings in
Is there a way to switch it off?
selectContextMenuItem method returning "The method got an invalid argument"
I'm trying to sort a table in SAP in Blue Prism. The code previously worked fine but now I'm getting a "The method got an invalid argument" error when I try to sort the table by context menu item.
I've tried passing a variety of values to the selectContextMenuItem method: "&SORT_DSC", "&SORT_ASC", "&COL_INV"...all yield the same error.
Dim SAPGuiAuto as Object Dim SAPApp as Object Dim SAPCon as Object Dim session as Object Dim Table as Object SAPGuiAuto = Microsoft.VisualBasic.Interaction.GetObject("SAPGUI") SAPApp = SAPGuiAuto.GetScriptingEngine SAPCon = SAPApp.Children(0) session = SAPCon.Children(0) Table = session.findById("/app/con/ses/wnd/usr/cntlGRID1/shellcont/shell") Table.setCurrentCell("-1", "LMENGEIST") Table.selectColumn("LMENGEIST") Table.contextMenu Table.selectContextMenuItem("&SORT_DSC")
I expect the column I've selected to be sorted in descending order.
Thanks in advance for any help you can provide.