Hello web surfer,

welcome at my homepage.

The focus of this site is at individual software development with PowerShell™, ABAP and BASIC. Furthermore to tools for software development, SAP Add-Ons and SAP GUI for Windows extensions.
Welcome to all which are interested in my programs and topics.

Take the chance and write me an email.

Last change on August the 05th, 2018
This is a private website, all rights by Stefan Schnell.

Hint: This is a multi language site. It contains parts in English and German. Use Google Website Translator to choose the language you want.
Hinweis: Diese Seite ist mehrsprachig. Sie enthält Teile auf Englisch und Deutsch. Nutzen Sie den Google Webseiten-Übersetzer um die gewünschte Sprache zu wählen.
picture of a tree



separator picture of a path
Programs



SAP & ABAP


Scripting Tracker


Scripting Tracker is a utility and a replacement to the SAP GUI Scripting Development Tools. It contains an GUI analyser, comparator and recorder on SAP GUI Scripting base, with an API viewer.


Learn more

COM Connector (CCo)


CCo is a COM library and a wrapper around all functions in the SAP NetWeaver RFC library. So it is possible to use the RFC library inside any language which is COM enabled, e.g. like VBA, AutoIt or others.


Learn more

Background Light


Background Light is an ABAP to COM bridge and a replacement for the frontend service class. It allows to use COM libraries and lot of OS functions without SAP GUI for Windows, in background processes or ABAP in Eclipse.


Learn more

Output Catcher


Output catch is a small SAP server program to catch text output from an ABAP program.


Learn more
 
 
 

Cloud


 
 
 

Development


 


BASIC

 


JavaScript


 Java

JaCoB
Java COM Bridge


 Editors

 
 
Miscellaneous


Pic2XML

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 32-bit 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.

snapshot of excel with an image as table
pic2xml.zip: 673'093 Bytes with SHA256 CRC check sum: 77c6fdaa867faca62d1d564d2d394c75a4499abfd5283882c585e2da6e1ae11a
pic2xml_x64.exe: 854'016 Bytes with SHA256 CRC check sum: ce54c2e66c65459a941475489bfd69828ff5af39a19de3f5efa090dd8fd228ec
pic2xml_x86.exe: 714'752 Bytes with SHA256 CRC check sum: 5e619d359c398c6364b8a68105c7b9c60877fd98c23b57f759c479f7ccc3ea22



separator picture of a water and stones
About



Zu meiner Person

picture of stefan schnell
Gestatten, dass ich mich vorstelle, mein Name ist Stefan Schnell. Ich wurde 1964 in Bremervörde geboren und wuchs in Cuxhaven auf. Nach meiner Schul- und Berufsausbildung, sowie meines Zivildienstes, besuchte ich die Fachhochschule in Hannover. Als Maschinenbau-Ingenieur arbeitete ich acht Jahre bei der Conti Tech, einer Tochter der Continental AG, im Automotive-Bereich, erst in Hannover und dann in Eislingen. Ich wechselte zum LASER-Maschinenbauer baublys, einer Tochter der Excel Technology, in Ludwigsburg. Zwei Jahre später ging ich nach Bonn zur AOK Systems, dem IT-Dienstleister der gesetzlichen Krankenversicherungen (GKV), bei dem ich bis heute im SAP-Umfeld als Senior Software Ingenieur tätig bin.
Neben meinem ausgeprägtem Interesse an Software-Entwicklungen von Automations- und Autonomationslösungen, unter besonderer Berücksichtiung komplexer Integrationsszenarien, fange ich – sofern es die Zeit zulässt – leidenschaftlich gerne ungewöhnliche Perspektiven mit meinem Fotoapparat ein. Scheinbar Unscheinbares rücke ich in den Fokus. Weiterhin lese ich gerne Literatur technischer Entwicklungen der jüngeren Vergangenheit und futurologische Visionen.
picture of stefan schnell

Präsentation auf dem SAP Inside Track in Hannover

Auf dem SAP Inside Track in Hannover (sitHVR) bei der Inwerken AG präsentierte ich am 24. Februar 2018 unterschiedliche Integrationsszenarien der Script-Sprache PowerShell in SAP. Anhand von realisierten Anwendungsfällen zeigte ich Möglichkeiten die sich aus dieser Kombination ergeben.

image of sap inside track 2018


Berufung zum SAP Community Moderator

Am 28. Januar 2018 wurde ich von der SAP zum Community Moderator des Tags UI SAP GUI for Windows berufen. Das Moderatoren Team der SAP wurde duch meine Beiträge und Aktivitäten im Bereich des SAP GUI Scripting in der SAP Community auf mich aufmerksam. Die Berufung trifft fast auf den Tag genau meine 10-jährige Mitgliedschaft in der SAP Community.

image of sap community moderator


Würdigung meines Engagements im SCN - SAP Topic Leader

Zur Ehrung meines Engagements und meiner herausragenden Beiträge im Bereich Scripting Languages im SAP Community Network (SCN) erhielt ich, wie auch im Jahr 2015, am 10. Juni 2016 eine Anerkennungsurkunde von der SAP. Mit dem SCN Topic Leader-Wettbewerb werden die weltweit aktivsten Experten bestimmter Themengebiete des SCN besonders hervorgehoben.

image of sap topicleader certificate


