Wednesday, September 4, 2019

SAP Auto Login Script

Set SapGui = GetObject("SAPGUI")

Set application = SapGui.GetScriptingEngine

Set connection = application.OpenConnection("System Name as per Logon Pad", True)

Set Session = connection.children(0)

session.findById("wnd[0]/usr/txtRSYST-MANDT").text = "ClientNumber"

session.findById("wnd[0]/usr/txtRSYST-BNAME").text = "UserName"

session.findById("wnd[0]/usr/pwdRSYST-BCODE").text = "Password"

session.findById("wnd[0]").sendVKey 0

Thursday, May 2, 2019


sapgui/user_scripting TRUE
sapgui/user_scripting_disable_recording FALSE
sapgui/user_scripting_per_user FALSE

Wednesday, February 27, 2019

VBA excel Macros info

To Find the Last Row.

Dim sht As Worksheet
Dim LastRow As Long
Set sht = ThisWorkbook.Worksheets("Sheet1")
LastRow = sht.Cells(sht.Rows.Count, "A").End(xlUp).Row


 VBA to automatically determine what your column widths should be.  

https://www.thespreadsheetguru.com/the-code-vault/2014/3/25/vba-code-to-autofit-columns












Wednesday, July 11, 2018

GRC AC 10 - Create new mitigating control owners


GRC AC 10 - Create new mitigating control owners

Create User in SU01 in GRC
Run the user sync à Object Repository
NWBC à  Access Management/Setup à Access Control Owners à create an entry and select owner type
NWBCàMaster Data à OrganizationsàAssign user in Owner Tab
NWBC à Master Data à Mitigating Controls à Select & Open Control à Owners Tab à Add Row

Sunday, July 8, 2018

VBA Excel Links

Delete Empty Row. 

checks entire row and if empty then delete

https://www.mrexcel.com/forum/excel-questions/901824-vba-delete-blank-rows-only.html

Sunday, December 24, 2017

VBA Excel for Login



Dim HTMLDoc As HTMLDocument
Dim MyBrowser As InternetExplorer


Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" _
            (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Global Const SW_MAXIMIZE = 3
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2


===============


Dim MyURL As String
 On Error GoTo Err_Clear
 MyURL = "https://infinity.icicibank.com/corp/AuthenticationController?FORMSGROUP_ID__=AuthenticationFG&__START_TRAN_FLAG__=Y&FG_BUTTONS__=LOAD&ACTION.LOAD=Y&AuthenticationFG.LOGIN_FLAG=1&BANK_ID=ICI"
 Set MyBrowser = New InternetExplorer
 MyBrowser.Silent = True
 MyBrowser.navigate MyURL
 apiShowWindow MyBrowser.hwnd, SW_MAXIMIZE
 MyBrowser.Visible = True
 Do
 Loop Until MyBrowser.readyState = READYSTATE_COMPLETE
 Set HTMLDoc = MyBrowser.document
 'HTMLDoc.all.CorporateSignonCorpId.Value = "" 'Enter your email id here
 'HTMLDoc.all.CorporateSignonPassword.Value = "" 'Enter your password here

 For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input")
 If MyHTML_Element.ID = "AuthenticationFG.USER_PRINCIPAL" Then MyHTML_Element.Value = "ICICIUSERID": Exit For
 Next


 For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input")
 If MyHTML_Element.ID = "AuthenticationFG.ACCESS_CODE" Then MyHTML_Element.Value = "ICICICPASSWORD": Exit For
 Next

 For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input")
 If MyHTML_Element.ID = "VALIDATE_CREDENTIALS1" Then MyHTML_Element.Click: Exit For
 Next

 Application.Wait Now + TimeValue("00:00:10")

 For Each MyHTML_Element In HTMLDoc.getElementsByTagName("a")
 If MyHTML_Element.ID = "Bank-Accounts" Then MyHTML_Element.Click: Exit For
 Next


 For Each MyHTML_Element In HTMLDoc.getElementsByTagName("a")
 If MyHTML_Element.ID = "HREF_actNicNameOutput[0]" Then accName = MyHTML_Element.Value: Exit For
 Next

 For Each MyHTML_Element In HTMLDoc.getElementsByTagName("a")
 If MyHTML_Element.ID = "HREF_actNoOutput[0]" Then AccNo = MyHTML_Element.Value: Exit For
 Next

 For Each MyHTML_Element In HTMLDoc.getElementsByTagName("a")
 If MyHTML_Element.ID = "HREF_actBalOutput[0]" Then AccBal = MyHTML_Element.Value: Exit For
 Next


Err_Clear:
 If Err <> 0 Then
 Err.Clear
 Resume Next
 End If