Hello web surfer,

welcome at my homepage.

The focus of this site is individual software development and tools.

Last change on March the 17th, 2024
©2024, this is a private website by Stefan Schnell, all rights reserved.

picture of a tree


separator picture of a path
About



 
picture of stefan schnell
Allow me to introduce myself, my name is Stefan Schnell. I was born in Bremervörde in 1964 and grew up in Cuxhaven. After my school and professional education, as well as my community service, I studied at the University of Applied Sciences in Hannover. As a Mechanical Engineer I worked for eight years at Conti Tech, a subsidiary of Continental AG, in the automotive sector, first in Hannover and later in Eislingen. I changed to the LASER machine manufacturer Baublys, a subsidiary of Excel Technology, in Ludwigsburg. Two years later I went to Bonn to the AOK Systems, the IT service provider for statutory health insurance companies, where I worked as a Software Engineer until October 2020, primarily with SAP environments. Now I am working as an Senior IT-Architect at BWI in Meckenheim, the IT system house of the German Federal Armed Forces, in data center automation area.
In addition to my pronounced interest in software developments for automation solutions, with special consideration of complex integration scenarios, my passion is capturing unusual perspectives with my camera – if time permits. I focus the seemingly unimpressive. Also I like to read literature of technical developments in the recent past and futurological visions.
picture of stefan schnell
 

With the VMware Aria Automation environment I have been working since October 2022. In this time I have set my focus on programming in the context of data center automation, as well as integration scenarios of the automation environment.

vExpert

At the 23rd of February 2024 I received the VMware vExpert award. This award honors individuals worldwide for their notable contributions to the VMware community and ecosystem. It is not a technical certification but a recognition for the community efforts. vmware vexpert badge 2024

Forum    Cloud Platform    Marketplace
At the turn of the year 2023 I gave up all my activities in the RPA area. After four and a half years in this field, a professional change beyond my control forced me to take this step. You can find here my reputation snapshot and below the summary of my activities.

summary of uipath community user stefanschnell

Most Valuable Professional (MVP)

At the 21st of February 2022 I received the UiPath MVP award. At the 04th of March 2021 I was already awarded with it. This award is given to those who have continuously making outstanding contributions to the UiPath Community with relentless passion, creativity and drive. The MVP have demonstrated strong product expertise, track record of engagement with the community, innovation, leadership and RPA knowledge sharing.

Official announcing of UiPath 2022
Official announcing of UiPath 2021

image of uipath community mvp 2021 image of uipath community mvp 2022

Monthly Forum Rewards

Monthly UiPath awards a reward to active members of the forum who dedicate their time and share their expert knowledge.
I placed the fifth in August 2021, fourth in September 2021, fifth in October 2021, fourth in November 2021, ninth in December 2021 and ninth in January 2022. With this I was in the top ten six times in a row. Furthermore I placed the seventeenth in February 2022, twelfth in May 2022, first in June 2022, eight in July 2022, ninth in August 2022, second in September 2022 and eleventh in October 2022. This put me on the monthly forum rewards list thirteen times in fifteen months, and ten times in the top ten.


DevCon, MVP Workshop in Expertsville

At the 15th and 16th of June 2021 I gave MVP workshops about SAP Remote Function Call (RFC) at UiPath DevCon. I discussed with participants from around the world about possibilities and specific issues in this context.

image of uipath devcon event for mvp workshop in expertsville about sap rfc

Global Virtual Event

At the 07th of April 2021 I was, beside Lev Kushnir, speaker at a UiPath Global Virtual Event about SAP API Automation with UiPath. I talked about the Remote Function Call (RFC) as a technical base concept, the Business Application Programming Interface (BAPI) as a formal variant of RFC and the Advanced Business Application Programming (ABAP) language, the SAP programming language, and how to use that in the context of UiPath.

image of uipath global event about sap api automation

Community Achievement Award

At the 18th of November 2020 I received the UiPath Community achievement award as a fastest adopter of the new Test Suite in test automation area.

image of uipath community achievement award

