in store procedure you have to create a temp table and in temp table you to have to get all the row .
Sample code..
create table #temp
{
APF_FRIEND_ID int
}
insert into #temp
SELECT APF_FRIEND_ID FROM AS_PM_TBL_POST_WALL_HANDLER WHERE APR_PL_ID=@APR_PL_ID
you can get all the row from the #temp table