As you have neither Received nor Invoiced your PO, then I believe you should archive it, change the quantities to 0 (or may be delete the PO itself) and then run the planning worksheet.
By just adding a boolean field in Purchase Header, the system doesn’t take care of its cancellation in Planning worksheet, you should consider doing customization or follow the first approach.
Why I am not deleting the purchase order , because client wants to know the how many purchase orders cancelled in a month.
Second thing I am requesting the experts where I have to write the code or any functionality to exclude that purchase orders which contain the check mark.
I feel your modification for the “cancelling” of the purchase order is only half processed, by the nature of the system you have to remove it from planning. If you are trying to capture cancelled purchase orders then downdate the quantity, then planning would pick it up, if you are tracking original against ordered then it depends on this modification, otherwise you need to modify the planning engine, which is more complicated - talk to your developers.
Your boolean is on the order header? I would put it also on the lines. Just to begin.
Both in Item table and in Vendor table there are flowfields based on Purchase Order Lines which should be modified so that lines of deleted orders can be excluded.
That will solve the most of your problems, although there might be here and there some code calculating quantities and values on prurchase orders going directly through the PO lines… you need to check the code behind the planning work sheet for that - I did some time ago, but I don’t remember the details, sorry.