you can try the Egg Trick if you want pokesavd 1-4th gen pokemon
that will make them legit
All you have to do is put the Egged Pokemon on your B/W save
and when its hatched you will have a legit pokemon but
do not give him egg moves and dont mess with the PID Generator
If you're trying to import Pokemon from another gen, they should be fine if they're legal and you actually send them through the pokeshifter..
Otherwise unless it's a legendary or something that can't be bred, I'd just make it say it's from your game and hatched from an egg.
I usually just edit one of my own hatched Pokemon so that it won't make any issues for me with incorrect info, like I'll open up a random modest hatched Pokemon and just edit it into say, modest Denchura, changing ability (but keeping correct class), IVs, moves, etc, but leaving PID, nature, and gender. I'm used to editing this way just for my own convenience in gen 4, since it's how I've always done things.
I haven't tried to import .pkm files from my 4th gen games yet so I'll try that later and see if I run into your issues with it.. It might have something to do with the pokeshifter changing the data when the pokemon is migrated, like it might change the catch location to "Pokeshifter" or something, sort of like how Pal Park gave them a new catch loc.