Ehrung zur 25-jährigen Mitgliedschaft im VDI

Als Student im 1. Semester trat ich 1989 dem Verein Deutscher Ingenieure (VDI) bei. Am 21. März 2014 wurde mir durch Herrn Dietrich, dem Vorsitzenden des Mittelrheinischen Bezirksvereins des VDI, das silberne VDI-Abzeichen für 25 Jahre treue Mitgliedschaft in einem feierlichen Rahmen in der Hochschule Koblenz überreicht.

image of vdi honour


Ehrenämter und Mitgliedschaften



separator picture of a water and stones
Blog


ABAP    PowerShell    Python    PHP    AutoIt    Miscellaneous

My Knowledge Collection
Things which move my world

SAP Community


My profile in the SAP Community

20.12.2011 / 25.12.2016
The SAP Community is a platform for each content round about SAP. Here you can find the SAP Community and here you can find my my profile in the SAP Community.

SAP UI Automation

16.04.2012 / 22.07.2018

Web UI Automatisierung

10.06.2017 / 22.07.2018
Mehr und mehr werden Desktop-Anwendungen durch Web-Applikationen ersetzt. Für Automatisierungsansätze empfiehlt sich die Selenium Tools Suite. Zum Betrieb von Selenium wird der Standalone Server und der Client mit dem entsprechenden WebDriver Language Binding benötigt. Weiterhin wird ein WebDriver für den Browser benötigt. Dieser ist natürlich abhängig vom verwendeten Browser.
Hinweis: Es ist unbedingt darauf zu achten in welcher Version der WebDriver vorliegt - x86 (PE L) oder x64 (PE d). In Abhängigkeit dazu ist das entsprechende Runtime Environment der Programmiersprache zu wählen. Der WebDriver für Chrome liegt beispielsweise nur in der x86 Version vor, so muss hier z.B. für Java die i586 Version des JDK verwendet werden.
Nach dem Beschaffen der notwendigen Komponenten kann mit dem hier vorliegenden Java-Beispielprogramm ein einfacher Test durchgeführt werden.


Mobile Device Automatisierung

06.05.2018


START, die Zukunft des SAP GUI Scripting?

07.04.2017
Prakash Upadhyay von der SAP schrieb am 16.02.2017 in seinem Blog über das "Simple Test Automation for Regression Tests" (START) Framework. Hier eine zusammenfassende Übersetzung:
Bei START handelt es sich um ein UI Automation Framework zum Testen von Applikationen jeder SAP UI Technologie (FIORI, UI5, HTML GUI etc). START bietet einen generischen Ansatz zur Aufzeichnung von Benutzeraktivitäten und zur Erstellung von Testfällen, welche dann in unterschiedlichen Testphasen oder mit Testtypen zum Einsatz kommen können. Die Testfälle werden durch die Interaktion eines Benutzers mit der Applikation erzeugt. START unterstützt Applikationen welche im Rahmen FIORI, UI5, HTMLGUI etc. entwickelt wurden. START nutzt eCATT (extended Computer Aided Test Tool), Chrome WebDrivers, Selenium JAR files und andere DLLs zur Aufzeichnung von Benutzeraktivitäten in einem Browser auf der Windows-Plattform.
Mit START ist es nicht notwendig zu Programmieren, es ist ein absolutes Null coding test case Development Framework. Es nutzt das .NET Framework und den FIORI-Selenium WebDriver zum Aufzeichnen und Abspielen von Benutzeraktivitäten im Web UI. Die Testskripte, welche von der START-Engine erzeugt werden, werden auf dem Server gespeichert. Das reduziert die Ladezeiten für den Client und sorgt für eine Wiederverwendbarkeit der Tests. Die START Engine Utilities unterstützen dabei die Verwaltung, wobei auch eine Versionierung vorhanden ist. Entwickler können ihren Code in bestehende Tests einfügen. START hat eine Light-Client-Installation, die meisten Bibliotheken des Framework sind Server-seitig installiert. Als SAP internes Werkzeug besitzt START eine hohe Integration zum SAP-System und dem eCATT-Framework. START ist integriert in die SAP Test-Workbench, damit können die Testfälle später mit einem Debugger verarbeitet werden. START kann auf jedem Windows 64-bit System installiert werden.
Das START-Framework identifiziert die FIORI UI-Controls und speichert sie im Selenium-Script, welches von der START-Engine ausgeführt werden kann.
Software-Voraussetzungen: .NET Framework 4.0, JDK(64-Bit) und Uninstall 32-Bit Version, IE 10, Chrome-36 oder Firefox 30 und höher.

Es wird deutlich sichtbar, dass die UI-Entwicklung im SAP-Umfeld mehr und mehr den SAP GUI für Windows hinter sich läßt. Leider geht aus der Beschreibung nicht eindeutig hervor, ob es sich hier ausschließlich um ein Testwerkzeug für Web UIs oder für alle handelt, d.h. inklusive dem SAP GUI für Windows. Machen wir uns auf eine Web UI basierte Zukunft gefasst.

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

16.04.2012
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.

Access to SAP via ActiveX control

