Application Development 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: 

ABAP to .NET

Former Member
0 Kudos
210

Hello Experts,

Is there a way to call a .NET application from ABAP?

Acually this .Net application perfoms a specific process and generates some XML files and put them in a folder. I should trigger that .Net application to do that process from a button in SAP. so I need a way or a solution on how to trigger that .NET application to do that procedure. the .NET application can be adapted accordingly.

Any ideas please?

Best Regards,

1 ACCEPTED SOLUTION

Former Member
0 Kudos
120

set the thread as un-answered because I posted another question.

10 REPLIES 10

Former Member
0 Kudos
120

Hi ,

You can call .net application( it should be as exe file) from abap by using FM "WS_EXECUTE".

Regards

Nehruu

0 Kudos
120

Hello Nehruu,

I think you are saying that I shall make the .NET application executable through an exe and then I execute this file using WS_EXECUTE command from ABAP and this will do the job.

your answer is of a great value, thanks a lot. I think this will solve the problem. will revert back if I have any raised issue after I implement the solution.

Thanks again

0 Kudos
120

sorry forgot to ask you, can I use this command to run that exe on a remote computer? the .NET application will not be aside the SAP server but on another computer.

can I use this function to call an exe program on another computer?

Thanks

Former Member
0 Kudos
121

set the thread as un-answered because I posted another question.

0 Kudos
120

First, you shouldn't use WS_EXECUTE. Instead you should use the method EXECUTE, of the class CL_GUI_FRONTEND_SERVICES. This allows you to execute a program on the presentation layer, the local PC where the SAPgui is installed, or I think you may be able to execute a program which resides on a shared folder on remote network server.

Regards,

Rich Heilman

0 Kudos
120

Hi ,

Check this weblog.

[Weblog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/995] [original link is broken] [original link is broken] [original link is broken];

Regards,

Anuj

Former Member
0 Kudos
120

Hi,

If the .net application runs on a service, you should :

1. create a web service in .net that allows executing of the program

2. on the abap side, call that web service (using the wizzard) when you click on that button.

Best regards,

Wouter

0 Kudos
120

Hello Wouter,

The customer don't want to go for a web-service approach. is there a way that we define a listening port in the .NET and I connect to that port via ABAP? how can I do this, any step by step tutorial?

Regards,

0 Kudos
120

Hi,

in .NET, you can easily listen to TCP-Ports. Please have a look at the System.Net.Sockets namespace in .NET, there you find the TCPListener class. For programming example, see http://www.eggheadcafe.com/articles/20020323.asp

In SAP, I think you have to create a RFC destination, please see this thread [creating TCP/IP connection using RFC in SM59|]

Hope it helps.

Rudi

0 Kudos
120

Hello all, there was a decision to follow the exe execution. Thanks indeed