Can one's primary motivation be learning, instead of research, if he is applying for a masters program (instead of a PhD program)? I am applying for masters in computer science programs in North America. In my statement of purpose, I am planning to talk about broadening my knowledge about the field and applying this knowledge to other specific academic fields, as well as learning how to do research in computer science.

But I am not sure if this is a good idea for writing a statement of purpose. Had this been a PhD application, I am sure that this would be a bad idea, since PhD is all about research and in the statement of purpose for a PhD application, you should talk about your potential for valuable research by showing your previous research experiences, etc.

However, I am applying for masters and I don't have any proper previous research experience. Hence, I cannot talk about my potential to do research by showing my previous research experiences (since I don't have any). Hence, I am planning to talk about my ambition to broaden my knowledge about the field and apply this knowledge to other specific fields in academia.

Would this be a good idea to put in a statement of purpose that will stand out? Or should I better talk more about doing research?
Whatever excites you about the coursework you'll be taking, write about that.  There are many masters programs that don't involve doing original research.