Disney's planned deal to acquire many parts of Twenty-First Century Fox actually solves the media giant's problems with sports network ESPN, CNBC's Jim Cramer said Thursday.

Disney has suffered from some subscriber losses at ESPN as consumers switch to skinnier cable bundles. The company intends to launch a separate streaming service for ESPN in 2018.

"It gets rid of the ESPN problem," Cramer said on "Squawk on the Street." "This is a subscriber story and we've had subscriber growth go down, which was ESPN. Suddenly, you put all the subscriptions together and they can show up numbers."