Profile    Support Portal
At the end of October 2020, after almost 13 years, I had to give up my user stefan.schnell, because it was linked to an S-User. Now I have a public user (P-User) st.schnell. You can find here the reputation snapshot of my S-User and below the summary of my activities. At the turn over to the year 2024 I decided to freeze my activities for now in the SAP Community, so I look back on almost 16 years of activities. Here the reputation snapshot of my P-User and below the summary of my activities.

summary of sap community user stefan.schnell summary of sap community user st.schnell

Community Moderator

At the 28th of January 2018 I was appointed to a community moderator of the UI SAP GUI for Windows section. The global SAP moderator team became aware of me through my blog posts and further activities in the area of SAP GUI Scripting in the SAP Community. The date of this nomination is almost exactly to the day of my 10-year membership in the SAP Community. With the 09th of April 2021, after more than three years, I quit my role as community moderator.

image of letter of appreciation from sap

Inside Track Presentations

At the SAP Inside Track in Hanover (sitHVR) at Inwerken AG on 24th of February 2018 I presented different integration scenarios for the PowerShell scripting language in SAP. Based on realized use cases I showed the possible results of this combination. On 11th of May 2019 I presented further use cases, based on the presentation from last year. In particular, I showed examples of UI extensions and the use of Appium for mobile device automation, with the possibilities of connecting to a cloud device farm.

image of sap inside track 2018

Topic Leader - Appreciation of Engagement in the SCN

At the 10th of June 2016 I received a certificate of appreciation from SAP to honor my engagement and my outstanding contributions in the area of scripting languages in the SAP Community Network (SCN). In 2015 I was already awarded with it. With the SCN Topic Leader competition the world's most active experts in specific topics of the SCN are exposed.

image of sap topicleader certificate

Honor for 25 Years of Membership

As a university student in the first semester I joined the Association of German Engineers (Verein Deutscher Ingenieure) in 1989. On 21st of March 2014 Mr. Dietrich, the chairman of the Middle Rhein District Association of the VDI, handed to me the Silver VDI Badge for 25 years of loyal membership in a gala at the Koblenz University of Applied Sciences.

image of vdi honour
 


separator picture of a water and stones
Trivia




Most people assume that they need a big development environment with a lot of comfort to create good libraries. This is a mistake. The manufacturers also offer command line (CLI) versions for their compilers and tools, e.g. to ensure multi-platform capability or the ability to integrate into pipelines. Certainly, it is more tedious to read the documentation of the parameters, but in the end we can get the same result. This section will show examples of how to achieve results quickly and easily with just a few tools. This approach also has the advantage that it can be transferred very easily to other systems, because very few or no additional tools are required. This independence provides many freedoms.

Editor

You can choose any editor you like and you know best.
On Windows plattform Notepad++ is a good choice. There is a great list of Notepad++ plugins.
If you want to use one editor on different OS plattforms Geany is a good choice.
Also a great screen-based editor for different OS plattform is Vim. It is included as "vi" with most UNIX systems and with Apple OS X.

Shell

Each operating system has its own shell which you can always use, e.g. on Windows plattform cmd or on Linux plattform bash. A good choice is PowerShell Core. It is cross-plattform and offers great conditions. A detailed documentation of PowerShell is available.

Language

To code in your favorite language you need an SDK, compiler or interpreter. Java
Installation: Extract JDK in a target directory. Set JAVA_HOME variable to the jdk directory and add to the PATH variable %JAVA_HOME%\bin directory.

JavaScript with Node.js
Installation: Extract packed file in a target directory. Set NODE_PATH variable to the directory and add to the PATH variable %NODE_PATH% directory.

.NET e.g. C#
Installation: Extract SDK in a target directory. Set DOTNET_ROOT variable to the sdk directory and add to the PATH variable %DOTNET_ROOT% directory.

Python

Security

Efficiency

Analytic

Tool

  • 7-Zip packer
    Hint: With 7-Zip it is possible to explore CHM Files and to get the HTML files.
  • PureBasic – Windows Development
  • AutoIt – Windows Scripting



  • Rhino is an implementation of JavaScript in Java.
  • {code} - Resources for VMware developer
  • curl
    client URL (cURL) is a command line tool for developers to transfer data to and from a server.
  • Swagger Editor
    Editor to edit OpenAPI definitions in YAML or valid Swagger JSON and to preview this documentation.

