This instruction

HSERIN 5000,READ_SMS,[WAIT("AT+CMGR=1"),STR Sedata\13]'Check OK reply, wait 5sec max.

reads in 13 characters

this is what you should have

HSERIN...