17.08.2012 / 17.11.2013
With the installation of SAP GUI for Windows on the presentation server you get also some ActiveX controls to connect and to communicate with an SAP system. You can use these ActiveX controls easily inside Visual Basic Script and therefore inside of an HTML application - but only with Microsoft Internet Explorer. It is possible to build a HTML GUI and use it with data from an SAP system. Inside the HTML there is a VBScript functionality necessary, which gets the data from the SAP system and uses the Document Object Model (DOM).
With this source code you can view any SAP table content as HTML table. It shows an easy GUI, with only one the connection parameters, an input field for a SAP table name and a button to view the table content in the HTML table.
Important hint:Do not use ActiveX controls furthermore, they are deprecated.

Check the Existence of an SAP GUI Scripting Object Without Exception

18.11.2013
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.


Android

06.05.2018

ABAP code snippets

26.09.2009 / 09.04.2017

Import CSV file into table

09.04.2017
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.

input mask of the zimportcsv report

Reset Passwords of SAP Standard Users in Different Clients

10.01.2016
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.

Examples of ActiveX Library Integration in ABAP

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
    04.12.2011 / 22.07.2016
    In actual 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

  • How to use Visual Basic Script
    24.10.2011
    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
    24.01.2011
    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
    03.10.2010
    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
    10.08.2009
    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..

Use DLL calls in ABAP

26.09.2009
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
    25.01.2011
    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
    26.06.2009
    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 following example:

    Constants:
      IDYes Type i Value 6,
      IDNo Type i Value 7.
    
    Data:
      Win32 Type OLE2_OBJECT,
      ret Type i.
    
    Create Object Win32 'DynamicWrapperX'.
    
    Call Method Of Win32 'Register'
      Exporting
        #1 = 'user32.dll'
        #2 = 'MessageBoxW'
        #3 = 'i=hwwu'
        #4 = 'r=l'.
    
    Call Method Of Win32 'MessageBoxW' = ret
      Exporting
        #1 = 0
        #2 = 'Hello World'
        #3 = 'Test'
        #4 = 4.
    
    If ret = IDYes.
      Write 'Ja'.
    ElseIf ret = IDNo.
      Write 'Nein'.
    Else.
      Write '?'.
    EndIf.
    
    Free Object Win32.
    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 here.

RFC Read Table in JSON Format

21.01.2017
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.


My collection of posts

21.01.2017



Hints for miniSAP


Datenbankablage für ArchiveLink einrichten

03.06.2013
Hier der Beitrag Nutzung von ArchiveLink mit miniSAP, die Installation des Adobe Reader wird vorausgesetzt. Und hier der Quellcode zur Nutzung von ArchiveLink mit miniSAP.


PowerShell

05.06.2016 / 22.07.2018

How to use VB.NET via PowerShell inside Java

21.06.2016
Here an example how to use VB.NET inside Java, equivalent to the ABAP example. The VB code is in an external file in a project directory from Eclipse.
Look at the source here.

PowerShell with Java
Java code in Eclipse

PowerShell with Java
VB.NET code in Eclipse

How To Use PowerShell Inside Java

13.06.2016
I use JaCoB (Java COM Bridge) with SAPIEN Technologies ActiveX PowerShell library. On this way it is possible to use PowerShell; seamless and easily inside Java. With regard to the Eclipse IDE this may be an interesting aspect - but I must admit a little bit exotic.
Look at the source here.

PowerShell with Java

How to use SQLite ODBC with PowerShell

05.06.2016
Here is an approach how to use SQLite databases with PowerShell script language via an ODBC driver. On this way we have the possibility to export tables from an SAP system into a SQLite container, to use it from the backend via ABAP and also to use it from the frontend via PowerShell. It should be also considered that SQLite is available for Android, Linux, Mac OS X and different Windows platforms e.g. like Windows Phone. So we can exchange static data or data without permanent changes easily.
Look at the source here.

My collection of posts

25.12.2016 / 22.07.2018
Here a collection of interesting links from different perspectives for using Microsoft PowerShell with SAP:

Links to PowerShell

21.10.2016 / 27.06.2018

Python

23.09.2017 / 06.05.2018

SAP Developer News

31.01.2018
The January issue of the SAP developer newsletter "debug and deploy" contains a reference to my blog post How To Use Python Seamlessly Inside ABAP in the SAP Community.

sap newsletter debug and deploy from january 2018

My collection of posts

23.09.2017 / 06.05.2018
Here a collection of interesting links from different perspectives for using Python:

Links to Python

23.09.2017 / 02.03.2018

PHP

25.12.2016 / 01.01.2017

How To Use PowerShell Inside PHP

26.12.2016
With SAPIEN Technologies ActiveX PowerShell library and PHP Windows extension for COM is it possible to use PowerShell seamless and easily inside PHP. Here the source to use PowerShell inside PHP.

PowerShell with PHP
Google Chrome version 55 executes PowerShell code with VB.NET

PowerShell with PHP
Microsoft Internet Explorer version 11 executes PowerShell code Get-Host and Get-Process

Windows based extensions - COM and .Net

25.12.2016
The .Net extension for PHP accesses through to COM and from there to .Net. This means that all the .Net binaries need to be COM visible or it is not possible to use them with PHP, e.g. like sapnco.dll.

My collection of posts

26.12.2016
Here a collection of interesting links from different perspectives for using PHP with SAP:

Links to PHP

25.12.2016 / 01.01.2017

AutoIt

