Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DLL functions from ABAP

Former Member
0 Likes
2,285

Hi,

<b>Is there any way to call DLL functions calling from ABAP.</b>

If anybody has any code,can you please paste that code.

Thanks in Advance

Srinivas Sandaka

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
1,773

Yes it is possible , with the ABAP control framework. I am not sure whether all DLLs are supported, but as far as i know you can use activex controls. If you could give us some more info as to what you are trying to do we may be able to help you.

Also have a look at the following weblogs.

/people/durairaj.athavanraja/blog/2005/01/18/make-your-sapgui-talk

/people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework

Regards

Raja

Hi,

<b>Is there any way to call DLL functions calling from ABAP.</b>

If anybody has any code,can you please paste that code.

Thanks in Advance

Srinivas Sandaka

12 REPLIES 12
Read only

athavanraja
Active Contributor
0 Likes
1,774

Yes it is possible , with the ABAP control framework. I am not sure whether all DLLs are supported, but as far as i know you can use activex controls. If you could give us some more info as to what you are trying to do we may be able to help you.

Also have a look at the following weblogs.

/people/durairaj.athavanraja/blog/2005/01/18/make-your-sapgui-talk

/people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework

Regards

Raja

Read only

Former Member
0 Likes
1,773

With transaction SOLE you can link sapgui with a DLL library registered on your client or server.

After this:

data: mydll TYPE ole2_object.

CREATE OBJECT mydll 'MYLDAP.RUOLO'.

CALL METHOD OF mydll 'check_password' = string

EXPORTING #1 = user

#2 = password

#3 = 'dataentry'.

where check_password is the dll function with parameters; myldap.ruolo is the dll library.

Gianluca

Read only

0 Likes
1,773

Hai Gianluca,

I have a same problem as above i am trying to use lp sole which as dll format from abap. but no clue how to start . I was looking into the SOLE T .code but i could not finish it . Can u please help me out with the prblm.

Kiran

Read only

Former Member
0 Likes
1,773

Hi,

I write a program like this:

REPORT ZVB_TEST.

<b>TYPE-POOLS ole2.

data: mydll type ole2_object,

str type string.

create object mydll 'VBA'.

call method of mydll 'UCase' = str

exporting

#p1 = 'vb'.

write str.</b>

It does not return anything, I am in WAS6.4.

Can you please suggest the changes in my code.

Thanks in Advance

Srinivas Sandaka

Read only

0 Likes
1,773

Do you have registered the dll on your client?

And indicate it into SOLE transaction?

When you create object "mydll", you must indicate the project and the class: for my example, myldap.ruolo indicate project and class about dll library.

Gianluca

Read only

Former Member
0 Likes
1,773

I found the registeries in SOLE tcode.

OLE application: VBA

clsid : {000204F3-0000-0000-C000-000000000046}

As you know this is a standard DLL, I am trying to calling UCase function from VBA.Strings module.

<b>Here Strings is a standard module not the Class module.</b>

I changed my code also.

create object mydll 'VBA.Strings'.

call method of mydll 'UCase' = result

exporting

#1 = 'vb'.

Can you please help me on this.

Thanks in Advance

Srinivas Sandaka

Read only

Former Member
0 Likes
1,773

Hi,

I registred another custom DLL, It is working fine.

Thank you Gianluca for the sample code you gave.

But the problem is we have to register the DLL in all clients.

Is there any way to upload the DLL to SAP.

I found a tcode SOLI (in help.sap.com documentation) but i could not found it in my server (WAS 6.4).

Can you please give an advise to avoid DLL register in ever client.

Thanks in Advance

Srinivas Sandaka

Read only

0 Likes
1,773

Hi Srinivas,

When you register the OLE application via SOLE, the data you enter is cross client.

So for every client in that instance it will be registered.

To get these entries to your other instances you can transport the entries. Use the menu Table view->Transport and then record your changes in a change request which you can migrate to all SAP instances.

Cheers,

Brad

Read only

0 Likes
1,773

I suppose that for clients you intend all the workstation for the users. Is it true? Or intend the R/3 mandants?

Gianluca

Read only

0 Likes
1,773

Hi Srivinas,

If when you say "clients" you mean the users workstations, then I don't think there is any avoiding this.

OLE works by interaction between the SAPGUI and OLE program (in this case a DLL). Your SAPGUI will not be able to interact with the application server using OLE. it must be on the machine that the SAPGUI is running on.

Cheers,

Brad

Read only

Former Member
0 Likes
1,773

Hi,

Is there any way (Other than OLE) to call DLL functions from SERVER itself.

My requirement is:

Some of my busiless logic in DLLs, I should those functions (DLLs) from ABAP.

Can you give a conclusion on this.

So that we can close this thread.

Thanks in Advance

Srinivas

Read only

0 Likes
1,773

Hi Srinivas,

If you have some c/java/vb skill in house you could write an RFC wrapper for your DLL. This RFC wrapper function (and the corresponding DLL) could then sit on your server. Refer to: http://help.sap.com/saphelp_erp2004/helpdata/en/22/042899488911d189490000e829fbbd/frameset.htm

You could then call this RFC function directly from ABAP.

Apart from that, maybe there are some kernel calls that support a direct dll call, but I'm not aware of any.

Cheers,

Brad