Calling R3 Transaction ,and coming back to portal from R3

HI ,

I have one requirement,i am calling r3 transaction from my webdynpro applicaion.

this is the exact scenario.

in my webdynpro appl there is one button,when user clicks that button that will call sapgui and it opens up MM01 transaction,user does there work and after completion of creation material no,etc they have to get back to the portal to do final steps.