24.12.2008 / 04.07.2009

AutoIt is a scripting language for automating the Windows GUI. Here is a collection of tips for AutoIt. Recently this was a copy of my blog in the AutoIt forum, but the operator of the forum decided to remove all blogs, because it was not well utilised. Now I will continue here my tips and add some more.

How to control a client from SAP ABAP

04.07.2009
It is very easy to control a client system from SAP ABAP. 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 call 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 = 'Hallo von ABAP'.

Free Object AutoIt.
You see how easy it is.

Is there a favorite way to access to the SAP GUI?

24.04.2009
There are several ways to interact with the SAP GUI. One way I introduce in this blog, the direct interaction with the GUI from AutoIt. Another way is the SAP GUI Scripting, a library with COM interfaces which enables access to the SAP GUI. We all know that AutoIt support function calls via COM. You find a little introduction about SAP GUI Scripting here and here. Beneath the section literature you find the documentation for Microsoft Windows and general information about the technical infrastructure.
But now to the actual question: Is there a favorite way to access to the SAP GUI? I want to show few advantages and disadvantages for this or that.
With the SAP GUI Scripting it is necessary on the host system to activate explicit the scripting. You can do it with the transaction code (TAC) RZ11 and the parameter User Scripting, which must be set on true - in capital letters. The default of this parameter is false. If you do not have the rights to set this parameter, you can not use SAP GUI Scripting. Another requirement is the version of the SAP GUI, it must be equal or higher than 6.20. After these hurdles are taken, you can use SAP GUI Scripting, his tools and the COM interface. With the direct access via AutoIt to the GUI are these conditions all the same.
The access to the SAP GUI and the controls via AutoIt is not very easy, long and permanently changing window names and no names or ID of a lot of controls. If you use Au3Info you get a lot of information, but not all you need to ensure the correct function of your module. So it is the best to work only or mostly with keystrokes. If you work with SAP GUI Scripting it is easier but not trivial to use the windows and controls you want. SAP GUI Scripting uses an own object model. You can access to a control via a path of GuiApplication/GuiConnection/GuiSession/GuiMainWindow etc. In the coding it looks like these: /app/con[0]/ses[0]/wnd[0]/usr/ctxtDATABROWSE-TABLENAME. You can exactly do what you want.
You see, we finally can not decide which way is better. The direct access via AutoIt is easier to handle but more difficult, the access via SAP GUI Scripting needs special requirements but the GUI control is very fine.
You see, each way has its advantages and its disadvantages, a recommendation for one direction cannot be recognized clearly - perhaps a mixture from both. Let us looking forward to our experience.

How to create a Microsoft Access database without Access

05.04.2009
Here is a way to create a Microsoft Access database without an installed Access on the system. It is very easy to create a database. It is necessary to open (System-)Control > Administration > Datasources (ODBC). With the ODBC administration it is possible to create the database. You can create a database and set the User-DSN (Data Source Name) in the ODBC administration - with one single mouse click.
Look at the source here.

Add your own buttons in SAP GUI with your own functions

12.03.2009
Here is a program which adds a button in the toolbar of the SAP GUI. It is designed for the sub functions of the transaction SE80, especially ABAP-Editor resp. SE38. If the event of the button click fires, the function save (Ctrl+S), check (Ctrl+F2), activate (Ctrl+F3) and process (F8). I think, you can use this technic for any program.
Look at the source here.

Switch font in SAP GUI

31.01.2009
With the following code you activate the I18N multi-byte functionality in SAP. After you activate it, it is possible to switch to another individual font on the SAP GUI.
Look at the source here.

Switch new or classic editor design in SAP SE80

31.01.2009
With the following code you switch between new or classic design of the ABAP editor.
Look at the source here.

SAP GUI change always window name

28.12.2008
At the analysis of the SAP GUI activities, I see that the window name always changes, if you choose another transaction. My solution is to work with AutoIt and the SAP GUI: Use only the class name of the window. With this way the title of the window never minds. Dim $WinTitle = "[CLASS:SAP_FRONTEND_SESSION]" But be careful, if you open more then one session, you can not divide between the windows. This way is useful if you have only one session.

Start SAP LogonPad and GUI, Login and start Object Navigator

19.02.2009
This is the next step in the chain to start and control SAP¸. Now we must start the SAP LogonPad and choose the system we want to connect. After the start of the SAP GUI we must type the user name and password. I repeat this activities some times a day, so it is a good candidate for a script to automate it.
Look at the source here.
It is not very difficult to understand how the script works, I described it above. The script starts the transaction SE80, it means the object navigator, e.g. to code programs in ABAP language. After all the script kills the LogonPad.
Good Login.
Extension: I optimize the script on the 02/19/09 and integrate an information from Ahmad - Thanks a lot to Ahmad for his hint and his solution.

Start SAP ABAP server

24.12.2008
It is not a problem to control SAP with AutoIt. With this entry I present the first step to automate SAP activities with AutoIt. Here is a code snippet to start a local ABAP Server of SAP NetWeaver 7.0. This step is very often only for administrators, not for normal users. But if you install a local SAP system, it is necessary for you.
Look at the source here.
I am a lazy man, and believe me, it is a little bit dodgy, if you experiment with ABAP, to start the application server. Open the SAP Management Console, start the server, type your password, always the same. Yeah, I know, under normal circumstances you do it once a day or so, or until the next start of the computer. Now, this script work for my idleness, only start it with a stupid twin click and the ABAP server start.
Good launch.


