YOU SAID:
and that's when he knew he had pooped his pants
INTO JAPANESE
その時、彼は自分のズボンにうんちをしたことを知った
BACK INTO ENGLISH
That's when he knew he pooped in his pants
INTO JAPANESE
その時、彼は自分がズボンの中にうんちをしたことを知った
BACK INTO ENGLISH
That's when he knew he pooped in his pants
That didn't even make that much sense in English.