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


Sunday, September 17, 2017

Excel Tips

1. Sum: Alt +  '+'
2. Time: Ctrl + Shift + ;
3. Date : Ctrl + ;
4.Row Highlight : Shift+ Space Bar
5.Column Highlight: Ctrl + Space Bar
6.Removing Column: Ctrl + 0
7.Removing Row: Ctrl + 9
8.New Line In a Cell: Alt + Enter
9.Show/Hide Formula: Ctrl + ~
10.Quick Filter: Alt + Down
11.Filter All: Ctrl + Shift + L
12.Sort Filter: Alt + A + SS
13.Save As: F12
14.Text to Columns : Alt + A + E
15.Remove Duplicates : Alt + A + M
16.Data Validation: Alt + A + V
17.Share a Spread Sheet: Alt + R + W
18.Show All Comments: Alt + R + A
19.Protect Sheet: Alt + R + PS
20.Protect WorkBook: Alt + R + PW
21.Spell Check: Alt + R + S
22.Arrange All:  Alt + W + A
23.Freeze Panes: Alt + W + FF
24.Zoom In: Ctrl + Mouse
25.

Tuesday, August 29, 2017

Peg System

  • 0—Zoo
  • 1—Tie
  • 2—Noah
  • 3—Ma
  • 4—Rye
  • 5—Law
  • 6—Shoe
  • 7—Cow
  • 8—Ivy
  • 9—Bee

  • 0 = Z or S. Remember ‘zero’ starts with a z/s sound
  • 1 = T or D. When we write t and d, they both have just one vertical stroke
  • 2 = N. N has two vertical strokes
  • 3 = M. M has three vertical strokes
  • 4 = R. The word ‘four’ ends in R
  • 5 = L. The Roman numeral for 50 is L. Simply drop the zero to give 5
  • 6 = Ch, Sh or J. The number 6 looks kind of a back to front J
  • 7 = K, hard C or hard G. I just remember this one because seven seems like a very sharp, harsh number to me as do these consonants
  • 8 = F. A cursive ‘f’ has two loops, just like the number eight
  • 9 = P or B sounds. 9 looks like a back to front P

Monday, August 21, 2017

TCDCOUPLES

how to check T-codes from multiple roles

table - agr_1251 -->    agr_name= YEITITD:ALLX:COMMON_END_USER, YEFIAAM:ALLX:AA_REPORT_FBP

object = s_tcode
field= tcd

If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.Children(0)
End If
If Not IsObject(session) Then
   Set session    = connection.Children(0)
End If
If IsObject(WScript) Then
   WScript.ConnectObject session,     "on"
   WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "/nse16"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtDATABROWSE-TABLENAME").text = "agr_1251"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/btn%_I1_%_APP_%-VALU_PUSH").press
session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE/ctxtRSCSEL_255-SLOW_I[1,0]").text = "YEFIGLM:HLDG:TMTR_BU"
session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE/ctxtRSCSEL_255-SLOW_I[1,1]").text = "YEFIGLM:HLDG:TRAINS_BU"
session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE/ctxtRSCSEL_255-SLOW_I[1,1]").setFocus
session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE/ctxtRSCSEL_255-SLOW_I[1,1]").caretPosition = 22
session.findById("wnd[1]/tbar[0]/btn[8]").press
session.findById("wnd[0]/usr/txtI3-LOW").text = "s_tcode"
session.findById("wnd[0]/usr/txtI6-LOW").text = "tcd"
session.findById("wnd[0]/usr/txtMAX_SEL").text = ""
session.findById("wnd[0]/usr/txtMAX_SEL").setFocus
session.findById("wnd[0]/usr/txtMAX_SEL").caretPosition = 11
session.findById("wnd[0]").sendVKey 8

Tuesday, July 11, 2017

SAPGUI Table Access Script (AGR_DEFINE)

If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.Children(0)
End If
If Not IsObject(session) Then
   Set session    = connection.Children(0)
End If
If IsObject(WScript) Then
   WScript.ConnectObject session,     "on"
   WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "/nsm37"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/txtBTCH2170-JOBNAME").text = "PFCG_TIME_DEPENDENCY"
session.findById("wnd[0]/usr/txtBTCH2170-JOBNAME").caretPosition = 20
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]/usr/chk[1,12]").selected = true
session.findById("wnd[0]/tbar[1]/btn[45]").press
session.findById("wnd[0]/usr/lbl[5,3]").setFocus
session.findById("wnd[0]/usr/lbl[5,3]").caretPosition = 5
session.findById("wnd[0]/mbar/menu[2]/menu[4]").select
session.findById("wnd[0]/tbar[1]/btn[17]").press
session.findById("wnd[1]/usr/ctxtG_0400_DATA-SELECTED_OBJECT-OBJ_NAME").text = "ZRHR_COMPARE_LEAVE_REPORT"
session.findById("wnd[1]/usr/ctxtG_0400_DATA-SELECTED_OBJECT-OBJ_NAME").caretPosition = 25
session.findById("wnd[1]").sendVKey 0
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]/usr/txtP_TAB").text = "X"
session.findById("wnd[0]/usr/txtP_TAB").caretPosition = 1
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]/usr/ctxtGD-TAB").text = "AGR_DEFINE"
session.findById("wnd[0]/usr/txtGD-MAX_LINES").text = ""
session.findById("wnd[0]/usr/txtGD-MAX_LINES").setFocus
session.findById("wnd[0]/usr/txtGD-MAX_LINES").caretPosition = 0
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").currentCellRow = -1
session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").selectColumn "AGR_NAME"
session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").pressToolbarButton "&SORT_DSC"

