Will flashing other region's ROM unlock GT-I9515? I bought a Samsung S4 GT-I9515 from Saudi Arabia. But returning to my country found that this phone is locked and I don not know of any unlock code. It is also not possible to contact the seller in KSA.

Now I'm thinking if flashing stock ROM from other country will solve the issue.

Any help appreciated. Even any known unlocking technique.
Hi flash the phone is not the solution to unlock your device, flash and unlock are different things.
In case you like to flash your phone the only thing that you need to be careful is if the rom that you choose change or replace the modem, in this case you need to check if the rom has the supported bands for your country, The Samsung S4 GT-I9515 supports by hardware the following bands:
GSM:
850, 900, 1800, 1900 MHz
UMTS:
850, 900, 1900, 2100 MHz
FDD LTE:
800 (band 20), 850 (band 5), 900 (band 8), 1800 (band 3), 2100 (band 1), 2600 (band 7) MHz
Data:
LTE, HSUPA, UMTS, EDGE, GPRS
You could check the bands/networks to your country in this link:
http://www.worldtimezone.com/gsm.html
However if you like to unlock the phone be careful with software methods because you can loss your imei or brick your phone (all software methods need root the phone).
You could check this this link on ebay to unlock your phone, unlock by imei its a more safe solution.
http://www.ebay.com/itm/INSTANT-REMOTE-UNLOCK-FOR-SAMSUNG-GALAXY-S5-G900A-G900T-G900T1-AT-T-TMOBILE-/121748816957?hash=item1c58cb843d
I hope this help you to resolve your question.