SlideShare a Scribd company logo
3
Most read
8
Most read
10
Most read
2015
Custom ActiveX Control
in SAP GUI
A STEP BY STEP GUIDE
DR. KEREM KOSEOGLU
http://kerem.koseoglu.info
2
Tableof Contents
ActiveX Development in .NET...................................................................................................3
ActiveX Registration..................................................................................................................7
ActiveX Wrapper in SAP............................................................................................................8
Application in SAP...................................................................................................................11
http://kerem.koseoglu.info
3
ActiveX Development in .NET
Create new class library project.
Open AssemblyInfo.cs and make sure that the assembly is ComVisible.
Right click the project, select “Properties”. On the Build tab, ensure that “Register for COM
interop” is selected.
http://kerem.koseoglu.info
4
Right click the project, select Add  User Control and give it a meaningful name.
http://kerem.koseoglu.info
5
Prepare the GUI of your ActiveX control. Here is a simple GUI containing a textbox:
Within the class file, ensure that you include the InteropServices library.
http://kerem.koseoglu.info
6
Define an interface containing your variables and methods. Strings can be shared with SAP
directly, you need to experiment for other variable types.
Implement the interface into your ActiveX class, making sure that you make it COM visible
with a unique GUID.
At this point, you should be able to contain the ActiveX control in a regular C# Forms
project.
http://kerem.koseoglu.info
7
Build the project in “Release” mode.
ActiveX Registration
Once you build the project, you will have a .DLL file.
Copy this file to C:WindowsSystem32 . The path may vary from computer to computer,
but basically it needs to be under the systemfolder.
Now, open the command prompt as an administrator (meaning: Right-click and select “Run
As Administrator”). In this window, you should CD to your .NET framework folder. The name
& location of the folder may vary, but you will get the idea from the screenshot below:
Here, you need to register your DLL file using the REGASM utility.
http://kerem.koseoglu.info
8
Chances are, your SAPGUI might be an 32-bit application. In that case, you need to put the
DLL file into C:WindowsSysWOW64 and run the REGASM in
C:WindowsMicrosoft.NETFrameworkv4.0.30319 .
Just to be on the safe side, I recommend taking both steps and register the control for both
32-bit and 64-bit platforms.
Summarizing all the steps described above:
1. Put SampleSapActiveX.dll1 into c:windowssystem32
2. Run command prompt in administrator mode
3. Go to C:WindowsMicrosoft.NETFramework64v4.0.30319
4. Type “regasmc:windowssystem32SampleSapActiveX.dll /codebase”
5. Put SampleSapActiveX.dll into C:WindowsSysWOW64
6. Run command prompt in administrator mode
7. Go to C:WindowsMicrosoft.NETFrameworkv4.0.30319
8. Type “regasm C:WindowsSysWOW64SampleSapActiveX.dll /codebase”
Please note that the registration step needs to be executed for each and every computer
which needs to access & use the ActiveX control.
ActiveX Wrapper in SAP
Enter SE24 and create a new class.
1 Replace with your own DLL name
http://kerem.koseoglu.info
9
Ensure that the class is inherited from CL_GUI_CONTROL.
In this class, you need to write a wrapper ABAP method for each .NET method & property in
your ActiveX control.
Here are the source code of those methods, which will give you an idea about accessing
properties & methods.
http://kerem.koseoglu.info
10
You also need a constructor, which will basically contain the name of your control (which
was given in .NET). As the method signature, you can take over whatever was provided by
the superclass.
http://kerem.koseoglu.info
11
Application in SAP
In this final step, we will create a regular GUI application in SAP. The screen will have a
custom container for the ActiveX control. Here is how my sample screen looks like:
http://kerem.koseoglu.info
12
Here is the minimum code required to run the ActiveX control:
http://kerem.koseoglu.info
13
And voila; here is the result:
http://kerem.koseoglu.info
14
For some interaction, you can add a user command routine:
Now, the buttons work too:
http://kerem.koseoglu.info
15
http://kerem.koseoglu.info
16
http://kerem.koseoglu.info
17

More Related Content

PDF
SAP WorkFlow Kılavuzu
DOCX
Fiori eğitimi - kod
PDF
425226452-Fatih-Ceylan-MM-Dokuman.pdf
PPTX
ABAP 7.x New Features and Commands
DOC
Temel ABAP eğitim kılavuzu
PDF
ABAP_RESTful_Programming_Model_EN[1].pdf
DOCX
SAP BRF+ Kılavuzu
PPTX
Diabetes Mellitus
SAP WorkFlow Kılavuzu
Fiori eğitimi - kod
425226452-Fatih-Ceylan-MM-Dokuman.pdf
ABAP 7.x New Features and Commands
Temel ABAP eğitim kılavuzu
ABAP_RESTful_Programming_Model_EN[1].pdf
SAP BRF+ Kılavuzu
Diabetes Mellitus

What's hot (20)

PDF
Billing plan sap help
PDF
SAP SD Copy Controls
PPTX
Ale idoc training kit sap Anilkumar chowdary
PDF
Text determination
PDF
Sd overviewdoc config
PDF
Output determination
PPT
Availability Check & Transfer Of Requirements Sales
PDF
Business partner-2
 
PDF
96836801 sap-sd-interview-questions
PDF
Sap sd interview_questions_answers_and_explanations_espana_norestriction
PDF
Credit Management in SAP SD
PPTX
Promotions and Deals in SAP Sales
DOCX
Sap sd important interview concepts
PDF
Creating new users and roles in sap guide
PDF
SAP SD Complete Guide
PDF
230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
PDF
Output determination SAP S4 HANA SAP SD CC
DOC
Scheduling agreement konwledge paper
POTX
G14 (31. จุลสาร)
PPT
SAP SD Documents
Billing plan sap help
SAP SD Copy Controls
Ale idoc training kit sap Anilkumar chowdary
Text determination
Sd overviewdoc config
Output determination
Availability Check & Transfer Of Requirements Sales
Business partner-2
 
