The U-Boot deckguns (8.8 and 10.5 cm) were modified guns, developed pre-WWI for surface units to defend against torpedo-boats.
They were capable to use the HE as the AP and SS shells. Well, for a U-Boot there was no use for AP and SS ammunition, but the gun could have shot them.
Some misunderstanding may be caused in translation of "can/could".