Are you saying the whole string has to be 12 or 13 characters long including the leading whitespace? This will work in most regex flavors:
^(?=.{12,13}$)\s*[A-Za-z0-9]+$
I'm not sure about ABAP though. Many of the search hits I've found suggest that it supports lookaheads, but if you're really using POSIX standard regexes, this won't work. You would probably have to do the length check in a separate test.
UPDATE: To prevent a match of all zeroes, you'll need to add another lookahead:
^(?=.{12,13}$)(?!0+$)\s*[A-Za-z0-9]+$
UPDATE 2: It just occurred to me that you probably don't want strings like " 000000000"
-- i.e., all zeroes plus leading spaces. This regex will cover that:
^(?=.{12,13}$)(?!\s*0+$)\s*[A-Za-z0-9]+$