frankabhinav Super Contributor.
Super Contributor.
1677 views

SAP application Defination

I am unable to configure using predefined application definition. It is showing error of

SAPSystemwas not set !You may want to review using command line "Loginwatch.exe"
.

Therefore I have manually created(Through coding) for SAP but it is working correctly on some of the system and in some it is not working properly.

Can you guys please share application definition of SAP

SAP information

Component : SAP logon for Window
Release : 750 Final release
File Name: SAPLOGON.EXE
Build: 1817102
Patch level:4
0 Likes
6 Replies
tdrewry Absent Member.
Absent Member.

Re: SAP application Defination

Please contact Kevin Prior (kevin.prior@netiq.com). I believe he has a working script.

Regards,

Tory
0 Likes
frankabhinav Super Contributor.
Super Contributor.

Re: SAP application Defination

Hi Tory,

How do we contact Kevin Prior (kevin.prior@netiq.com). Through mail or some way other.

Thanks
0 Likes
florianz1 Absent Member.
Absent Member.

Re: SAP application Defination

this is more or less what works for us. hope you are using a german sap 🙂

florian

###############################################################################
# Application: saplgpad.exe #
# Name: SAP Logon Pad (Easy Access) #
# Description: SAPClient / SAPGUI #
# Version: 3.0.1 #
# LastChanged: 2018-03-13 ssoadmin@monochrom.at #
# ChangeLog: 2.8.0 Stabilisierung Passwortwechsel #
# ..... ... #
# 3.0.1 ... #
###############################################################################

# -- INFO -- #
# ACHTUNG: enthaelt spitzklammern (notset) .. escape in xml ..
#
# HOWTO: Pwdaenderung anstossen:
# saplogonpad | stage wählen | system | benutzervorgaben | eigene daten | F6
#
# Grundsaetzlich: Hauptproblem bei SAPGUI ist, dass Fenster/Schaltflaechen kaum (eindeutig)
# identifiziert werden koennen. Deshalb ist Tastatur-Emulation und 'raten' wo man im
# Moment umgeht, noetig ..
# -- INFO -- #

# --------------------------------------------------------------------
# ---------------------- I N I T -------------------------------------
# --------------------------------------------------------------------

SetPlat sapgui.exe
# @frank: password policy SAPPassword must exist ..
RestrictVariable $Password SAPPassword


# --------------------------------------------------------------------
# ---------------------- M A I N -------------------------------------
# --------------------------------------------------------------------

# ===========================
# ===== EndScript when SAP-LogonPad is started
# ===========================

# @frank: depends what you have in the title .. as you see we have possibly one or more numbers following SAP Logon
Dialog
Title -regex "SAP Logon \d+"
Class "#32770"
Ctrl #1091
Ctrl #1092
Ctrl #1099
Ctrl #1008
Ctrl #101
Ctrl #1067
EndDialog

EndScript

# ===========================
# ===== Background Object when using SAP-Portal (mostly invisible, used by sap-portal - no need to login)
# ===========================
@frank: here we distinguish between different stages with regex matching
Dialog
Class "SAP_FRONTEND_SESSION"
Title -regex "^SAP$|^P.*SAP.*|^W.*SAP.*"
Ctrl #100
Ctrl #400
Ctrl #500
Ctrl #59393
Parent
Class "Shell DocObject View"
EndParent
EndDialog

# when this element is seen, sap-portal has been started
Set ?LogMeOn "false"


# ===========================
# ===== Login Success
# ===========================

# after successful login: to avoid inputs for subsequent GUIs or SAP Portal
Dialog
Title -regex ".*SAP Easy Access.*"
Class "SAP_FRONTEND_SESSION"
EndDialog

EndScript

# ===========================
# ===== Login P-Stage
# ===========================

Dialog
Class "SAP_FRONTEND_SESSION"
Title -regex "^SAP$|^P.*SAP.*"
Ctrl #100
Ctrl #400
Ctrl #500
Ctrl #59393
EndDialog

