1

I'm not familiar with ABAP at all and I'm trying to automate a SAP report for my job (downloaded from the result of an executed transaction in SAP R/3).

At the moment I have to open SAP (manually of course), login, call the transaction, add some parameters to it, execute it and download the first report. After that I have to work it around (thing that I already automate, so it's not a problem) but then I have to get some other parameters from it and call another transaction to execute with the new parameters that I got from the first report... And so on 2 more times.

My problem is that, after automating all the excel related stuff, I can't find a way to interact with SAP R/3 to login, call the transaction, execute with the parameters and get the report with C# or VB.net

Can somebody give me a hint about this?

I googled for a couple of hours and all I found out is that I may have to work with RFC's and BAPI's but I still can't figure out how to do it nor how to use these properly (if I'm right that I have to).

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
GMaiolo
  • 4,207
  • 1
  • 21
  • 37
  • 1
    Yes, that's right. .NET applications communicate best through the SAP .NET Connector, also known as SAP NCo. You can [Nuget the DLLs now](https://www.nuget.org/packages/SAPNCo.x86/), I believe, or download them from service.sap.com. Once you have them, [HERE](http://scn.sap.com/community/interoperability-microsoft-net/blog/2013/02/14/connecting-to-sap-with-nco-3) is a good jumping off point for tutorials. – oakfish56 Aug 07 '14 at 13:47
  • After some research I found out that to create a RFC for the Z-Report I gotta have access to SE37. But I don't have access (and won't be granted access neither because I work as a consultant). Is there ANY way to work with the SAP front end as a windows process and automate the parameters completion and emulate the clicks? – GMaiolo Aug 08 '14 at 01:12
  • In short, no there isn't. – oakfish56 Aug 11 '14 at 14:13
  • Well actually I discovered yesterday that SAP has a scripting option, with which I can 'record' steps somewhat like a macro (and it even does it in second plane!) so I'm working on VB.net and VBScript to get this done, it's perfectly possible and pretty easy aswell. Thanks anyway @oakfish56 I appreaciated your help – GMaiolo Aug 13 '14 at 03:16
  • Seriously? Craziness... I'll have to check it out. – oakfish56 Aug 14 '14 at 13:32

1 Answers1

1

I discovered that SAP has a scripting option, with which I can 'record' steps somewhat like a macro (and it even does it in second plane!) so I'm working on VB.NET and VBScript to get this done, it's perfectly possible and simple aswell.

EDIT: Introduction to SAP Gui Scripting is what I used as a guide to implement this.

GMaiolo
  • 4,207
  • 1
  • 21
  • 37