How to choose a specific document in a folder through SAP

In SAP I have to select a specific XML document that has to be read in. If I click on the blue circled field, the corresponding folder opens, where I need to choose the specific xml-file from.

The specific folder with the xml-files:

Now I want to select the yellow IBAN number first (double click) and then read it in and then the blue one. How can I implement this in UiPath? The two IBAN come from an Excel File (see below)
Means: Select the xml file in the folder from Company ABC with IBAN NL38RAB07774382046 from the Excel file.

Excel File with the IBAN I need to choose

image
Many Thanks in advance

@morseil

If you have the direct access to the folder, use directory.GetFiles(“YourDirectoryPath”)

From there you can use For Each loop to check if it contains the fileName like

Use If Condition and write as Item.ToString.Contains(Dt.Rows(3).Item(“IBAN”)).Tostring

If that satisfies then you can use in Then as Path.GetFullPath(Item.String) and put a break activity

Hope this may help you

Thanks,
Srini

@Srini84

Thanks a lot for your input! I will try that out

Hi @Srini84

May I ask you again…I did the following:

  1. Read Range Activity with the excel file containing the IBAN (header IBAN, sheet name “IBAN”-> dt_IBAN
  2. Assign arrayFiles = Directory.GetFiles(str_DirectoryPath)
  3. For each activity: For each item in arrayFiles Item
    3.1 Find matching Patterns → I get the IBAN Number from the file path
    How can I save each IBAN from the arrayFiles now and check for each IBAN in dt_IBAN, if the
    the IBAN from the file path is contained in the dt_IBAN. And if it is contained in the file path, choose
    the path.

thanks in advance

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