UiPath+SAP+Excel…quite unimaginable issue found

Hi All,

I am using UiPath (2023.8.0 Community Edition) to extract SAP data to Excel repeatedly.

My case is to use RPA job repeatedly to extract each SKU BOM data from SAP for 800 SKU, that means the RPA job will be run 800 times. And so does SAP login, process, close for 800 times as well.

The issue what I have faced is quite unimaginable. After running around 450 SKUs successfully (Ps. it took around 6 hours,) , the RPA job still runs successfully for the other SKUs.
And SAP so does as, but the Excel DID NOT BE OPEN during SAP execution, so nothing saved. (Ps. None of exception message popup.)

Then the next term RPA job runs as well, and of course, Excel did not be open also during SAP running, and nothing saved too.
The same conditions keep till the remaining SKU has been run finished.

Is here anyone had ever faced the same problem before? And how to resolve it?

Hi @Caesar

Is Excel file not opening during the execution is the main issue?

If you’re running the SAP extraction on a single client, it might not be necessary to log in repeatedly for each SKU extraction.

Also can you share how you handle the Excel part of the workflow. Share the code snippets or zip.

Hi AJ_Ask,

Thanks for your inputs!

This issue is about during UiPath calls SAP job execution, on the SAP running client screen, I can see Excel file is exactly opened for previous 450 SKU’s BOM data extraction, but not see Excel opened for the other 350 SKUs.

That means that there are 450 excel files saved successfully, but other remaining 350 SKU not.

I use SAP recorded script VBS file to execute SAP SKU BOM query, and then export data to Excel file for each SKU repeatedly.

I am interested in this issue’s root cause, but no ideas about which application causes it, since the job is related to UiPath → SAP → Excel which runs in Window OS PC environment.

Did you check for the other 350 SKU. Is it working fine manually? Try to run only failed cases once.

Running the job repeatedly like this is not a good design. It sounds like it’s just getting choked up because you’re opening/closing Excel so many times. When it stops working how many Excel processes do you see in Task Manager?

Yes, such 350 SKU BOM data were downloaded to Excel files one by one successfully after I manually re-turned on the UiPath job. But in the first run, they were not.

Is there any job run times or time resource limitation controlled by application, UiPath, SAP, Excel, or Window system? That’s why I mean it’s unimaginable.

Hi Paul,

Thanks for your comments.

I use Close Window activity to close SAP, Excel window, and Kill Process activity to kill SAP, script VBS as well. So, not found any Excel process in Task Manager after each time job run done.

You really should have an Excel Process Scope with Use Excel File inside it, then your SAP loop inside that to pull each set of data and Write Range to Excel. That way you only need one Job run, it’s more efficient, and you shouldn’t have these other problems.

Added one more point, , I only put such 350 SKU to be processed in the second term UiPath job.

Followings are the steps of Excel Scope:

Step #1, Firstly, yes, there is Excel Process Scope with one Excel file (let’s name it as SKU.xlsx) that lists such 800 SKU part number only.

Step #2, such 800 SKU is read by Read Range in Excel Process Scope

Step #3, use For Each Row to get above SKU number one by one,

Step #4, use Invoke method to call another UiPath .xaml function to handle SAP BOM data download to Excel file (named BOM of SKU Number#001.xlsx~BOM of SKU Number#800.xlsx).
The BOM Excel file is handled during SAP executes data export.
In the end of Step #4, using Close Window to close SAP, Excel application and Kill Process to kill SAP, VBS.

Step #5, repeat Step#2 ~ #4 till all of 800 SKU are processed.

Corrected Step #5:
Step #5, repeat Step#3 ~ #4 till all of 800 SKU are processed.

By means of above steps, if every thing goes well, there will be 800 BOM data Excel files are generated sequentially, separately, and independently.

But actually, only the first 450 SKUs BOM are exported to 450 Excel files successfully, other 350 SKUs are not in the one time UiPath job run shoot.

After that, I just put the remaining 350 SKU into the SKU.xlsx, then rerun UiPath job again. As expected, everything goes well, such 350 Excel files are generated.

The question is what’s the root cause, and could I get all of such 800 Excel files, even more in one UiPath job run shoot?

Thanks for all of your inputs.