Helpful Hints for Microsoft Windows

01.08.2008 / 06.08.2017

How to find drivers and updates for Windows

Microsoft offers a very good database to find hardware drivers. You find the catalog here.
Also you can find the Windows 10 Update history here.

How to update Windows Defender without online connection

It very easy to update Windows Defender, the actual security program in Windows, without an online connection. Use the link to microsoft.com and download the correct file. Execute the file, e.g. mpam-feX64.exe, from the Explorer with administration rights. Now the Defender is up to date.


OLE experience

20.08.2010
OLEView is an OLE/COM viewer from Microsoft and a part of the Windows SDK. It is possible with a simple mouse click to view the type library of the COM library with this tool in IDL (Interface Definition Language). But something is to notice: You must use a version number for the COM library 1.0 and higher. If you use a version number 0.x, it is not possible to view the interface - you get an error. The COM library work with a version number 0.x perfect, but OLEView can not read the interface and store the IDL file. The COM viewer, also from Microsoft, shows the interface without any problems.

Erkenntnisse zu Microsoft Word Dokumentenvorlagen

04.07.2009
Die Dateien des normalen Word Dokumentenformates werden im Normalfall mit der Extension doc gekennzeichnet. Word kennt noch weitere Formate, u.a. die Dokumentenvorlagen, die mit der Extension dot versehen sind. So klar wie es auch sein mag, so unklar ist es oftmals: dot-Dateien sind keine doc-Dateien.
Einige Vorgehensweisen sind grundsätzlich anders und sollten bedacht werden, hier sind einige:
  • Sollen die Dokumentenvorlagen angepasst werden, so dürfen diese niemals mit einem Doppelklick geöffnet werden. z.B. vom Desktop oder über den Windows Explorer. Mit dieser Art des Öffnens werden im Word Mechanismen gestartet und eine andere Behandlung der Datei durchgeführt, z.B. beim Speichern. Dot-Dateien die angepasst werden sollen sind immer über eine geöffnete Word-Instanz und dem Menüpunkt Datei > Öffnen zu öffnen.
  • Die üblichen Startmechanismen werden durch das Ereignis AutoNew ersetzt, beim Öffnen mit einem Doppelklick, wie eben beschrieben. D.h. z.B. DocumentOpen usw. funktioniert nur noch beim Öffnen durch den Menüpunkt Datei > Öffnen. Programme die beim Öffnen von Dokumentenvorlagen ausgeführt werden sollen, sind dem Ereignis AutoNew zuzuordnen.

Collection of my tips in the tekom forum


HelpViewer als eigenständige Applikation installieren

25.07.2010
Der HelpViewer kann als eigenständiges Programm installiert werden. Einfach aus dem MSDN das aktuelle Windows 7 SDK laden und beim Installieren alle Komponenten deaktivieren, bis auf den HelpViewer. Damit hat man auch ohne Visual Studio eine funktionsfähige Version. Zur Nutzung des HelpViewer muss allerdings das dotNet-Framework installiert sein, ohne funktioniert er nicht.

CHM-Dateien in HTML-Dateien zurückführen

02.01.2010
Das Packprogramm 7-Zip kann CHM-Dateien wieder in ihre ursprüngliche HTML-Dateien zerlegen. Ein Feature das ich bei diesem Programm nicht vermutet habe.

CHM-Dateien aus SAP mit ABAP ansprechen

26.09.2009
Oftmals werden in SAP die Dokumentationen von Objekten und Anleitungen direkt mit den "Bordmitteln" durchgeführt, z.B. dem IMG-Baum. Dass ist mehr oder weniger komfortabel und bietet auch "nur" die enthaltenen Möglichkeiten. Es gibt aber durchaus auch andere Wege dies zu gestalten. U.a. ist es möglich CHM-Dateien aus dem ABAP, der SAP eigenen Programmiersprache, direkt anzusprechen. Die dafür notwendige Klasse, inkl. Beispiel, ist hier zu finden.

AutoIt Script Language

21.08.2009
Online-Hilfen unter Microsoft Windows bestehen meistens aus kompilierten HTML-Dateien, die als CHM-Dateien bekannt sind. Skripttechnologien bieten Möglichkeiten diese um aktive Inhalte zu erweitern. AutoIt ist eine Skriptsprache, die ursprünglich für das automatisierte Testen von Benutzeroberflächen unter Windows entwickelt wurde. Sie verwendet eine Kombination von simulierten Tastatureingaben, Bewegungen der Maus sowie Fenster- und Steuerelementmanipulationen. Damit können Programme gesteuert und Abläufe dem Anwender vorgeführt werden; dies ist mit anderen Skriptsprachen so nicht möglich. AutoIt bietet sinnvolle Möglichkeiten Online-Hilfen funktional zu erweitern. Ein Einsatz dieser Sprache kann auf jeden Fall empfohlen werden, da sie zu einer Anreicherung und vielfältigeren Gestaltung von Online-Hilfen (CHM-Dateien) beiträgt. Den Endanwendern der Hilfen wird damit eine weitere (aktive) Unterstützungsebene angeboten, die im bisherigen Rahmen so nicht möglich ist. Zu finden ist AutoIt hier.

