2010 Mar 25 10:50 AM
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,
2010 Mar 25 1:44 PM
set the thread as un-answered because I posted another question.
2010 Mar 25 11:26 AM
Hi ,
You can call .net application( it should be as exe file) from abap by using FM "WS_EXECUTE".
Regards
Nehruu
2010 Mar 25 1:38 PM
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
2010 Mar 25 1:43 PM
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
2010 Mar 25 1:44 PM
set the thread as un-answered because I posted another question.
2010 Mar 25 1:55 PM
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
2010 Mar 25 2:00 PM
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
2010 Mar 25 3:07 PM
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
2010 Mar 26 7:51 AM
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,
2010 Apr 23 6:47 PM
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
2010 Apr 26 9:14 AM
Hello all, there was a decision to follow the exe execution. Thanks indeed