on 2023 Feb 20 7:52 AM
Hi ,
I am new to SAP Screen Persona and I am trying to fetch values using RFC . For this I was trying some examples given in blog - sample . I did all the necessary checks and wrote the same piece of code given in the blog for tcode SU01 . But I am getting error . I will share some screenshots for clarity .
I am using the exact same code but its giving error for me . Can anyone please help me with it . As what to do in this case .
Its giving error line no.4 as - Argument of type 'string' is not assignable to parameter of type 'object'.
Request clarification before answering.
Not sure why yours wouldn't work, maybe move the field value retrieval above the RFC processing?
I just used this on IW32 on the Control tab to get the detail from last changed by.
var username = session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/tabsTS_1100/tabpVWPA/ssubSUB_AUFTRAG:SAPLCOIH:1140/txtCAUFVD-AENAM").text;
var oRFC = session.createRFC("BAPI_USER_GET_DETAIL");
oRFC.setParameter("USERNAME", username);
oRFC.setParameter("RETURN", [{"TYPE":"","ID":"","NUMBER":"000","MESSAGE":"","LOG_NO":"","LOG_MSG_NO":"000000","MESSAGE_V1":"","MESSAGE_V2":"","MESSAGE_V3":"","MESSAGE_V4":"","PARAMETER":"","ROW":0,"FIELD":"","SYSTEM":"0000000000"}]);
oRFC.requestResults(["ADDRESS","RETURN"]);
oRFC.send();
var _ADDRESS = oRFC.getResultObject("ADDRESS");
var _RETURN = oRFC.getResultObject("RETURN");
session.utils.log(_ADDRESS.FULLNAME);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
22 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.