SAP Scripting

Small instruction about SAP scripting.

Activate SAP Scripting in GUI settings (SAP Logon settings).

Open SAP and hit “Record macro” in GUI menu. Run all needed steps and stop recording.

As a result you’ll get file with script. For example I’ve a script of creating 0015 infotype record:

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]/tbar[0]/okcd”).text = “pa30”
session.findById(“wnd[0]”).sendVKey 0
session.findById(“wnd[0]/usr/subSUBSCR_PERNR:SAPMP50A:0110/ctxtRP50G-PERNR”).text = “609”
session.findById(“wnd[0]”).sendVKey 0
session.findById(“wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITKEYS:SAPMP50A:0350/ctxtRP50G-CHOIC”).text = “15”
session.findById(“wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITKEYS:SAPMP50A:0350/ctxtRP50G-SUBTY”).text = “0030”
session.findById(“wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_TIME:SAPMP50A:0330/ctxtRP50G-BEGDA”).text = “100914”
session.findById(“wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITKEYS:SAPMP50A:0350/ctxtRP50G-SUBTY”).caretPosition = 4
session.findById(“wnd[0]/usr/txtQ0015-BETRG”).text = “11”
session.findById(“wnd[0]/usr/txtQ0015-BETRG”).caretPosition = 18
session.findById(“wnd[0]”).sendVKey 11

Then you can put this script as VBA macro into MS Excel, handle it in a right manner (i.e. make a cycle) and automate you regular tasks or data upload/ mass change.

Important: scripting doesn’t understand system errors, system messages. eCATT and SAP Personas understand.

SAP Screen Personas Troubleshooting

What to do if SAP Screen Personas throws you away with timeout error?

Double check:

  • There is enough memory for ITS server/service. You can’t find this error in system logs, only in web browser console mode (for developers)
  • Set handler CL_HTTP_EXT_ITS_BASIC for restgui service in SICF transaction

It works for SAP Screen Personas version 2.


By a chance, I’ve found this functional module in SAP. It looks like a useful if you need to change personal data from ABAP or to create a new employee number. And it works quite fast! It’s just a note for myself in case I’ll need it.

Feel free to add yours!

Unlock variants

There is a program RSVARENT to unlock locked system variants (for reports).

Enable green checkboxes in PA20, PA30

There is a note 713327 – Green ticks for time management infotypes. You can look inside to find out how it sets these ticks.

SAP Innovation Discovery


Just recently I’ve found a new service from SAP: Innovation Discovery. THe service allows to find new functions in SAP very quickly, like EhP or AddOns. Plus you can find all functions that are in any EhP that is convenient.

Direct link:

Or you can find it: and there is orange button on the top “Innovation Discovery”.

Overview SAP UI Technologies and when to choose what


Want to show you a good presentation about different SAP Interfaces. All rights belong to SAP AG. Have a look at this presentation if you want to learn something new about SAP Fiori, SAP UI approach, tips and tricks.


Automatic PFCG roles assignment

There is a magic tool in the system that allows you to assign PFCG roles based on organization position. It means we can use org chart to say what roles and structure profiles to assign to users who holds that position. Let’s say for HR department we can assign role “HR Manager” and ALL structure profile. WHen somebody moves to HR department system will automatically assign that role and profile to him. The same if somebody leaves HR department role and profile will be revoked. There is no need to call IT to grant/revoke access. This is old mechanism, not very flexible, bo SOD control, but it works. New solution is SAP GRC.

Read More

Developing programs for PUST/PEST


Want to leave here a reminder for myself how to develop programs for PUST/PEST transactions. Source –

Sometime SAP deletes its own links, so let the text stay here for a while.

Read More

ArchiveLink permissions

Did you know that ArchiveLink could work with HCM authorizations and P_ORGIN permission object? Citate: “With correct set system documents could be attached to any infotype and access to them will be granted by infotype authorizations. Thus if you attach scans to infotype 21 only users with access to 21st infotype will see them”. (с) WHITE PAPER SAP Employee File Management. So, ArchilvLink permissions could use regular SAP permission role objects without any additional customization which is great!

I’ve never used this trick cause all documents were assigned to personnel number and 2 infotype. Nice and free solution.

White paper – An Introduction to SAP Employee File Management-1