问题
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).
回答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.
来源:https://stackoverflow.com/questions/25173411/call-a-sap-transaction-execute-with-given-parameters-and-download-a-report-with