on 12-29-2015 3:47 PM
Hi experts,
I have a scripting problem when trying to retrieve data via RFC. I know how to get data from an export parameter (JSON.parse(rfc.getResult("Parameter Name")). But I want to retrieve data from a table parameter. In the community you can find an example with functional module 'BAPI_USER_GET_DETAIL'. Does anybody know how to get data from one of the table parameters (for example 'ACTIVITYGROUPS' or 'PROFILES')?
It would be great if someone could write a short answer.
Jan
How to call Remote Enabled ABAP Function Modules in Personas 3.0 - SAP Imagineering - SCN Wiki has an example of working with tables. It is using the table type EXPORT parameter but I'd expect the same to work with TABLES as well (just by referencing the TABLES parameter name). Did you try that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following script works fine for me to accept a user name from a screen input then read the first profile of the user and write it into a label on the screen:
var rfc=session.createRFC("BAPI_USER_GET_DETAIL");
var user=session.findById("wnd[0]/usr/txtPersonas_1452134771561").text;
rfc.setParameter("USERNAME", user);
rfc.requestResults('["PROFILES", "RETURN"]');
rfc.send();
var profs=JSON.parse(rfc.getResult("PROFILES"));
var profile=profs[0].BAPIPROF;
session.findById("wnd[0]/usr/lblPersonas_1452135391279").text=profile;
Handling TABLES parameters doesn't differ from the example of 'BAPI_USER_GET_DETAIL' where the EXPORTed table parameter is used.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.