This article represents PoC's very personal views on ways to play and enjoy in a tournament environment. Not an entirely serious piece of literature.Descripción completa
Sap ABAPDescripción completa
Selection Screen Design Using SAP ABAP
a brief description of makefile in linuxFull description
Descrição: SAP UI5 Applications Using ABAP Channels
SAP UI5 Applications Using ABAP Channels
For All Of You
mm VALUATIONFull description
its example to all sap abap porgrams importent program in sap abap you can pratice to own and learn the programming how its workFull description
SAP Webdynpro ABAP Guide, WebDynpro Guide ABAP
Descripción completa
This book cover the practical approces to sap abap programming language
Certification purposeDescripción completa
sap abap book with oo abap nice book with pratical exposer here you can find new path to learning sap abap programming and question
this book cover all pratical and inteview question answer nice book
rtrt
ABAP Consultant
Descripción: Tutorial sobre la declaración y el uso de las estructuras en ABAP
Those who are preparing for certification, this is for youFull description
How to call a dll file of windows using SAP ABAP | SCN
1 de 3
http://scn.sap.com/docs/DOC-51658
Getting Started Newsletters Store
Hi, Guest
Log On Join Us
Products
Services & Support
About SCN
Downloads
Industries
Training & Education
Partnership
Developer Center
Lines of Business
University Alliances
Events & Webinars
Innovation
How to call a dll file of windows using SAP ABAP
Activity
Communications
Actions
Browse
Version 2
created by Marcelo Macedo on Jan 23, 2014 5:46 PM, last modified by Marcelo Macedo on Jan 27, 2014 2:10 PM
Share
Tweet
Like
2
In ABAP language exists many forms to connect and i want explain how to call dll files for Windows Below follow step by step to construction: 1 – Create the dll files. In my example i am using the visual basic language, but you can use another language of programmer (ex.: Delphi, C# etc)
VERSION 1.0 CLASS BEGIN MultiUse = -1 Persistable = 0
'True 'NotPersistable
DataBindingBehavior = 0
'vbNone
DataSourceBehavior
= 0
'vbNone
MTSTransactionMode
= 0
'NotAnMTSObject
END Attribute VB_Name = "DLL_VB" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True ' Declaration of variable return Private s_retorno As String Public Property Get retorno() As String retorno = "retorno: " & s_retorno End Property ' Function that receives the command and variable playing in s_retorno Public Function envia_comando(ByRef s_comando As String) s_retorno = s_comando End Function
1.1 - After building the DLL you need to register in windows using the command: regsvr32 .dll
A er this you are should look the pop-up with message:
2 - Execute the program regedit.exe in Windows System and nd the name of DLL le
09/09/2016 10:58
How to call a dll file of windows using SAP ABAP | SCN
2 de 3
http://scn.sap.com/docs/DOC-51658
You need find two values in regedit.exe. CLsid : {2EC47E73-2E05-45BA-AC8B-CD7E798D4034}
TypeLib: {4F4B5B12-5F45-43DB-A06E-2065395F9866}
3 - This values do you must put in transaction SOLE
4 - Below the example in SAP ABAP that call dll file in Windows. This example: send a string and return another string using the file dll *"---------------------------------------------------------------------*"*"Interface local: *"
IMPORTING
*" VALUE(I_COMANDO) TYPE *"
CHAR20 OPTIONAL
EXPORTING
*" VALUE(E_RETORNO) TYPE *"
CHAR20
EXCEPTIONS
*" CREATE_OBJECT_ERROR *" GET_PROPR_ERROR *"
CALL_ERROR
*" FREE_OBJ_ERROR *"---------------------------------------------------------------------* Includes INCLUDE ole2incl. * Global Variables DATA: obj_vb TYPE ole2_object, vg_comando(20) TYPE c, vg_retorno(20) TYPE c. * sends the command to the dll vg_comando = I_COMANDO. * Creating the object to use the DLL
09/09/2016 10:58
How to call a dll file of windows using SAP ABAP | SCN
3 de 3
http://scn.sap.com/docs/DOC-51658
CREATE OBJECT obj_vb 'TESTDLL'. IF sy-subrc NE 0. RAISE create_object_error. ENDIF. * Sending the command to the dll CALL METHOD OF obj_vb 'envia_comando' EXPORTING #1 = vg_comando. * Receiving command of dll get property of obj_vb 'RETORNO' = vg_retorno. IF sy-subrc NE 0. RAISE get_propr_error. ELSE. E_RETORNO = vg_retorno. ENDIF. * Deallocates the object memory FREE OBJECT obj_vb. IF sy-subrc NE 0. RAISE free_obj_error. ENDIF. ENDFUNCTION.
I have helped, any questions please send a message. Regards Marcelo Macedo
2890 Views
Categories: ABAP Development
Topics: abap Tags: abap_objects
Average User Rating (0 ratings)
Share
Tweet
Like
2
0 Comments There are no comments on this document.