You can follow the below flow :
Look up activity : Select * from abc (Note: this should contain less than 5k rows as that is the limitation of lookup activity)
Then use this output as input to the for each activity.
Within for each activity :
use script activity : to trigger the stored procedure and you can pass item().tablename assuming tablename is the columnname of your table abc ; basically it would pass the table names value dynamically for every iteration
then use if activity to test the script activity output and if true , use Web activity to trigger the API