on 07-27-2011 1:26 PM
Hi,
I have a set of pre-defined DLL files from a Vendor and I have to implement some code using those DLLs in SAP, can anyone please assist me with importing DLL files into SAP. I tried importing it in the MIME repository but it doesn't`t allow DLL file extensions.
Thanks in advance.
Hello wesleymabunda,
it is very easy to use client DLLs in an ABAP program. You find an example [here|http://wiki.sdn.sap.com/wiki/display/Snippets/HowtocallfunctionsfromaclientDLLinanABAP+program].
If you need an automatic generation tool for the import of the DLL functions let me know, I have an extended library viewer which create it. Here an example of TWAIN_32.DLL:
"-Begin-----------------------------------------------------------------
"-Includes------------------------------------------------------------
Include OLE2INCL.
"-Variables-----------------------------------------------------------
Data twain_32 Type OLE2_OBJECT.
"-Main----------------------------------------------------------------
Create Object twain_32 'DynamicWrapperX'.
Call Method Of twain_32 'Register'
Exporting
#1 = 'twain_32.dll'
#2 = 'AboutDlgProc'
#3 = 'i=...' #4 = 'r=...'.
Call Method Of twain_32 'Register'
Exporting
#1 = 'twain_32.dll'
#2 = 'ChooseDlgProc'
#3 = 'i=...' #4 = 'r=...'.
Call Method Of twain_32 'Register'
Exporting
#1 = 'twain_32.dll'
#2 = 'DSM_Entry'
#3 = 'i=...' #4 = 'r=...'.
Call Method Of twain_32 'Register'
Exporting
#1 = 'twain_32.dll'
#2 = 'InfoHook'
#3 = 'i=...' #4 = 'r=...'.
Call Method Of twain_32 'Register'
Exporting
#1 = 'twain_32.dll'
#2 = 'WGDlgProc'
#3 = 'i=...' #4 = 'r=...'.
"-End-------------------------------------------------------------------
All you have to do is to define the import and return arguments of the functions in the library.
Cheers
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> I have a set of pre-defined DLL files from a Vendor and I have to implement some code using those DLLs in SAP
SAP has an own runtime environment, you can't "import DLL files".
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.