Skip to Content
Apr 26, 2016 at 04:20 PM

Personas 3.0 RFC calls returning null values



I am trying to incorporate RFC calls into some Personas scripts but they seem to be returning null values. I tested in SE37 the same function modules, same inputs and the expected values are returned. I decided to try one of the simple examples from the portal the and get the same result. Here is the code:

var rfc = session.createRFC("BAPI_USER_GET_DETAIL");

rfc.setParameter("USERNAME", "*******");



var address = JSON.parse(rfc.getResult("ADDRESS"));

Here is the error:

Error during script execution:

TypeError: Cannot read property 'textContent' of null

at sap.personas.scripting.scriptingEngine.GuiRFC.getResult (http://svrsaperpdev.mcc.local:8100/sap/bc/personas3/core/script/sap/personas/fw/its/scripting/ScriptingEngine.js?20160323161651:30:1953)

at eval ([AppID:VA01]>[Flavor:VA01_RM_01_TEMP]>[Script:wnd[0]/scrptPersonas_0-GOTO_DETAIL]:50:30)

at Object.self.executeScriptInternal (http://svrsaperpdev.mcc.local:8100/sap/bc/personas3/core/script/sap/personas/fw/its/scripting/ScriptingEngine.js?20160323161651:45:9330)

at (http://svrsaperpdev.mcc.local:8100/sap/bc/personas3/core/script/sap/personas/fw/its/scripting/ScriptingEngine.js?20160323161651:45:11630)

at eval (http://svrsaperpdev.mcc.local:8100/sap/bc/personas3/core/script/sap/personas/fw/its/scripting/Runtime.js:1:659)

Since I get the same error on all FMs I have tried could this be something related to the RFC connection? How to find out what RFC connection is used in this case?