-3

According to a comment in this question. SAP RFC is GUI capable:

Why is r_data_line_descr of cl_salv_bs_runtime_info=>get_data_ref() not bound?

Where can I find more information about this feature of SAP RFC?

Quoting above comment:

moreover RFC is GUI-capable provided that you select it when you open the RFC connection (activated by default with SAP)

I use PyRFC, but I guess this feature applies to all client implementations of SAP RFC.

guettli
  • 25,042
  • 81
  • 346
  • 663

2 Answers2

0

Being the author of that comment, let me explain what I meant.

First of all, my comment was in response to "If you call the code by RFC, then there is no GUI connected to the server", if I understand well its meaning, it's wrong if you start the connection with the SAP GUI parameter activated, i.e. it's possible to run a SAP function by RFC which displays a SAP GUI screen (provided that SAP GUI is installed on the client). Otherwise the ABAP code will fail when displaying a screen (SAP GUI not connected).

I didn't find any official documentation for this parameter.

I just know the parameter for these two languages:

In COM/ActiveX, it's the property RfcWithDialog of class SAPLogonCtrl.Connection:

Dim connParam As SAPLogonControl
Dim connHandle As SAPLogonCtrl.Connection

set connParam = New SAPLogonControl
connParam.ApplicationServer = "atlas.XXXXXXXX"
connParam.System = "DK1"
connParam.SystemNumber = 02  'system 00, 01, ...
connParam.client = "100"
connParam.user = "xxxxxx"
connParam.Password = "xxxxxx"
connParam.Language = "EN"
connParam.Enabled = False

Set connHandle = connParam.NewConnection
connHandle.RfcWithDialog = 1 

In .NET, it's the property UseSAPGui of class RfcConfigParameters.

PS: I don't think this parameter will help you in your other question.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • I can't find the official docs for `RfcWithDialog` with my favorite search engine. – guettli Apr 29 '19 at 12:08
  • @guettli 265 results with Google. For example this result in [official SAP library](https://help.sap.com/saphelp_pserv464/helpdata/en/39/7e00d1ac6011d189c60000e829fbbd/frameset.htm): "Set this property to a non-zero value when you want to start the SAPGUI before making RFC calls. The running SAPGUI allows you to call RFC functions that display SAP screens. You can only use this property for connecting against R/3 Systems with Release 3.0C or later." – Sandra Rossi Apr 29 '19 at 13:34
  • Yes, you are right. There are many hits for this keyword if you use your favourite search engine (I use ecosia). But why do the canonical docs from upstream (SAP) not show up immediately as the first search result? AFAIK there is something called SEO (search engine optimization). For me it looks like SAP does not care for this. In the end nobody has fun coding ABAP. This goes against SAP, not against you. Sandra, you helped me a lot here. Thank you very much. Without your help our product (https://www.tbz-pariv.de/produkte/modlink/modlink-intro) would not be ready yet. – guettli Sep 17 '19 at 13:58
0

PyRFC uses the NW RFC library (sapnwrfc.dll) under the hood, and this library supports the same parameter as the COM controls and .NET Connector: USE_SAPGUI

Setting it to "1" attaches a visible Gui to the RFC connection, setting it to "2" attaches an invisible Gui.

However, I'm not familiar with PyRFC, so no idea, whether it's interface also exposes that parameter, or whether there is a way to pass arbitrary sapnwrfc.dll parameters down from Python to the C/C++ layer of sapnwrfc.dll?!

Lanzelot
  • 15,976
  • 4
  • 18
  • 14