Doubt in SAP Automation

I have a process , how to loop that process
first, the gave downloaded the excel file with a code from sap and I have extracted a column in that excel file and I have removed duplicated in that and I have vlookup to get another column
I have to do this same process for 21 codes
how to loop it?

How should I keep this in SAP?

@anjani_priya

Can you explain are the steps on sap are same? Or differen?

If same loop through the array of codes of sap and have those steps in loop and download each file

Cheers

1.with **1 TB code the data should download after downloading we get a excel file we have add a new column as material description
2.we have to extract the material codes column in that data and paste in separate sheet
3.remove duplicates in it
4.with material codes(step2 sheet) by using **2 TB code we have to download another data and another excel file will come
5.we have to vlookup for 4th step excel sheet and 1st step sheet
6.this process should do for 21 TB codes how to do?

@anjani_priya

If the steps to download are different for each tb code then you cannot use loop to download…it ahould be separate…if steps are same…then use loop with array if tb codes

Then inside loop navigate to tb code,perform clicks to reach report,download and then excel activities as needed

Cheers

steps are same but the tb codes and file paths are diff but steps are same for all the gls

@anjani_priya

Then create a dictionary varible with key as tb code and value as the path to save

Then use for loop with dict.keys where dict is the dictionary

Inside loop currentitem gives the t code and dict(currentitem).ToString gives the pth

Cheers

I cant understand can you send the sample code

@anjani_priya

What you are unable to understand in this? For looping i can send…for sap part you need to figure the seectors and all as sap access is not present

Cheers

how to declare path in read range after creating it

@anjani_priya

path isnt it constant?
only the name changes right?

cheers