1

I want to write some code using the SAP .NET Connector 3 to receive and send data to a SAP System using RFC and IDoc.

How can I setup a simple SAP Test System with RFC to test my code. Is there a way to mock the SAP System or do I have to install a SAP System? If so is there any simple tutorial on how to setup an SAP System with a simple "Hello World" RFC?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
flosk8
  • 465
  • 1
  • 6
  • 17
  • What do you need to do? Are you trying to get acquainted with RFC programming or are you looking for a long-term test environment? – vwegert Jan 13 '16 at 11:31
  • you can implement both RFC client and RFC server with the SAP .Net Connector 3. The examples coming with the library cover both scenarios. I haven't tried connecting a SAP NCo client with a SAP NCo server, but in theory it should work. And if it doesn't, there is always the SAP Netweaver trial edition (formerly known as minisap). – Dirk Trilsbeek Jan 13 '16 at 12:18
  • 1
    @DirkTrilsbeek As far as I know, you need a gateway server process in between (the R/3 process, not the new Data stuff) – vwegert Jan 13 '16 at 12:58
  • 1
    @vwegert you may be right, thinking about it I realized both RFC client and server need some component to log on to and you'd either have to implement that as well (if possible) or have the real deal. And if I remember correctly even the RFC server component logs on to the application server, which wouldn't be available here. So you will probably need netweaver. – Dirk Trilsbeek Jan 13 '16 at 13:10
  • Best think would be to install a SAP System. Question is how to get a System. As far as I know you don't get a SAP System for free. You can also rent a System at SAP in Walldorf. – etalon11 Jan 14 '16 at 18:50

1 Answers1

3

I was originally going to post a comment. But it was too long. This isnt a solution, its a warning. I think you have placed too much emphasis on unit test for this type of solution. Mock the rest of the code all you like. But mocking an interface that may/will behave differently is false confidence. By all means abstract the infrastructure layer and push dummy data into int to test the rest of the app. But dont plan on mocking the interface in any way that is relevant to stability.

How do you plan to mock:

  • The sign on process
  • single sign on, SNC...
  • gateway connection
  • connection specific settings
  • authorizations
  • load balancing
  • connection pooling
  • timeout

Test it against the DEV system, then test again in QA system and get ready for unexpected issues in PROD.

You can write code to generate TABLE/STRUCTURE content. So you easily mock what that you expect to receive or send to SAP system. Write a dummy that returns that data and mock the call. Dont bother with mock infrastructure. That achieves nothing.

phil soady
  • 11,043
  • 5
  • 50
  • 95