Melt the butter in a 5 quart pot set over medium heat. Add the onion and cook until soft, about 5 minutes. Add the corned beef and cook another 5 minutes, or until the edges begin to curl. Stir in the potatoes and cook 2 minutes. Sprinkle in the flour; stir well.
Stir in the stock and sauerkraut; bring to a simmer. Simmer for 15 minutes, or until the potatoes are cooked through. Remove from heat.
Slowly stir in the sour cream and cheese. Top with green onions.