If ?LogMeOn eq "false"
# avoid setting subsequent logins for saplogonpad defunct
Set ?LogMeOn "true"
Else
Call EnterData
EndIf

# ===========================
# ===== Login W-Stage
# ===========================

# W-Stage is dealt with separately for the customer code is preset

Dialog
Class "SAP_FRONTEND_SESSION"
Title -regex "^W.*SAP.*"
Ctrl #100
Ctrl #400
Ctrl #500
Ctrl #59393
EndDialog

If ?LogMeOn eq "false"
# avoid setting subsequent logins for saplogonpad defunct
Set ?LogMeOn "true"
Else
Call EnterDataW
EndIf

# ==============================================================
# ===== Passwords
# ==============================================================

# ===========================
# ===== Password Change Prereq
# ===========================

# 2017-06-22: still relevant?
Dialog
Class "#32770"
EndDialog

Delay 250
ReadText #0 ?Text

If "Bitte altes R/3 Kennwort eingeben" -in ?Text
Delay 700
Type $Password
Type \N
Else
If "Altes Kennwort" -in ?Text
Delay 700
Type $Password
Type \N
EndIf
EndIf

# ===========================
# ===== (userinitiated) Password Change Dialogue (neu)
# ===========================

Dialog
Title -regex ".*\sKennwort ändern für Benutzer\s.*"
Class "Transparent Windows Client"
Parent
Title -regex ".*\sPflege eigener Benutzervorgaben\s.*"
Class "Transparent Windows Client"
EndParent
EndDialog

# input current pwd
Type $Password
Type \T
Call PWDChange


# ===========================
# ===== Password Change Dialogue
# ===========================

Dialog
Title -regex "^SAP|^P.*SAP.*|^W.*SAP.*"
Ctrl #0
Ctrl #101
Ctrl #400
EndDialog

Call PWDChange

# ===========================
# ===== Password Change Failed
# ===========================

Dialog
Title -regex ".*\sFehler"
Ctrl #0
Ctrl #102
Ctrl #400
EndDialog

If $PwdLastChangedTime noteq "<NOTSET>"

# reset password to old value if the password change failed ..
Set ?PwdChangeFailedTime ?CurrTime(system)
Subtract ?PwdChangeFailedTime 5 ?Result

If ?Result lt $PwdLastChangedTime

# an error occured right after a password change. reset pwd to old value ..
Set $Password $PasswordOld
MessageBox "Fehler bei der Kennwortaenderung.\n\nMelden Sie sich bitte neu an SAP an und geben Sie ein neues gültiges Kennwort an.\n\nKennwortkriterien:\nDas neue Passwort muss unterschiedlich zu den letzten fuenf verwendeten Passwoertern sein und mindestens eine Ziffer enthalten. Ausserdem muessen die ersten drei Zeichen des Passwort unterschiedlich sein.\nDie Verwendung bestimmter Zeichenfolgen wie asdf, 1234 oder Aehnliches ist nicht erlaubt."

# to not let the (possibly by now morally enerved) user change it's password by circumventing sso
KillApp "saplogon.exe"
KillApp "saplgpad.exe"
Click #0

EndIf

Else

# to let us know if ever this dialogue is used in other situations beside password changes. not the case as of now ..
MessageBox "Dieser Fehler sollte nicht auftreten, bitte machen Sie einen Screenshot und benachrichtigen Ihren Administrator .."
EndScript

EndIf


# --------------------------------------------------------------------
# ---------------------- S U B S -------------------------------------
# --------------------------------------------------------------------

Sub GetMyCustomerNumber

# ... here we distinguish between different customers

EndSub

Sub MyCustomerNumber

Call GetMyCustomerNumber
# ... here we set a customer number. resulting in ?CostumerNumber

EndSub

Sub DeleteField