Sunday, July 9, 2017

SAP GUI Script OS command

If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.Children(0)
End If
If Not IsObject(session) Then
   Set session    = connection.Children(0)
End If
If IsObject(WScript) Then
   WScript.ConnectObject session,     "on"
   WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "/nsm37"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/txtBTCH2170-JOBNAME").text = "PFCG_TIME_DEPENDENCY"
session.findById("wnd[0]/usr/txtBTCH2170-JOBNAME").caretPosition = 20
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]/usr/chk[1,12]").selected = true
session.findById("wnd[0]/tbar[1]/btn[45]").press
session.findById("wnd[0]/usr/lbl[5,3]").setFocus
session.findById("wnd[0]/usr/lbl[5,3]").caretPosition = 13
session.findById("wnd[0]/mbar/menu[2]/menu[4]").select
session.findById("wnd[0]/tbar[1]/btn[17]").press
session.findById("wnd[1]/usr/ctxtG_0400_DATA-SELECTED_OBJECT-OBJ_NAME").text = "RSBDCOS0"
session.findById("wnd[1]/usr/ctxtG_0400_DATA-SELECTED_OBJECT-OBJ_NAME").caretPosition = 8
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[0]").sendVKey 4
session.findById("wnd[0]").sendVKey 3
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]").sendVKey 3
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]/usr/sub:SAPMSSY3:0131/txtABDBG-CURRLINE[4,6]").setFocus
session.findById("wnd[0]/usr/sub:SAPMSSY3:0131/txtABDBG-CURRLINE[4,6]").caretPosition = 15
session.findById("wnd[0]").sendVKey 5
session.findById("wnd[0]/usr/sub:SAPMSSY3:0131/txtABDBG-CURRLINE[5,6]").setFocus
session.findById("wnd[0]/usr/sub:SAPMSSY3:0131/txtABDBG-CURRLINE[5,6]").caretPosition = 16
session.findById("wnd[0]").sendVKey 2
session.findById("wnd[0]/usr/txtABDBG-V1VALUE").text = "         0"
session.findById("wnd[0]/usr/txtABDBG-V1VALUE").setFocus
session.findById("wnd[0]/usr/txtABDBG-V1VALUE").caretPosition = 10
session.findById("wnd[0]/usr/btnB_REP_1").press
session.findById("wnd[0]").sendVKey 8

Tuesday, July 4, 2017

GRC Important Tables