PDF-Sammlung auf CD: Inhaltsverzeichnis erstellen

13.04.2009
Hier ist ein VBA-Word-Programm zu finden, mit dem Inhaltsverzeichnisse von PDF-Dateien erstellt werden können. Mit Aufruf der Routine GetAllPDFFilesTitles wird das Startverzeichnis übergeben. Alle Unterverzeichnisse werden gelesen und die Titel der enthaltenen PDF-Dateien ermittelt, in das Word-Dokument geschrieben und dabei mit den PDF-Dokumenten verlinkt - damit entsteht das gewünschte Inhaltsverzeichnis. Voraussetzung ist die Installation eines Acrobats (nicht Reader, der reicht nicht) und eines Word. Die Routine kann leicht in eigene Dokumente übernommen werden.
Weiterhin hier eine VBA-Routine mit der Texte in PDF-Dokumenten gefunden werden können.

HLP-Dateien zu CHM-Dateien umleiten

22.02.2009
Wird eine HLP-Datei in eine zeitgemäße CHM-Datei konvertiert (siehe How to Save Information from HLP file in the Post XP World), so funktionieren natürlich die Aufrufe aus den zugehörigen Applikationen nicht mehr. Um dieses Manko etwas zu mildern, kann der Aufruf einer HLP-Datei wie folgt umgeleitet werden:
Es ist eine leere RTF-Datei zu erstellen und dort eine Fussnote mit dem !-Zeichen einzufügen. Die Fussnote ist dann mit dem Makro ExecFile("MyHelp.chm");CloseWindow() auszustatten und mit dem HelpWorkshop zu kompilieren. Wird jetzt z.B. mit F1 in der Applikation die Hilfe aufgerufen, so wird die CHM-Datei aus der HLP-Datei gestartet und selbige sofort beendet. Sicherlich funktionieren nicht alle Aufrufe 100%ig vollständig, aber immerhin wird kein Fehler erzeugt.

CHM-Dateien erforschen

10.12.2008
Mit dem HTML Help File Explorer von Paul A. O’Rear kann man den Inhalt von CHM-Dateien übersichtlich analysieren. In einer Baumstruktur werden alle integrierten Dateien angezeigt. Mit Display kann man die gerenderte Datei ansehen und mit TextView den Quellcode. Zu finden ist dieses Werkzeug hier.

CHM-Dateien auch unter Linux anzeigen

28.11.2008
CHM-Dateien können auch unter Linux angezeigt werden. Dafür benutze ich den KChmViewer. Er verwendet die Qt-Bibliotheken von Trolltech und ist für den Einsatz unter KDE optimiert, aber KDE ist keine Bedingung. Es ist ein zuverlässiges Programm welches die Inhalte von CHM-Dateien sehr gut wiedergibt und in seiner Funktionalität dem Original in nichts nach steht.
Das Programm ist auch für Windows verfügbar, benötigt dann allerdings zwei Runtime-Bibliotheken von Qt, die dem Paket beiliegen, sowie eine weitere Bibliothek von MinGW, die aber leicht aus dem Internet beschafft werden kann. Vom Look & Feel sieht es aus und verhält sich wie das Linux-Programm.
Die Windows-Version versteht es leider nicht mit aktiven Inhalten umzugehen, hier JavaScript. Nach Rücksprache mit dem Programmierer des KChmViewer George Yunaev wird dies auch sobald nicht der Fall sein. So gesehen ist der Viewer keine echte Alternative zum Original, sofern der Anspruch aktiver Inhalte besteht.

How to Save Information from HLP file in the Post XP World

01.10.2008
Microsoft stops the support for the HLP help files with Vista. HLP is a (very) old format, it exists since Windows 3. It bases on the Rich Text Format (RTF). The official format since Windows 98 is the CHM format, which bases on Hyper Text Markup Language (HTML). At the moment the actual format is HxS, which bases on eXtended Markup Language (XML).
We have a lot of information store in HLP files. What can we do to save the information from the HLP files in the post XP world? It is very easy to do that.
At first you must get all your source files from the HLP files, e.g. RTF, BMP, SHG etc. But the first problem is: where are the files? Often we have only the HLP file, but not all sources. No problem, if you have the HLP file, you have all what you need. Now you need a decompiler, which extracts all files from the HLP file. You can load a very good decompiler here, call HELPDECO. It is a command line tool: open a console window, type HELPDECO MYHELP.HLP and a few seconds later you have all your source files.
The next step is to load and install the HTML Help SDK from Microsoft. Create a new project to convert an existing HLP file. Choose your project and a few seconds later the HLP project is converted to a CHM project. Now compile the project and you get your HLP content in CHM format. My experience is, after a conversion, that you loose a lot of format information but all links work well.
Thanks to Microsoft for all the information and the HTML Help SDK.
Thanks to Manfred Winterhoff for the HelpDeco tool.
You can find further and detailed information here.

UPX and/or Molebox compression and protection fires virus scanner phobia