#fall: tipfehler beim erstmaligen eingeben d. usernamens: 20-stelliger name. korrekter username ist 19-stellig, 20es zeichen bleibt stehen
Type \T
Type \Shift+\T

EndSub

Sub EnterData

Call MyCustomerNumber

Type \Shift+\T
Type ?CostumerNumber
Type \T
SetPrompt "Benutzername:" $Username
Call DeleteField
Type $Username
Type \T
SetPrompt "Kennwort:" $Password
Type $Password
Type \N
Delay 999

Call CheckLogonError

EndSub

Sub EnterDataW

Call MyCustomerNumber

SetPrompt "Benutzername:" $Username
Call DeleteField
Type $Username
Type \T
SetPrompt "Kennwort:" $Password
Type $Password
Type \N
Delay 999

Call CheckLogonError

EndSub

Sub CheckLogonError

ReadText #59393 ?text
If "nicht korrekt" -in ?text
Call IncorrectLogon
Else
If "Benutzer ist gesperrt (Verantwortlichen verstaendigen)" -in ?text
Call UserLockedByAdmin
Else
If "zuviele Fehlversuche" -in ?text
Call UserLocked
Else
If "Benutzerkonto ist nicht mehr oder noch nicht gueltig" -in ?text
Call UserNotYetActive
EndIf
EndIf
EndIf
EndIf

EndSub

Sub IncorrectLogon

If ?CostumerNumber eq "<NOTSET>"
Call GetMyCustomerNumber
EndIf

DisplayVariables "Anmeldung fehlgeschlagen! Falls ihr Passwort zurückgesetzt wurde, geben Sie bitte das neue Kennwort ein." $Username $Password
Type \Shift+\T
Type ?CostumerNumber

Type \T
Type $Username

Type \T
Type $Password

Type \n
Delay 2000

Call CheckLogonError

EndSub

Sub UserLockedByAdmin

MessageBox "Ihr Benutzerkonto wurde administrativ gesperrt. Bitte kontaktieren Sie ihren Administrator."
EndScript

EndSub

Sub UserLocked

MessageBox "Ihr Benutzerkonto wurde wegen zu vieler Falschanmeldungen gesperrt. Bitte kontaktieren Sie ihren Administrator."
EndScript

EndSub

Sub UserNotYetActive

MessageBox "Ihr Benutzerkonto hat ein Eintrittsdatum, das in der Zukunft liegt. Bitte kontaktieren Sie Ihren Administrator."
EndScript

EndSub

Sub PWDChange

# backup password, in case change fails
Set $PasswordOld $Password
ChangePassword $Password "Bitte wählen Sie ein neues Kennwort für SAP .."

If $Password eq $PasswordOld
MessageBox "Neues Passwort darf nicht eines der letzten 25 verwendeten Passwörter sein .. Wählen Sie ein anderes, neues Passwort."
ChangePassword $Password "Bitte wählen Sie ein neues Kennwort für SAP .."
EndIf

# store changetime (as unix timestamp)
Set $PwdLastChangedTime ?CurrTime(system)

Type $Password
Type \T -Raw
Type $Password
Delay 100
Type \N

EndSub

SetPrompt "Bitte geben Sie ihre Login-Daten für SAP an."

0 Likes
frankabhinav Super Contributor.
Super Contributor.

Re: SAP application Defination

Hi florian

I have been trying to use loginwatch.exe for SAP. But it is saying cannot find application.(saplogon.exe)
0 Likes
florianz1 Absent Member.
Absent Member.

Re: SAP application Defination

is it a saplogon.exe getting executed, when you start sap?
you might need to get into: https://www.netiq.com/documentation/securelogin-86/application_definition_guide/data/bookinfo.html if you want to get that to work.

florian

0 Likes
frankabhinav Super Contributor.
Super Contributor.

Re: SAP application Defination

Yes it is saplogon.exe from where my application start.

I did go through . Inside loginwatch.exe I am putting saplogon.exe. But still no log is made.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.