To enable the full log start the Orchestrator Control Center and choose Configure Logs. Set the Log level and Scripting log level to ALL, the Scripting log max file size to 50 MB and press SAVE.

vmware orchestrator control center configure logs
Open your terminal emulator, e.g. PuTTY, connect the host and use the following command sequence to create and extract the log, and open it in a screen-based text editor.

cd /
vracli log-bundle
cd home/root/
ls -l
tar -xf log-bundle-*.tar
cd [host name]/services-logs/prelude/vco-app/file-logs/
vi vco-server-app.log

Open your terminal emulator, e.g. PuTTY, connect the host and use the following command sequence to connect a running Orchestrator container.

kubectl get pods --all-namespaces
kubectl -n prelude get pods vco-app-* -o jsonpath='{.spec.containers[*].name}'
kubectl -n prelude exec --stdin --tty vco-app-* -c vco-server-app -- /bin/bash

After that, a bash shell is opened in the terminal emulation, which can be used to work in the running vco container. The second command is not necessary, it shows only the containers of the pod.

Docker Platform

Container Images


Docker CLI Reference

  • docker pull mcr.microsoft.com/powershell
    downloads the PowerShell image from Docker Hub.
  • docker save -o C:\Dummy\powershell.tar mcr.microsoft.com/powershell
    saves the PowerShell image to a local target, to use it without internet connect.
  • docker load -i C:\Dummy\powershell.tar
    loads the PowerShell image from a local source.
  • docker images
    lists all available images.
  • docker create --name powershell mcr.microsoft.com/powershell
    creates a container, with the name powershell.
  • docker start --interactive powershell
    starts the container, with name powershell, in interactive mode. E.g. check information about the OS with the command cat /etc/os-release.
  • docker run --detach --interactive --tty --name powershell mcr.microsoft.com/powershell
    runs the PowerShell image as container, with the name powershell, in interactive mode, e.g. for Docker Desktop.
    Hint: This is a combination of docker create and docker start.
  • docker attach powershell
    connects the container, with the name powershell, in interactive mode.
  • docker cp C:\Dummy\HelloWorld.ps1 powershell:/root/HelloWorld.ps1
    copies a PowerShell script into the container.
  • docker exec powershell pwsh -command "/root/HelloWorld.ps1"
    executes the PowerShell script in the container and delivers the result.
  • docker container ls
    lists all running containers.
  • docker stop powershell
    stops the running container, with the name powershell.
  • docker rm --force powershell
    deletes the container, with the name powershell.
  • docker rmi --force mcr.microsoft.com/powershell
    deletes the PowerShell image.



cat /etc/groupList all available user groups in the system.
cat /etc/os-releaseList information about the Linux operating system.
cat /etc/passwdList all available users in the system.
chgrp GROUP FILEChange the group of a file.
chmod 777 FILEModifies the permissions of a file for owner, group and anyone to rwx (full persmission).
chown USER FILEChange the owner of a file to the user.
find -type f -name FILEFinds one or more files with the given name.
grep -Rl "searchText" .Finds one or more files which contains the search text, recursive, starting from current directory.
printenvDisplays all environment variables.
vi FILE or vim FILEOpens a specific file with the given name in the VIM editor.
  • To enter insert mode, type i.
  • To save the changes press ESC, then type :wq! and press Enter.
  • To exit without saving the changes, press ESC, then type :q! and press Enter.
  • To search press ESC, then type / followed by the word you are searching for.
    Hit n to search forwards and N to search backwards.
  • Jump to begin of a file, press ESC and then type gg.
  • Jump to end of a file, press ESC and then type G.
  • Open a shell, press ESC and then type :shell.
  • Execute a shell command, press ESC and then type ![yourCommand], e.g. !dir.

Ansible Automation Platform



Links


Hint: It is recommended to always include the PowerShell script as a standalone PS1 file in the UiPath workflow. On this way it can be tested very easily with PowerShell and then included in UiPath on the same way.



To combine PowerShell with UiPath we use a tiny test script which needs a parameter and delivers the result of a message box as string.

