SAP Download Data

Hi guys,

I would like to loop through all those spool numbers (and performing a download after).

So basically:
tick first spool number ->(…do download…)
tick second spool number ->(…do download…)
tick third spool number (…do download…)
…do that as long as there are spool-numbers… (please check the sceenshot)

Since the count of Spool-Numbers is different from time to time, how can I handle that I download all the spools?

Thank you & Best,
Markus

@Markus3003

Hello Markus,
could this be an option for your?

  1. Select all spools.

  2. Select export as text.

  3. Now you can find in the …\Documents\SAP\SAPGUI directory for each spool an own file.

This alternative approach would simplify the procedure considerably.

Best regards
Stefan

1 Like

Hi @StefanSchnell,

Yes indeed that is way easier and ist works.
Thank you!

Now I would like to search a name i.g. “Schmitt” in each downloaded PDF and if the name exists the file should be moved to another folder and if the name does not exists the PDF should be deleted for example.

Any ideas how to start here?

Thank you very much

Markus

1 Like

@Markus3003

Hello Markus,
in my opinion there are two ways to realize your requirement:

  1. Install the additional UiPath.PDF.Activities. Here you have the possibility to Read PDF Text. Loop over the PDF files in your directory, read the text from the PDF file and search via Regex with Matches Activity to find your text. If the text is found move the PDF file to your target directory.

  2. Download both formats, TXT and PDF. Loop over the TXT files in your directory, load the text from the TXT file, search via Regex with Matches Activity to find your text. If the text is found you can take the spool number from the file name and find the PDF file that also contains the spool number. Move the PDF file to your target directory and delete the TXT file.

Best regards
Stefan

1 Like

@StefanSchnell

Hi Stefan,

thank you for explanation. I would go for option 1. But could you give a few more hints how to start here.

I installed UiPath.PDF.Activities and I have all the downloaded spools in a directory.

How can I loop over them? Could you be so kind and tell me which activities I would need.
Thank you so much!

Best Markus

I tried it like that, but already got an error

image

@Markus3003 - For Each type should be string…

Inside the For Each add write Line and just print ‘file’ and check whether its reading all the files…

Looks like this is off the topic from what you initially enquired, could you please open a new topic and discuss about this…

Kindly close this thread, if you already received a solution from Stefan.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.