on 08-10-2020 11:28 AM
Hi Gurus
I was trying to give the user and password details in a JSON file and placed it in Local folder of Desktop Studio as mentioned in the link here. https://blogs.sap.com/2019/07/21/automate-business-processes-using-intelligent-robotics-process-auto...
I am facing error
[fso.file.read] : File could not be opened.
Also another issue I am facing is that , the variable is not being able to set through this value.
GLOBAL.step({ pSAP_management: function(ev, sc, st) {
var rootData = sc.data;
ctx.workflow('SAP logon', 'beb12d5f-05be-4c80-a267-0bbe6aedc283') ;
// Wait until the Page loads
SAPLogon760.pSAP.wait(function(ev) {
SAPLogon760.pSAP.edClient.set(rootData.SAPLogon760Data.pSAPData.edClient);
SAPLogon760.pSAP.edUser.set(rootData.SAPLogon760Data.pSAPData.edUser);
SAPLogon760.pSAP.oPassword.set(rootData.SAPLogon760Data.pSAPData.oPassword);
SAPLogon760.pSAP.keyStroke(e.SAPScripting.key._Enter_);
sc.endStep(); // pTransportOrganizer_m
return;
});
}});
The code is not going inside this and not setting the variable edClent , user and password. Although the variables rootdata.... are being filled correctly with proper data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi shrinidhi.k
The format is correct , when i am trying to direct access the file, it is working fine.
var sParams = ctx.fso.file.read('******\\local\\user.json') ;
var oParams = JSON.parse(sParams);
Otherwise on using
var sPath = ctx.options.path.local + "\\user.json";
var sParams = ctx.fso.file.read(sPath) ;
This is not working and gives error as mentioned above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please use the following syntax:
ctx.json.parse(ctx.resources.loadHtml(ctx.fso.file.getParentFolderName(ctx.options.path.resources) + "\\local\\Config.json"));
Check the JSON is of right format and check the name/path of the file.
Best Regards,
Jai Vignesh R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi jai.vignesh.r
When i am trying to direct access the file, it is working fine.
var sParams = ctx.fso.file.read('******\\local\\user.json') ;
var oParams = JSON.parse(sParams);
Otherwise on using
var sPath = ctx.options.path.local + "\\user.json";
var sParams = ctx.fso.file.read(sPath) ;
This is not working and gives error as mentioned above.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.