cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript in RFC possible?

Former Member
0 Kudos

Hello!

I have made loads and loads of SAPScripting (SAP GUI scripting) using Excel and VBA. That is really useful and allows for a great deal of efficiency. Lately i experimented with some RFC calls and that is really cool because its faster and allows the program to execute in the background i.e not using the GUI.

However, I don't have too much experience with using Function Modules and ABAP code. And so far I have only been able to fetch data from tables.

So I'm wondering if the regular SAPScript (session.findById.. etc) can be used in RFC calls. To carry out different updates as if they were done in the GUI?

And if so, does anyone possibly have a bit starter code to get me started?

BR Mattias

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_schnell
Active Contributor
0 Kudos

Hello Mattias,

welcome in the Scripting Language forum.

As I understand you correct, you want to use SAP GUI Scripting inside an RFC module. This means, you want to control the frontend server via SAP GUI Scripting in an executed RFC backend module.

Mhm, in my opinion tt is not really possible and not really recommended to use SAP GUI Scripting in RFC calls.

RFC (Remorte Function Call) is designed as a machine to machine (M2M) interface. So it is possible to use it without any UI. So you must check at first in the RFC the using of an UI,  otherwise the module could have problems.

The using of the SAP GUI Scripting control in the backend server is generally forbidden in the SAP GUI for Windows security options. so you must disable the standard SAP Logon security options, if you want to use it directly.

In my opinion is it from the architecture perspective with the separation from the front- and backend components better to renounce this scenario. You can use RFCs in SAP GUI Scripting on different ways easily, via SAP ActiveX control or via CCo (COM Connector), and you can use the results of the RFCs in your SAP GUI Script processing. It is not really necessary to mix these different components and their approaches, based on the reasons set out here.

If you really want to use SAP GUI Scripting from the ABAP backend I developed Background Light. This is a server application which allows to use COM libraries with ABAP background processes and without the SAP GUI for Windows. You can find more Information here.

You see it is interesting topic with many facets. Let us know more about your ideas, your requirements and your results.

Cheers

Stefan