Hi Madhu,
First let me explain what I understood from the problem u posted...
You have a material having 5 operations out of which one operation (say second operation) is performed externally by vendor..
Now you have one production order... first operation done internally, second operation done by vendor and third operation done internally but after this you want to cancel this production order..
but when you gave the material to vendor for work you might have given that against a purchase order ( which created from PR which is generated during production order release)..
Now what issue are you facing when you are doing payment to the vendor through MIRO for this purchase order...can u share the issue..???
I request you to take the help of MM consultant on this...
Thanks
Kumar