arduino UNO and Arduino mega differences in program

do any have same problems

Nope. I write code in such a ways that it utilizes ONLY the hardware and software that is actually available on the platform it is running on.

and solve it ?

Sure. See above.

If you have some code that doesn't work on both devices, then there is something wrong with your code. POST IT!

I'm going to guess, though, that you are using SoftwareSerial, and haven't bothered to look at the reference page to see that SoftwareSerial can only work on some pins on the Mega. I'm also going to guess that you haven't figured out that the Mega has 4 hardware serial ports, so the necessity of using SoftwareSerial is probably non-existent.