cancel
Showing results for 
Search instead for 
Did you mean: 

Importing DLL files into SAP

0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_schnell
Active Contributor
0 Kudos

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

markus_doehr2
Active Contributor
0 Kudos

> 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