Questions about using SAP GUI Scripting and SAP RFC-Functions inside UIPath

Hello to everyone :slight_smile:

I hope this is the right category to ask These kind of technical questions. If not, please move it to the right section, thanks :smile:

We actually start a PoC with UIPath.
Our Company works with SAP (Basic and programmed Addons).

For SAP Automation I normally use SAP GUI Scripting and SAP RFC Functions but now we want to do that inside the RPA Software.

Now I have a few technical Questions.

  1. Question:

The Identifer of SAP GUI Element in UIPath seems to be the ID.

But these IDs are changing with every new SAP Release.

Is it possible to use another Method instead of “FindById” or OCR?

For example in SAP GUI Scripting you can use the “findbyname” Method to find the Element with its technical Name and Fieldtype.




session.findById(“wnd[0]”).findByName("/GKV/BP02_STR_U_PERS_SCR-BIRTHTITLE_TEXT ",“GuiCTextField”). setFocus

With every SAP Release the SAPLBUSS Number are changing and the recorded ID is not valid anymore.

Sure, we could use directly a VBS but it would be better to have it inside UIPath.
OCR is also not the best way for us, cause we have few Elements (Images, Buttons etc.) which looks the same and also have the same text.

I was trying to use Invoke Code Method to execute SAP Scripts but no success (Late Binding is not allowed)

Is there Way to use SAP Gui Scripting directly inside UIpath?

  1. Question:

Is it possible to use SAP BAPI / RFC Functions Calls inside UIPath? (for example RFC_READ_TABLE) ?

We have a lot RFC Functions we can use (actually we use it inside VBA Makro) which we could use instead of using long SAP GUI Recordings.

For example we get live access (readonly) to SAP Database to compare different Data and do decisions on that instead of looping through the GUI to the desired fields.
This would make the Process very stable and supportable.

Thanks to anyone with Information on that stuff :slight_smile:



It would be nice to get some Information about this :slight_smile:


Hi Sebbi,
Sorry I am not here to answer your questions, but I have some doubts. Even I have to start POC on SAP automation. Can you please let me know the prerequisites for that?

Hi to all,

I am looking for the same features!

@Sebbi ,

did you (or somebody) got it working?

If yes please share the solution here :slight_smile:

Greetz Bernhard

I am looking for an approach to call vbs file with inout and outout paramteres in uipath

I was trying the same, but never found a way to get an “outout” Argument back to UiPath.
The only thing that could work is to store the Output in another File and read it by UiPath.

Looking back to my Question in the beginning, I am now able to use SAP Gui Scripting and SAP RFC-Functions the way I want (Different Methods with SAP Gui Scripting and RFC-Calls)

The solution was to write a Custom Activity.

After reading some Tutorials I was able to make it visible and working inside UiPath.

For each SAP RFC/BAPI you have to write an own Custom Acitvity cause the way you call is always different.

By using SAP .Net Connector dll´s there was a Problem with the specific RFC-Connections/Sessions. It seems that UiPath doesnt Close the Connection, so it was impossible to use it 2 Times in a working Process.

I decided to use the normal SAPFEWSELib.dll with SAP.Function/BAPI.Control.

When I got time to speak with my Company about it, I will publish my Solution here later.

Greetz Sebbi

Nice response Sebbi did you try an do anything on User Impersonation or are you running each BOT in the context and environment of a normal SAP user?