The function of B4GALNT2 (beta-1,4-N-acetyl-galactosaminyltransferase 2 (SID blood group), ENSG00000167080) is as follows. Beta-1,4 N-acetylgalactosaminyltransferase involved in the biosynthesis of Sd(a) histo-blood group antigen. Catalyzes the transfer of N-acetylgalactosamine (GalNAc) group in a beta-1,4-linkage from UDP- GalNAc to the galactose residue of NeuAcalpha2->3Gal-R to form Sd(a) glycan epitope GalNAcbeta1->4(NeuAcalpha2->3)Gal-R. The Sd(a) epitope is carried in O- and N-linked glycoproteins and glycolipids, including O-linked core 1 structures on GYPA/glycophorin, SLC4A1 and SLC29A1 in erythrocytes, N-linked glycans attached to the Tamm-Horsfall glycoprotein UMOD/uromodulin in renal fluids, O-linked core 3 glycans on mucins in colon and neolactosides in gastric mucosa (PubMed:12678917, PubMed:14688233, PubMed:16024623, PubMed:35409292). Confers protection against influenza A virus strains that attach to NeuAcalpha2->3-carrying host receptors. Modifies N-glycan chains on host receptors and prevents virus entry into cells (PubMed:28813663). {ECO:0000269|PubMed:12678917, ECO:0000269|PubMed:14688233, ECO:0000269|PubMed:16024623, ECO:0000269|PubMed:28813663, ECO:0000269|PubMed:35409292}.