01.05.2008
It is a normal day, the sun is shining, I feel good and put my memory stick in a strange computer. Suddenly, the virus scanner gives alarm. He detects, that one of my programs is infected with a trojan. Mhmm, I programmed and compiled it and the virus scanner of my system means, it is all okay. Now I look a little bit nearer and analyze this situation:
  • 1. Step: I send my program to www.virustotal.com and it gives me a report back. Several virus scanners found different viruses and trojans and mean my program is suspicious.
  • 2. Step: I wrote a very easy program and compiled it and sent it to www.virustotal.com again. I was surprised about the result. One virus scanner gave alarm (see the results).
  • 3. Step: Then I compressed the program with UPX and sent it to www.virustotal.com again. Now I was more surprised, three virus scanners found different viruses, and the virus scanner from the second step not (see the results).
  • 4. Step: Then I protected the programs with Molebox and sent it to www.virustool.com and checked it again. It came what I expected: more different viruses and trojans (see the results).
Okay, what is the result of this test:
Virus scanners are necessary, nothing more to say, but if the phobia of the scanner makes users feel insecure, it goes to far. To use security mechanism in our programs is also necessary and allowed. But the scan technic of the virus scanner uses the same mechanism as a virus or trojan and our programs protect against "scan attack". So the virus scanner thinks, oh, it defends my "scan attack", it is suspicious and brands the program. The user thinks, oho, it is a virus or trojan in the program and deletes it, great.
What can we do?
  • Check each program with www.virustotal.com and inform the user about the results.
  • Create for each program a checksum e.g. MD5 and publish it with the link and with the file.
Thanks to the UPX team for the great program.
Thanks to the Molebox team for the great tool.
Thanks to Virustotal for the great scan service.
Look at: Virus scanning test results, Adobe Reader expected.


Last update 22.07.2018 / Online since 01.05.2008


separator picture of houses
Projects



Background Light

Server Application for SAP,
to use COM and OS functions without SAP GUI for Windows
and with ABAP background processes.

Background Light is an ABAP to COM bridge and a replacement for the CL_GUI_FRONTEND_SERVICES class. It allows to use COM libraries and a lot of OS functions without SAP GUI for Windows and therewith in ABAP background processes or with ABAP in Eclipse.
If you execute an ABAP program with the SAP GUI for Windows you can use COM calls and OS functions very easily. But, if you execute the same program e.g. as background process, COM and OS function calls does not work. It is not possible to use it without SAP GUI for Windows, because there is no communication between application and presentation server in this case.
But Background Light, as an SAP server program, offers these possibilities. It is a bridge from your ABAP program to any COM library and a lot of OS functions. After the registering of Background Light in the SAP system of your choice and the start of the server program on your presentation server you can use COM and OS function calls in fore- and background processes with the same code and on each platform.
All accesses to the presentation server are visible. You can see any access full qualified and in detail. If you want you can set Background Light in a single step mode. In this case you can decide whether access you allow. There is no security risk to run Background Light.

background light
Download of BLight.zip (Version 1.24 from 30.07.2018)
blight.zip with the size of 2'257'293 bytes and the SHA256 CRC check sum fcb2e989ce5a2cd883f85fea338fba49f3ca7f75e48a43bdc8cb886a6b994b0e
BLight.exe (x64) with the size of 393'216 bytes and the SHA256 CRC check sum 46c0516289c122ed8b764ec45565f8f02d7a211065a31c2ee48649e48125009d
BLight.exe (x86) with the size of 297'472 bytes and the SHA256 CRC check sum 02f10e434e55fc5b3ffb3e5217c668b251cb75d0997be4077ace559d514a5643

The zip file contains:
x86  —  Directory with 32-bit version
   BLight.exe  —  32-bit native Windows application
   Scintilla.dll  —  Additional 32-bit library for Background Light
   BLight.cmd  —  Batch file to start Background Light
x64  —  Directory with 64-bit version
   BLight.exe  —  64-bit native Windows application
   Scintilla.dll  —  Additional 64-bit library for Background Light
   BLight.cmd  —  Batch file to start Background Light
BLight.tpd  —  Documentation of Background Light
TreepadViewer.exe  —  Documentation viewer of Background Light


Use Case
To code in ABAP language I use in a normal case the ABAP Development Tools (ADT) with ABAP in Eclipse (AiE). Also I use ABAP Unit to test the methods of the classes. This environment offers no possibility to use COM or OS functions. Here I use Background Light e.g. to input data or to export tables as CSV files.

background light

Scope of Functions
Background Light offers a lot of function for COM, file, directory or clipboard operations and also a set of miscellaneous functions, e.g. like RequestInput or MsgBox.

background light

Last update 30.07.2018 / Online since 16.05.2015



Output catch for ABAP


Output catch is a small SAP server program to catch text output from an ABAP program. Start the program, fill the connection parameters, register the functions and use one of the output or log variants in your ABAP program to catch your specific text, e.g. to monitor parameters of an interface. You can send text or messages direct to the editor of output catch, to a specific log file on the client, to a Windows debugger or to the Windows event protocol of the client.

abap output catch
With the following download you get an executable file to catch output text from an ABAP development object and view it.

Download of ABAPOutputCatch (Version 1.04 from 03.03.2018)
ABAPOutputCatch.zip with the size of 2'374'711 bytes and the MD5 CRC check sum 3220a383b62e0a4103044fb99cb52c00
ABAPOutputCatch.exe (x64) with the size of 423'936 bytes and the MD5 CRC check sum 1429b40882a2b59be89e0ec7a79969b0
ABAPOutputCatch.exe (x86) with the size of 302'080 bytes and the MD5 CRC check sum fd9b1996dc3e5c73590643e4b194c4f5

