Invoke VbScript option is not working for SAP

Hi All,

I am trying to invoke VBScript option for SAP automation but it is not working.
Please let me know how to invoke.

Regards,
Shreedhara

Why you are invoking VB code for SAP automation? Can you elaborate the issue you have @Shreedhara7

Hi Hareesh,

I am not invoking VBcode…

I am generating the VBScript by using SAP script recording option and invoking same script using “Invoke VBScript” option in UI path. When I run the script manually it is navigating from T code to excel export page and if same code run using invoke VBScript option nothing is happening.

Regards,
Shreedhara

Try using start process instead

1 Like

I have the same issue. The post from nithin_ramesh worked for me, so thank you very much! Still, I do not understand why the “Invoke VBScript” activity is not working properly. For me, it works fine as long as the vbs file exists within the Bot-Folder or, for example, on the desktop. But certain file paths seem not to work. Maybe someone has an idea, why this happens?

I found one issue with this. The start process activity doesn’t wait until script gets completed all its actions. The BOT moves on to other activities. Is there any other better way to do this?

Invoke VBScript activity can be used only inside the excel scope so I wonder how can I get this done.

Hi, you can use “Wait Element Vanish” after “Start Process” to overcome the issue you are facing

1 Like

Hi All,

This issue seems to be caused by spaces in the file path. Directories with spaces return exception “There is no file extension in …” whereas the same script but put in a directory without spaces is executed properly

image

the only difference between the two invokes is folder name (first without spaces and second with spaces). Configuration and content of both vbs files is the same.

First execution (no spaces) returns no output message and the procedure is successfully executed
Second one, on the other hand, returns the error I mentioned above

I tried to escape the characters (https://www.howtogeek.com/694949/how-to-escape-spaces-in-file-paths-on-the-windows-command-line/) but in all cases I get a similar exception (file cannot be located)

@loginerror, @Pablito - is there any bespoke way of escaping spaces for that activity?

activity: UiPath.Core.Activities.InvokeVBScript
parameter: VBScriptFileName

BR,
Filip

1 Like

Interesting find @Filip_C

It looks like our team already found it too and the fix is scheduled for the future releases. I’ll update this topic when it is fixed.

3 Likes

@loginerror Great news :slight_smile: Thanks!

Hi,
Thank you very much!
This solution solved my problem.

I believe this issue has been fixed in the latest 21.4 version of the System activity package.

2 Likes

The issue is still not closed i tried it today and faced the same issue. please fix it it would be of great help

Hi @abhide

Is your System activity package updated to the latest 21.4 version?

Sharing the experience, I have faced similar issues with this activity, in the version 2019 enterprise edition, used start process activity instead. system package has been improvised in latest release .

Hi @loginerror,

UiPath.System.Activities v21.4.0 does indeed seem to provide a fix for the issue :slight_smile:

BR,
Filip

1 Like