I didn't get it when i beat the E4 so when and where do i get it
Go see Prof. Rowan in his lab once you have seen every Pokémon in the Sinnoh Pokédex to receive the National Pokédex.
You have to have gotten every Pokemon in the Sinnoh Dex and show it to Prof. Rowan.
You need to have seen every Pokémon in the Sinnoh region. This might be a problem if you skipped some trainer/gym trainer battles (Gym trainer meaning the people you fight before the gym leader)