There are different opinions regarding this matter. Ideally, therefore, all cans which will be needed on Shabbat should be opened prior to Shabbat — thus avoiding a questionable situation.

The main concern is that opening the can creates a useable receptacle. Such an act could conceivably fall under the prohibition of tikkun keli, applying the finishing touches in the formation of a utensil. The key therefore is to avoid creating a receptacle.

Therefore, many people will simultaneously open the top of the can while puncturing its bottom. This prevents the container from becoming a useful receptacle. (If using this technique, be sure to have another container handy to catch the liquids which will be spilling from the can.)

Conversely, not removing the entire top of the can also achieves the same goal. The sharp protruding top precludes using the can in a safe manner, making it an "unworthy" vessel.

I hope that I've been helpful today.

Yours truly,

Rabbi Menachem Posner