SAP issues


I am doing SAP automation. I am login into sap system and performing some some transaction. When Transaction executed it will generate a report. This report if it having data then it will take 5 mins to generate and if report dont have have data then it will take 2 mins to display that it dont have data. I have to perform the remaining transaction based on report output. How I can acheive it ? What activity Should I use ?

Please help ?