Hello Anshika, I'd recommend you post this question on a more appropriate community (for example: ABAP Development | SCN). And go for difference between type and like | SCN to see if it answers your question. We've used both ways for years without detecting any functional differences.
Cheers,
Michael