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