The zip file contains:
Directory x64
ABAPOutputCatch.exe  — 64-bit native Windows application
Scintilla.dll  — 64-bit native Windows editor library x64.
      Copy it in the same directory as the executable you use.
Directory x86
ABAPOutputCatch.exe  — 32-bit native Windows application
Scintilla.dll  — 32-bit native Windows editor library x86.
      Copy it in the same directory as the executable you use.
Main directory
ABAPOutputCatch.tpd  — Help file for ABAPOutputCatch
TreepadViewer.exe  — Help viewer
ABAPOutputCatch.help.cmd  — Additional batch file to start the help

abap output catch
abap output catch
abap output catch
abap output catch
abap output catch
abap output catch

Last update 03.03.2018 / Online since 29.12.2013



Binary File to ABAP


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.
BinFile2ABAP is an ABAP, JSON and PowerShell code generator which offers this possibility. With BinFile2ABAP you can store each file in an ABAP function module, report, form, as JSON or PowerShell file. This means, it converts the file to an ABAP source code, to a JSON base64 encoded file or to a PowerShell file.
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 BinFile2ABAP supports the SAP MIME-Repository.
BinFile2ABAP can also create base64 encoded JSON and PowerShell files from any file too. You can use this JSON file in the context of your SAPUI5 development, e.g. to simulate backend databinding, via OData and the SAP Gateway, as local databinding.
With this kind of information you can extend your possibilities. You can integrate each type of file you want in your ABAP, SAPUI5 or PowerShell code, e.g. Portable Document Format (PDF), Compiled HTML Help (CHM), all image, sound and video formats etc.

binary file to abap
Download of BinFile2ABAP (version 2.07 from 02.04.2018)
BinFile2ABAP.zip: 580'449 Bytes with MD5 CRC check sum: b34d9188c6c421f38b30ff2c87ed91b4
BinFile2ABAP.exe (x64): 157'696 Bytes with MD5 CRC check sum: 5005c6dca34be3ddaa401ff0cde7818e
BinFile2ABAP.exe (x86): 114'688 Bytes with MD5 CRC check sum: 171733a36ffb76448335ba72692956cb

The zip file contains:
In x64 directory:
BinFile2ABAP.exe  — 64-bit executable for Windows®
Scintilla.dll  — 64-bit Scintilla library
In x86 directory:
BinFile2ABAP.exe  — 32-bit executable for Windows®
Scintilla.dll  — 32-bit Scintilla library

binary file to abap
binary file to abap

Last update 02.04.2018 / Online since 07.10.2012



ScriptX


Library to control scripting languages via COM interface,
include Freestyle BASIC Script Language (FBSL)

ScriptX is a COM library to control scripting languages. It offers a set of different functions which supports the pre and post activities to use any scripting language, and also the communication to the running script. ScriptX contains Freestyle BASIC Script Language (FBSL). FBSL is a powerful scripting language and extends the possibilities of ScriptX to a maximum.
FBSL is a multi-syntax all-in-one HLL development environment. Its interpretative layer is a vastly extended superset of traditional BASIC that targets seamless integration of FBSL applications with Windows API and third-party dynamic link libraries. Its integrated Dynamic Assembler and Dynamic C JIT compiler layers enable the user to interleave BASIC code with verbatim Intel-style assembly and ANSI C, respectively.

gl 3d teapot example inside abap
With ScriptX you have the possibility to use FBSL easily inside any language which is COM-enabled, also ABAP, the SAP programming language. The integration of FBSL insisde ABAP offers inter alia the possibilities to use on the presentation server
  • API/DLL functions,
  • a console window for input and/or output,
  • a GUI window,
  • memory functions,
  • memory map files for interprocess communication (IPC),
  • integrated Intel-style assembler JIT compiler layer,
  • integrated ANSI C JIT compiler layer,
  • etc. etc. etc.

gl 3d rose example inside abap
ScriptX builds a bridge to integrate your presentation server environment on Windows platform in the SAP application server environment. You can communicate between these two worlds on the application server side with ABAP and on the presentation server side with Freestyle BASIC Script Language (FBSL). FBSL offers phantastic possibilities to be the base on the presentation server side.

lord of the julia rings example inside abap

Requirements: Register ScriptX.dll on your presentation server via the command rundll32 ScriptX.dll,RegisterServer LibraryPath. It is not necessary to be in admin mode.

Download of ScriptX.zip (Version 1.6 from 21.11.2015 for FBSL 3.5 RC 2)
scriptx.zip with the size of 1'981'700 bytes and the MD5 CRC check sum f61e3a49551937591548f8e78ec444a4
ScriptX.dll with the size of 870'912 bytes and the MD5 CRC check sum 81496e16223e3af3b97d409cb8b059f2

The zip file contains:
ScriptX.dll  —  32-bit native Windows COM library
ScriptX.chm  —  Interface documentation of ScriptX
ABAP directory  —  Sample ABAP function modules and reports

lord of the julia rings example inside abap

Last update 12.03.2016 / Online since 27.08.2013


separator picture of a water and stones
separator picture of a water and stones