Copy of MD07 transaction

Hello ,
  I have a program which is a copy of MD07 transaction  , while updating the program to ECC , we had to add new variables and subroutines as part of upgrade.
The program works well and gives the correct result , but when i try to exit the program , it gives an error SAP Workprocess restarted and exits the session.
This does not happend when i execute the standard transaction .
Any idea what can be the reason for this error and how to correct it.


Copy the transaction again. New version can have new changes. Then insert your modifications.
At this moment you have upgraded your transaction to ECC 6 and you shouldn't have problems