"When I debugged the workflow using SWUS , the code works fine until it hits the function module above and then stops."
When you say 'stops', do you mean it shortdumps right there, or it returns an exception?
If so, what does the dump/exception say?
Did you try debugging into the function module?
cheers
Paul