SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Windows, Windows Phone, SAP and ABAP, like SAP UI5, Screen Personas, etc.




CRM Companies List
Web Based CRM Software




SAP Personas Function Module Whitelist New RFC Entry

This SAP Screen Personas tutorial shows how to add a new ABAP RFC FM to the Personas Function Module whitelist. Personas administrator can define function module whitelist entries and script developers can call these function modules in their Personas flavor scripts.

This Personas tutorial show how Personas script programmers and administrators can enable RFC call from a Personas flavor for SAP Screen Personas 3.0

For SAP Personas 2.0, flavor developers can use WebRFC calls and enable or release function modules to internet as illustrated in referred tutorial.


Call Function Module in SAP Personas Script

SAP Screen Personas flavor editors, can create scripts which call a function module from SAP systems in Script Editor using Javascript code similar to shown below.

First, script developer creates a RFC object. Then defines input parameters and sets values for each parameter.

After the RFC request is send to SAP system using send() method, the returned response can be parsed using JSON.parse() method, etc.

var rfc = session.createRFC("/KODYAZ/SOM_TR_D2C_CANC_REQ_BAPI",'');
...
rfc.requestResults(JSON.stringify(["E_SUCCESS"]));
rfc.send();

var returnData = JSON.parse( rfc.getResult("E_SUCCESS") );

When the above code is executed as part of a flavor which I was working on recently, I got the below error message.

function module is not in the Personas whitelist

Function module {function module name} is not in the Personas Function Module whitelist.

This error message informs the Personas script editor that the RFC function module is not registered or defined as a whitelisted function module at Personas Administration utilities.

Before calling such a function module, that RFC should be added to the Personas function module RFC Whitelist by a Personas Screen administrator.

If ABAP developers debug for further they will find out that the check for whitelisted function modules is done in AUTHORITY_CHECK method of /PERSONAS/CL_SCRIPT_RFC_HNDL class. In case you don't have the option to modify the fm whitelist, but have the option to change variable values during debug, you can alter the lv_found parameter in the mention ABAP class method.


Personas Function Module Whitelist Entry

To add a new FM to Personas Function Module Whitelist, first call SAP Screen Personas 3 Personas Administration transaction code: /PERSONAS/ADMIN

After SAP Screen Personas Administration screen is displayed, using following menu options display view mode of Personas Function Module RFC Whitelist:
Goto > FM Whitelist

SAP Screen Personas function module whitelist administration

When Personas Function Module RFC Whitelist screen is displayed, switch to edit mode and click on "New Entries" button to define a new remote enabled function module as a member of whitelist rfc functions.

As seen in below screenshot, in the Personas Function Module RFC Whitelist, type the FM name.
In Framework column, you can choose Dynpro for SAP Screen Personas applications.
Using "*" expression will be enough to let the FM to be called successfully from every Personas application without a problem.

SAP Personas function module whitelist entry

When the new RFC is entered, press Save button.

Now Personas script editors can call the WebRFC using RFC methods in Script editor.

Using SM30 table maintenance, it is also possible for ABAP programmer and SAP Screen Personas developers to maintain /PERSONAS/C_RFCW, Personas Function Module RFC Whitelist table






SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table








Copyright © 2004 - 2017 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems