Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
vijaybhaskarraju_vegesana
Active Participant
0 Kudos

Just captured all the mandatory checks and steps to call remote enable function modules in Personas 3.0

Reference Link: http://wiki.scn.sap.com/wiki/display/Img/How+to+call+Remote+Enabled+ABAP+Function+Modules+in+Persona...

Requirement: Fetch Employee Full Name and Last Logon Date using Personas 3.0

Step 1:


Personas SP level in our landscape:


  

Step 2:


Mandatory Checks


  • Make sure, Function module is Remote Enabled in SAP System
  • Function module to be included in Table/View ‘/PERSONAS/C_RFCW’

 

Step 3:


SICF Path for the Personas URL


Transaction SICF -> Click ‘F8’ -> Navigate to Path-> default_host->sap->bc->personas

Step 4:


URL: http://FQDN/sap/bc/personas?sap-client=100


  • Provide Credentials of your personas system
  • It will take you to initial login screen
  • Also, check whether it contains ‘P’ icon ( Screen Personas )

Step 5:

Execute "SU01" transaction in the command prompt

Step 6:


Click on “P” icon, Create a flavor for “SU01” transaction. It opens below screen

Step 7:


In our case “SU01_3.0” is the new flavor which we created as a copy to standard “SU01” transaction.

Step 8:

  We modified the flavor "SU01_3.0" as below


     i)   Introduced two new fields Full Name and Last Logon in the screen.

     ii)  Introduced Script button.( Details )

    iii)  Changed the background colors, Font colors etc..

Step 9:

Click on Scripting button as shown below

It will open the below screen, add the below code and replace the session id's with your screen session id's for ( Full Name and Last Logon Date ). Save it.


***************************************************************************************************

var uname=session.findById("wnd[0]/usr/ctxtSUID_ST_BNAME-BNAME").text;

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

FM.setParameter("USERNAME",uname);

FM.requestResults(JSON.stringify(["ADDRESS","ADMINDATA","RETURN"]));

FM.send();

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

var admindata = JSON.parse(FM.getResult("ADMINDATA"));

session.findById("wnd[0]/usr/txtPersonas_1441340599673").text = address.FULLNAME;

session.findById("wnd[0]/usr/txtPersonas_1441340612163").text = admindata.TRDAT;

***********************************************************************************************


In the Script button “Details” , Import above script


Step 10:


Enter the user name and click on Details button, it will fetch the data using Remote Function module "BAPI_USER_GET_DETAIL" and populate the date in the respective fields



Note: This approach will also be help full for all other Remote Enabled Function Modules


We are done!


2 Comments