‎2007 Apr 03 6:26 PM
I am executing a FM from XI to create a Material with several languages in the form of ES, EN, FR and so on, what is the type that I have to use in the FM for this languages? I use a simple Char 2 type and does not work from XI but If I use SPRAS works fine, the problem is SPRAS is a Char 1 type so the system get confuse with for instance PL and PR.
‎2007 Apr 03 6:45 PM
Hi
The language in R3 is a field of 1 char, so you have to use a data type like SPRAS, if the system gets confuse I believe you need a routine to translate the language symbols from 2 char to 1 char.
In R3 there're the table T002: here it can find both symbols: 1 char and 2 char.
U can use the fm CONVERSION_EXIT_ISOLA_INPUT for translation:
DATA: LANGUAGE_IN(2),
LANGUAGE_OUT(1).
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
EXPORTING
INPUT = LANGUAGE_IN
IMPORTING
OUTPUT = LANGUAGE_OUT
EXCEPTIONS
UNKNOWN_LANGUAGE = 1
OTHERS = 2.Max
‎2007 Apr 03 6:43 PM
The data element spras has a conversion routine attached to it. This means that what the user sees and what the system actually stores in a table are sometimes different.
Here is how you can see what should actually be passed into SPRAS. In your SAP system, do a table browse (SE16) on T002.
If you see 2 characters in the SPRAS field for example PL or PR, it means that SAP is converting the true 1 character value to the 2 character value. Go to the Settings->User Parameters menu option. Here you will see a box called "Format" with a checkbox for Check Conversion Exits. Un-Check This checkbox then go back and look at the SPRAS field. This should be converted to the 1 character value. This is probably what you should use.
Best Regards,
Chris H.
‎2007 Apr 03 6:45 PM
Hi
The language in R3 is a field of 1 char, so you have to use a data type like SPRAS, if the system gets confuse I believe you need a routine to translate the language symbols from 2 char to 1 char.
In R3 there're the table T002: here it can find both symbols: 1 char and 2 char.
U can use the fm CONVERSION_EXIT_ISOLA_INPUT for translation:
DATA: LANGUAGE_IN(2),
LANGUAGE_OUT(1).
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
EXPORTING
INPUT = LANGUAGE_IN
IMPORTING
OUTPUT = LANGUAGE_OUT
EXCEPTIONS
UNKNOWN_LANGUAGE = 1
OTHERS = 2.Max