Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding SAP internal function 'CHECK_LOCALE'

com_2018
Participant
0 Likes
613

Dear Experts,

I run program 'RSCPINST' for activing a language. when I press the active button, the system give me error message 'Missing locales or unsupported combinations are found.'.

So I debug this program. I find the point of occuring error:

call 'CHECK_LOCALE'
     id 'LOCALE'     field lloc_wa-locale
     id 'ERRMSG'     field lerrmsg
     id 'MODE'       field 'A'
     id 'CODEPAGE'   field lcp
     id 'ERRTAB'     field lerrtab.
 
   lloc_wa-status = sy-subrc.
   modify ploc_itab from lloc_wa.

Because sy-subrc = 40, it means 'set locale failed'. So I can't active the language.

How to debug this function ''CHECK_LOCALE'' for finding the reason?

I will reward points for your help.

Colin.

Dear Experts,

I run program 'RSCPINST' for activing a language. when I press the active button, the system give me error message 'Missing locales or unsupported combinations are found.'.

So I debug this program. I find the point of occuring error:

call 'CHECK_LOCALE'
     id 'LOCALE'     field lloc_wa-locale
     id 'ERRMSG'     field lerrmsg
     id 'MODE'       field 'A'
     id 'CODEPAGE'   field lcp
     id 'ERRTAB'     field lerrtab.
 
   lloc_wa-status = sy-subrc.
   modify ploc_itab from lloc_wa.

Because sy-subrc = 40, it means 'set locale failed'. So I can't active the language.

How to debug this function ''CHECK_LOCALE'' for finding the reason?

I will reward points for your help.

Colin.

3 REPLIES 3
Read only

Former Member
0 Likes
579

Hi,

check this, the message set locale failed is here and the status is set as 40.

loop at ploc into ploc_wa where as = ml_wa-server.
      ltabix = sy-tabix.
      read table lloc_itab into lloc_wa
           with key
                locale   = ploc_wa-locale.
      ploc_wa-status = lloc_wa-status.
      modify ploc from ploc_wa index ltabix.
   if lloc_wa-status = 40.           " set locale failed.
        plocale_ok = 'N'.
      endif.
    endloop.
    commit work.                      " prevent time out.
  endloop.

reward if helpful

raam

Read only

0 Likes
579

Hi,

Yes, I've found these codes,too.

In fact, I want to know why sy-subrc = 40.

Thanks,

Colin.

Read only

0 Likes
579

Hi,

I've solved this question.