Table Table Description Long Description
GRACREQ  Request Header This table will provide the information about Request ID, Request Type, Request Creation Date and Request Priority
GRACREQUSER User Associated with Request This table will provide the information about user for whom GRC request has been raised and provides details about User ID, User First Name, User Last Name and User Email ID
GRACREQPROVITEM  Line Items Associated with Request This table will provide the information about the request and the below Line Items in the request with their corresponding VALID FROM and VALID TO dates.
GRACREQPROVLOG  Request Provsioning Log This table will provide the information about the request and the Line Items in the request with their provisioning status (Success or Failure or Warning)
GRFNMWRTINST  MSMP Runtime - Instance Header Info This table will provide the information about the request and its corresponding instance status.
GRFNMWRTAPPR  MSMP Runtime - Current Approvers for Line This table will provide the information about the request and current approvers for corresponding Line Items in the request.
GRACROLE  Role These tables will provide the information about the roles and their corresponding role owners maintained in BRM.
GRACROLEAPPRVR  Role Approver
SAP Security Tables  SAP Security Tables 
AGR_1016 Name of the activity group profile
AGR_1016B Name of the activity group profile
AGR_1250 Authorization data for the activity group
AGR_1251 Authorization data for the activity group
AGR_1252 Organizational elements for authorizations
AGR_1253 Authorization Data for Activity Group - St
AGR_AGRS Roles in Composite Roles
AGR_AGRS2 Role definition
AGR_ATTS Role attributes
AGR_BUFFI Internet Links for a Role
AGR_BUFFI2 Internet links table - Customer version of
AGR_BUFFI3 Internet links table - SAP versions of SAP
AGR_CUSTOM Role Customizing objects
AGR_DATEU Personal settings for roles
AGR_DEFINE Role definition
AGR_FAVOS Personal settings for PFCG
AGR_FLAGS Role attributes
AGR_FLAGSB Role attributes
AGR_HIER Table for Structure Information for Menu
AGR_HIER_BOR Table for Object-Oriented Navigation (OBN)
AGR_HIER2 Menu structure information - Customer vers
AGR_HIER3 Menu structure information - SAP version o
AGR_HIERT Role menu texts
AGR_HIERT2 Role menu texts - Customer version of SAP
AGR_HIERT3 Role menu texts - SAP Original
AGR_HPAGE Role Home Page
AGR_HPAGET Description of the Home Page for a Role
AGR_INFO Filter Values from Generation Run
AGR_LOGSYS Logical system
AGR_LSD Role attributes
AGR_MAP_KNUMA Conversion Table AG_GUID CRM <> KNUMA
AGR_MAPP MiniApps in Role
AGR_MARK Table for report SAPPROFC_NEW
AGR_MEM_INITIAL Agreements: Buffer for Intial Upload
AGR_MINI MiniApps in Role
AGR_MINI2 MiniApps in Role
AGR_MINIT Role mini-appl texts
AGR_MINIT2 Role mini-application texts
AGR_NUM_2 Internal Counter for Assigning Profile Nam
AGR_NUMBER Internal Counter for Assigning Profile Nam
AGR_OBJ Assignment of Menu Nodes to Role
AGR_PROF Profile name for role
AGR_REL_KNUMA_CM Assignment: Agreement   > Campaign
AGR_SELECT Assignment of roles to Tcodes
AGR_TCDTXT Assignment of roles to Tcodes
AGR_TCODE3 Assignment of roles to Tcodes
AGR_TCODES Assignment of roles to Tcodes
AGR_TEXTS File Structure for Hierarchical Menu - Cus
AGR_TIME Time Stamp for Role (Menu, Profile, Author
AGR_TIMEB Time Stamp for Role (Profile Generation)
AGR_TIMEC Time Stamp for Role (User Assignment)
AGR_TIMED Time Stamp for Role (Profile Comparison, R
AGR_USERS Assignment of roles to users
AGR_USERT Assignment of roles to users

Wednesday, May 24, 2017

SAP GRC AC




Name of the Program
Description
INCREMENTAL
Frequency 
Start Time
GRAC_PFCG_AUTHORIZATION_SYNC
Authorization Sync
N/A
GRAC_REPOSITORY_OBJECT_SYNC
User, Role and Profile Sync
every 6hrs
5:00AM
GRAC_ACTION_USAGE_SYNC
Action Usage Sync
N/A
GRAC_ROLE_USAGE_SYNC
Role Usage
N/A
GRAC_SPM_LOG_SYNC
SPM Workflow Log Sync
N/A
GRAC_BATCH_RISK_ANALYSIS
Risk Analysis in Batch Mode
Daily
5:00AM
GRFNMW_BATCH_EMAIL_REMINDER
Email Reminder
N/A


Name of the Program
Description
FULL
Frequency
Start Time
GRAC_PFCG_AUTHORIZATION_SYNC
Authorization Sync
N/A
GRAC_REPOSITORY_OBJECT_SYNC
User, Role and Profile Sync
Weekly
5:00AM
GRAC_ACTION_USAGE_SYNC
Action Usage Sync
N/A
GRAC_ROLE_USAGE_SYNC
Role Usage
N/A
GRAC_SPM_LOG_SYNC
SPM Workflow Log Sync
N/A
GRAC_BATCH_RISK_ANALYSIS
Risk Analysis in Batch Mode
Weekly
5:00AM
GRFNMW_BATCH_EMAIL_REMINDER
Email Reminder
N/A


Name of the Program
Description
NORMAL
Frequency
Start Time
GRAC_PFCG_AUTHORIZATION_SYNC
Authorization Sync
every 6hrs
5:00AM
GRAC_REPOSITORY_OBJECT_SYNC
User, Role and Profile Sync
N/A
GRAC_ACTION_USAGE_SYNC
Action Usage Sync
every 6hrs
5:00AM
GRAC_ROLE_USAGE_SYNC
Role Usage
every 6hrs
5:00AM
GRAC_SPM_LOG_SYNC
SPM Workflow Log Sync
Daily
5:00AM
GRAC_BATCH_RISK_ANALYSIS
Risk Analysis in Batch Mode
N/A
GRFNMW_BATCH_EMAIL_REMINDER
Email Reminder
Daily
7:00AM




SAP GRC AC Jobs




Monday, May 8, 2017

SAP SBWP

RSSODLIN - flags all SBWP inbox documents of a certain user for reorganization (completely clears the slected folder)  - note 63912.
RSSOINBD - flags all SBWP inbox documents of a certain user for reorganization - note 640160.

RSSODLWF - flags all send notifications for organization - note 131031.
RSSOREDF - flags all documents referenced to a batch user for reorganization - note 516110.
RSSOMOVE - with this report you may flag contents of a user's inbox for reorganization, while filtering the data by date (This is the most useful, though unread or unexpired documents will not be deleted).