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

Opening external applications using DLL

Former Member
0 Likes
661

Hi Friends!

Is it possible to open an external application using a DLL file? If yes, how can i achieve it?

The exact requirement is to open the drawing from the transaction cv02n by clicking on the document no. The drawing will be stored in the wrench file format. The DLL to open the file is only available at the presentation server and the Wrench application will not be installed .

The sample code to open using DLL from VB is given here.

Sample VB code:

Dim objView As Object

Private Sub Command1_Click()

On Error GoTo ERR_HANDLER

Set objView = CreateObject("WrenchDocViewer.DocViewer")

If objView.initialise(Trim(Text1.Text), Trim(Text2.Text), Trim(Text3.Text)) = 1 Then

If objView.ViewDocuments(Trim(Text4.Text)) = 0 Then Exit Sub

End If

Exit Sub

ERR_HANDLER:

If Err.Number <> 0 Then

MsgBox Err.Description, vbCritical

Err.Clear

End If

End Sub

Thanks and Regards,

M.Arumugam

1 ACCEPTED SOLUTION
Read only

andreas_mann3
Active Contributor
0 Likes
602

hi,

look at class (with se24) CL_GUI_FRONTEND_SERVICES

e.g. method: EXECUTE

A.

3 REPLIES 3
Read only

andreas_mann3
Active Contributor
0 Likes
603

hi,

look at class (with se24) CL_GUI_FRONTEND_SERVICES

e.g. method: EXECUTE

A.

Read only

0 Likes
602

Hi!

This method can execute only exe files. Please correct me if i am wrong.

I already tried this.

Thanks,

M.Arumugam

Read only

0 Likes
602

Welcome to SDN

for this you need to register the dll in all frontend machines using regserve32.exe and then create a abap class to instantiate the dll and use its methods.

check the following weblog where Thomas shows how to use windows media player control and same logic can be used for your case.

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

Regards

Raja