on 01-22-2015 4:36 PM
Hi Guys,
I'm trying to get a simple data into my Personas textfield using RFC.
Same as showen in the link below:
How to use RFCs in Personas 3.0 - SAP Imagineering - SCN Wiki
var rfc = session.createRFC("BAPI_USER_GET_DETAIL", "");
rfc.setParameter("USERNAME", "XXXXXX");
rfc.requestResults(JSON.stringify(["ADDRESS", "RETURN"]));
rfc.send();
var address = JSON.parse(rfc.getResult("ADDRESS"));
session.utils.log(address.FULLNAME);
I'm getting an error when excuting my script
In Scripting editor session.createRFC is not found in the list of session.(objetcs)
Error during script execution:
TypeError: undefined is not a function
at eval (eval at <anonymous>
Can any one help me ?
Many thanks,
Medix
hi Mehdi,
Could you make sure you have implemented all the notes mentioned in 2050325.
Calling RFC was introduced in one of the last 2 notes I guess.
And after implementing all the notes, if it still doesn't work for you, please create a css with us.
Thanks,
Sushant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suchant,
Thanks a lot, I implemented the OSS notes and I have the Calling RFC now
But I still have an error when executing my script ( Statement rfc.send() is anknown i guess).
Error during script execution:
Error: RestGui Batch Request Error:
Step 1 ({"get":"personas/state/xml/PERSONAS/RFC"}) failed: -1002 [expected tags: 'command']
I hope you can help me.
Many thanks
Mehdi
Hi Sushant,
I am facing the same problem with Personas and RFC.
Moreover cannot find the note you have mentioned above . i.e. 2050325
Can you help?
Thankyou,
Umesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
var usrName = session.findById("wnd[0]/usr/txtPersonas_1452796008773").text="USER01";
var rfc=session.createRFC("BAPI_USER_GET_DETAIL","");
rfc.requestResults(JSON.stringify(["ADDRESS","RETURN"]));
rfc.send();
session.utils.log("FIRST STEP");
var address=JSON.parse(rfc.getResult("ADDRESS"));
session.utils.log("second STEP");
session.findById("wnd[0]/usr/lblPersonas_1453926916445").text=ADDRESS.FULLNAME;
you have error in 2nd line
var rfc=session.createRFC("BAPI_USER_GET_DETAIL","");
should be
var rfc=session.createRFC("BAPI_USER_GET_DETAIL");
only 1 argument. This original discussion is an year old. Make sure you see the latest examples from our wiki page
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.