96836801 sap-sd-interview-questions
Sap sd interview_questions_answers_and_explanations_espana_norestriction
Credit Management in SAP SD
Promotions and Deals in SAP Sales
Sap sd important interview concepts
Creating new users and roles in sap guide
SAP SD Complete Guide
230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
Output determination SAP S4 HANA SAP SD CC
Scheduling agreement konwledge paper
G14 (31. จุลสาร)
SAP SD Documents
Ad

Viewers also liked (10)

PDF
SPSS ile regresyon analizi
DOCX
SAP SmartForms ile Barkod + Türkçe karakterli etiketi yazdırma
DOCX
Lotus Notes - .NET entegrasyonu
DOCX
SAP SCOT kurulum adımları
DOCX
SAP DMS kılavuzu
PDF
ECC 6.0 ABAP yenilikleri
DOCX
Organizational Behavior - Genel özet
PDF
ABAP mimarisi hakkında yeni bir kitap: "Design Patterns in ABAP Objects"
PDF
SAP Portal kılavuzu
PPTX
Zaman Yönetimi
SPSS ile regresyon analizi
SAP SmartForms ile Barkod + Türkçe karakterli etiketi yazdırma
Lotus Notes - .NET entegrasyonu
SAP SCOT kurulum adımları
SAP DMS kılavuzu
ECC 6.0 ABAP yenilikleri
Organizational Behavior - Genel özet
ABAP mimarisi hakkında yeni bir kitap: "Design Patterns in ABAP Objects"
SAP Portal kılavuzu
Zaman Yönetimi
Ad

Similar to Embedding custom ActiveX controls into SAP GUI (20)

PDF
Windows logging cheat sheet
DOCX
software Documentation Certificate in department of computer
PDF
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
PPT
Continuous Integration using Cruise Control
PDF
Actor Model Import Connector for Microsoft Active Directory
PDF
Net Framework Essentials 1 ed Edition Thuan L. Thai
PDF
Swift configurator installation-manual
PPT
Agentless System Crawler - InterConnect 2016
PDF
PVS-Studio in the Clouds: Azure DevOps
PDF
Windows splunk logging cheat sheet Oct 2016 - MalwareArchaeology.com
PDF
Digital Content Retrieval Final Report
PDF
Installing community surveys in connections 5.5
PPTX
Ultimate Free SQL Server Toolkit
PDF
S Pii Plus+C+Library+Programmer+Guide
PDF
S Pii Plus+C+Library+Programmer+Guide
DOCX
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
PDF
DBMS_Lab_Manual_&_Solution
PPT
Free tools for win server administration
PDF
Bews command line_en
PDF
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
Windows logging cheat sheet
software Documentation Certificate in department of computer
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
Continuous Integration using Cruise Control
Actor Model Import Connector for Microsoft Active Directory
Net Framework Essentials 1 ed Edition Thuan L. Thai
Swift configurator installation-manual
Agentless System Crawler - InterConnect 2016
PVS-Studio in the Clouds: Azure DevOps
Windows splunk logging cheat sheet Oct 2016 - MalwareArchaeology.com
Digital Content Retrieval Final Report
Installing community surveys in connections 5.5
Ultimate Free SQL Server Toolkit
S Pii Plus+C+Library+Programmer+Guide
S Pii Plus+C+Library+Programmer+Guide
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
DBMS_Lab_Manual_&_Solution
Free tools for win server administration
Bews command line_en
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy

More from Dr. Kerem Koseoglu (9)

PPTX
Avrupa'da ABAP Kariyeri
PPTX
Zaman Yönetimi TEDx Sunumu
PPTX
Fiori eğitimi - sunum
PDF
SPSS Manual (Turkish)
PPTX
Kordsa Design Pattern Eğitimi
DOCX
Web Dynpro
PPTX
Design Patterns in ABAP Objects - SAP Forum / Tech Ed sunumu (2016)
DOCX
Correlation Between Proper Training / Involvement and ERP Acceptance and the ...
PDF
SQL Injection - Web siteniz tehdit altında mı?
Avrupa'da ABAP Kariyeri
Zaman Yönetimi TEDx Sunumu
Fiori eğitimi - sunum
SPSS Manual (Turkish)
Kordsa Design Pattern Eğitimi
Web Dynpro
Design Patterns in ABAP Objects - SAP Forum / Tech Ed sunumu (2016)
Correlation Between Proper Training / Involvement and ERP Acceptance and the ...
SQL Injection - Web siteniz tehdit altında mı?

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
assetexplorer- product-overview - presentation
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administration Chapter 2
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Nekopoi APK 2025 free lastest update
PDF
medical staffing services at VALiNTRY
PPTX
Introduction to Artificial Intelligence
PDF
Cost to Outsource Software Development in 2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Understanding Forklifts - TECH EHS Solution
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
assetexplorer- product-overview - presentation
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Operating system designcfffgfgggggggvggggggggg
Why Generative AI is the Future of Content, Code & Creativity?
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administration Chapter 2
Odoo POS Development Services by CandidRoot Solutions
Nekopoi APK 2025 free lastest update
medical staffing services at VALiNTRY
Introduction to Artificial Intelligence
Cost to Outsource Software Development in 2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Digital Systems & Binary Numbers (comprehensive )
Reimagine Home Health with the Power of Agentic AI​
Computer Software and OS of computer science of grade 11.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Odoo Companies in India – Driving Business Transformation.pdf
Understanding Forklifts - TECH EHS Solution

Embedding custom ActiveX controls into SAP GUI