We are changing some segments of an Delivery Idoc. After changing, the system is creating an new Idoc with the values defined in the original Idoc and is changing the status of original Idoc from 30 to 32. Then again we are changing the status of Idoc to 30 with the help of function module "IDOC_STATUS_WRITE_TO_DATABASE". Now, while submitting the original Idoc in WE14, a pop-up is coming with "1 Idoc Selected" but status is remaining 30 only. But since we have transferred this Idoc to the port so status should have changed to 03 which is not happening.
Please suggest me a solution for this.