#-Begin-----------------------------------------------------------------
Param(
[String]$UserName
)
#-Sub Main--------------------------------------------------------------
Function Main {
Add-Type -AssemblyName System.Windows.Forms;
[String]$Result = [System.Windows.Forms.MessageBox]::Show("Hello $($UserName)", `
"Hello", [System.Windows.Forms.MessageBoxButtons]::OKCancel);
$Result;
}
#-Main------------------------------------------------------------------
Main;
#-End-------------------------------------------------------------------
Now the integration of this PowerShell script into a UiPath sequence. Here is one way to read the PowerShell script as text file into a UiPath variable. This variable is the command text for the UiPath activity Invoke PowerShell. It is necessary to set the IsScript flag of the PowerShell Invoke activity in this case. The parameter for the script must be defined also as parameter for the activity, with the same name. Set the TypeArgument property to string and the result of the script will be a collection of strings too, which are stored in the variable Result. With the Write Line activity this result is shown in the output window of UiPath. On this way it is possible to combine PowerShell in UiPath seamlessly and to communicate directly from UiPath with the PowerShell script and vice versa.

uipath sequence to combine powershell
uipath sequence to combine powershell



The following example shows how to get the version and architecture of the engine of Invoke PowerShell activity of UiPath.

#-Begin-----------------------------------------------------------------
"$($PSVersionTable.PSVersion) - $env:PROCESSOR_ARCHITECTURE"
#-End-------------------------------------------------------------------
The path to the PowerShell script is set to Environment.CurrentDirectory, this is the path to the current UiPath project directory. On this way you can store the script in same directory and with the publishing it is part of the package.

uipath sequence with powershell
The result shows us the version and architecture of the PowerShell package, used by UiPath Studio, in the version 22.4.3 of the Windows compatibility mode.

uipath result window of powershell


More and more desktop applications are being replaced by web applications. Selenium is recommended for this kind of automation approaches. To use it you need the WebDriver language bindings and a web driver for the browser. Of course, this depends on the browser used.

Checker

Browser

Automation

API

  • Windows Application Driver
    Hint: To use this driver you need the Appium client libraries. These are the same as mobile device automation above.




In a few cases it is necessary to transfer table data from one system to another. Here a report how to import table data from a csv file in an SAP system. To export table data you can use transaction code SE16. This method doesn't work with a table which contains RAW data fields.

In a normal case you configure the SAP standard users like SAP* or DDIC once when you install the application server. But later, month ago, it could be possible that you forget the passwords of the standard users in the different clients of the application server. Here a program to set or copy the passwords of the standard users in the client 000 from client 001.

With ABAP it is possible to use ActiveX applications on the presentation server. Now a few examples to show some possibilities.

  • How to use SAP GUI Scripting inside ABAP In current versions from SAP for Windows the security options don't allow the using of SAP GUI Scripting inside ABAP. Disable this security rules to try the source. This source shows the possibility to use SAP GUI Scripting inside ABAP

  • Easy Way of ABAP ActiveX Connectivity

  • How to use Visual Basic Script It is also possible to use Microsoft Visual Basic Script inside ABAP. This means you can execute scripts direct from ABAP. Here a source to execute VBScript from ABAP and here an alternative source to execute VBScript from ABAP.

  • How to use Google translate With the Microsoft Internet Explorer it is possible to call web sites via COM. In the following code we call Google translate and send a text to translate it and get the result back. It translate from German to English language. Here the ABAP source to call Google translate.
    This program bases on a VBA code snippet from Jean Pierre Allain, thanks to Jean Pierre.

  • How to use Microsoft Word spell and grammar checker The Microsoft Office applications are a quasi standard, installed on most of the business computers and it can be use via OLE. Now it is a small step to use the functionalities of the Office applications also in ABAP. In the following code we look at the spelling and grammar checker of Microsoft Word. You get any text you want from ABAP to Word, check it and it is returned in a corrected form. Here the ABAP source to use Words spell and grammar checker.

  • How to call a Windows CHM help file with ABAP With this ABAP code it is possible to call each CHM help file on the presentation server and control them. You can switch between the tabs, open the content you want and close the file. Here the ABAP source to use CHM help files.

  • How to control a client with AutoItX from SAP ABAP It is very easy to control a client system from SAP ABAP with AutoIt. Do not forget to register AutoItX on the client system via regsvr32.exe AutoItX.dll. Now you can use AutoIt from ABAP, look at the simple example, it calls notepad and type a text in it:

    Data: AutoIt Type OLE2_OBJECT,
    pid Type i.
    Create Object AutoIt 'AutoItX3.Control'.
    Call Method Of AutoIt 'Run' = pid
    Exporting #1 = 'notepad.exe'.
    Call Method Of AutoIt 'WinWaitActive'
    Exporting #1 = 'Unbenannt - Editor'.
    Call Method Of AutoIt 'Send'
    Exporting #1 = 'Hello from ABAP'.
    Free Object AutoIt.

It is not ordinary but very easy to use DLL calls in ABAP or script languages, e.g. VBScript. Yuri Popov programmed a module, called DynamicWrapperX. It is an ActiveX component, which allow to call each function in a DLL you want via COM. A great module. Here the module DynamicWrapperX.
Thanks to Yuri Popov for this module.
The library offers a lot of functions but I miss the possibility to set a string on an address. So I programmed a small extension library to do it. The library contains only one function, with the name StrPut. Here the DynamicWrapperX extension.

  • How to call Windows API OutputDebugString with ABAP
    To view ABAP debug output on the presentation server you can use the Windows API function OutputDebugString. zDebug is an example, it is a small collection of ABAP procedures or classes to use an external debugger, e.g. like DebugView from Microsoft TechNet, to catch the debug output. Here the ABAP source to use Windows API debug functions.
    Important hint: These procedures only works with foreground jobs and online processes. They does not work with background jobs and batch processes.

  • How to call each DLL function in ABAP
    With this module you can use DLL calls in ABAP, the SAP programming language, very easy too.
    And it is necessary to register DynamicWrapperX on the presentation server too, with regsvr32.exe dynwrapx.dll.
    Look at the ABAP source code to call a DLL function.
    Important hint: This method works only with foreground jobs and online processes. It works not with background jobs and batch processes.
    See also my thread in the SCN.

More and more is JSON (JavaScript Object Notation) the standard in data exchange. I extend the remote enabled function module RFC_READ_TABLE to deliver SAP table data also in JSON format. Here the extended function module of RFC_READ_TABLE with the possibility to export the content in JSON format. Here the corresponding post in the SAP Community.

VBA Code Snippet to Detect Information about SAP GUI Elements

In a few cases it is in business context not allowed to install additional analyze software or tools. So applications that are permissible and available must be used, e.g. like Microsoft Office applications. This makes things a bit more laborious, but not impossible. Here a Visual Basic for Application (VBA) example to detect a few information of the UI Elements of a session of the SAP GUI for Windows with SAP GUI Scripting. The result is written into a Microsoft Excel table.

microsoft excel application with sap gui scripting information
With the access to this kind of information you can detect what you need, e.g. like ID, text, type, name or position, size, etc. On this way you can e.g. easily compare two versions of an UI, to find the differences. With the filter options in Excel the desired information can then be found very quickly. Here the corresponding post in the SAP Community. Here the source code of the modul class with a type definition and here the source code of the sheet.



Check the Existence of an SAP GUI Scripting Object Without Exception

Different SAP environments are not always identical. So it is possible that an GUI object is available in one environment, but not in another. Here a method how to check the existence of a GUI object. In a normal case, if an object not exists, you get an exception error in a messagebox and the script terminates immediately. With this method you can choose whether the script terminate or not. I think this method is a way to make scripting more robust for the work in different environments.
A sub procedure C checks the existence. It gets the SAP GUI Scripting command as string parameter and delivers it to the method Exe of the Check class. This method calls the method FindById and if it doesn't find an object, an exception is thrown. Now the class was destroyed and the destructor calls the method ErrCatch. This method opens a messagebox and sets a global flag. If the flag is set, with a positive answer of the messagebox, the script terminate immediately or runs again with a negative answer. The example code checks the objects of the logon screen.



How to read any table with SAP GUI Scripting and write it to a CSV file

You can do a lot of things with SAP GUI Scripting. Beside the simulation of user inputs you can automize a lot of other stuff. But therefore it is necessary to mix the possibilities e.g. with Visual Basic Scripting. In this source code shows how to read any SAP table from the ALV-Grid of the transaction code SE16 record by record and write it in a text file. The delimiter between each field is a semicolon.
If you want to process the records of the table inside your Visual Basic Scripting code, it is not in any case a benefit to work with a file. This source shows a way to read a table in an array - not a file.
With this examples it is very easy to export any table from SAP and import the data e.g. in Microsoft Excel to analyze or process it.


How to use UnRAR Library with PowerShell

RAR is a very good archive format to compress any type of files in archives. RARLAB offers a free library to unpack those kind of archive files. You can find the UnRAR library here. It is very easy possible to use this library with PowerShell. Therefore you need the definitions of constants, structures und functions as C# code. This code is read as here-string from a file, here the C# code. The following example script contains a function with the name UnpackRAR with the parameters filename and destination path. It reads the C# definition and sets, if necessary, a definition to decide which version (x86 or x64) of the library should be used. It opens the archive and extracts all contained files in the destination path. Here the PowerShell script example how to use the UnRAR library. On this way it is very easy now to extract RAR compressed archives with PowerShell.



How to use any Scripting Language with PowerShell

PowerShell script offers the possibility to start any scripting language interpreter with additional arguments and to catch the result. The following examples shows Python and AutoIt. Here the PowerShell script to call any scripting language interpreter, here the Python example script and here the AutoIt example script.

PowerShell calls script interpreter



separator picture of houses
Projects


Programs

Many information is stored in different files with different formats. This information is often important for the customer and there is the question, how to transport this to a customer.
BinFile2Code is a PowerShell, JSON, Java, JavaScript (VMware Aria) and ABAP code generator which offers this possibility. With BinFile2Code you can store any file as a byte array in a source code.
You can use the PowerShell, JSON or JavaScript source in the context of VMware Aria Automation. Or the JSON in SAPUI5 development as local databinding, e.g. to simulate backend databinding via OData and the SAP Gateway. With the call of the ABAP code the file is set to an export interface or saved on the presentation server. In this case you can executed it on the presentation server e.g. in synchronous mode and the file can be deleted after the execution. Also BinFile2Code supports the SAP MIME-Repository.
With this kind of information you can extend your possibilities. You can integrate each type of file you want in your code, e.g. Portable Document Format (PDF), Compiled HTML Help (CHM), all image, sound and video formats etc.

Download of BinFile2Code (version 2.20 from 18.09.2023)
BinFile2Code.zip: 332'890 Bytes with SHA256 CRC check sum: 13409217b00529d9354d009c60834f12e5c6a27e2bce45d5bfb9add62107aaed
BinFile2Code.exe: 198'656 Bytes with SHA256 CRC check sum: ab0dea75864580fecd50014ef005793555459a06d60bb7a643cef7ed9d539cb5

Last update 18.09.2023 / Online since 07.10.2012

The picture to XML program is a converter which transforms picture files into XML spreadsheet format. So it is possible to load a picture as a real table in a spreadsheet program like Microsoft Excel or Apache OpenOffice Calc.
The converter is a console application and supports the picture formats JPG, PNG, BMP and TIF. The maximal size of a picture could be 1000 pixel width and 1000 pixel height. This size limit is necessary, because otherwise the size of the XML file is to big and it is for the spreadsheet programs not possible to load these file.
I developed this program in the context of my activities with abap2xlsx. To present the progress of the abap2xlsx implementation in our company I need some eye-catcher. So I searched around and one of the results was Excel Art. I am impressed about the idea to create pictures in a spreadsheet program. But I am no art-ist, so the idea for a converter was born. By the way, the colleagues are also impressed about Excel Art.
Pic2XML is a fun program, it has not really a business context - only to surprise and impress your colleagues.

Download of the Pic2XML converter (version 1.01 from 08.08.2022)
pic2xml.zip: 394'504 Bytes with SHA256 CRC check sum: 46cfc42f1adf310b9a5d94872e95321efc4cf649439953dd72fc1bb74eb8f977
pic2xml_x64.exe: 907'264 Bytes with SHA256 CRC check sum: 37221ef65be9dfb6f150875fcba7f28b77d2d70881dfe9b81014c989fc3992cd

Last update 09.08.2022 / Online since 09.09.2018