Set Language for MESSAGE statement
up vote
0
down vote
favorite
I access my coding in batch mode with a set system user via RFC, whose logon language is set to 'DE'. In case of an error, I use a message statement, so the application on the other system can handle this error.
MESSAGE i001(ztest) INTO DATA(e_error).
The message is translated in several languages. Depending on the language of the user on the other system, I need the message translated. But regardless of changing sy-langu or using SET (LOCALE) LANGUAGE statement, the message is still returned in german, the system users original setting (As stated in keyword documentation 'If the text environment is set using the statement SET LOCALE, this is ignored by the language in which the message is displayed. '
Before this change we used text elements, with which it worked.
Is it possible to change the language the MESSAGE statement uses while runtime?
sap abap
add a comment |
up vote
0
down vote
favorite
I access my coding in batch mode with a set system user via RFC, whose logon language is set to 'DE'. In case of an error, I use a message statement, so the application on the other system can handle this error.
MESSAGE i001(ztest) INTO DATA(e_error).
The message is translated in several languages. Depending on the language of the user on the other system, I need the message translated. But regardless of changing sy-langu or using SET (LOCALE) LANGUAGE statement, the message is still returned in german, the system users original setting (As stated in keyword documentation 'If the text environment is set using the statement SET LOCALE, this is ignored by the language in which the message is displayed. '
Before this change we used text elements, with which it worked.
Is it possible to change the language the MESSAGE statement uses while runtime?
sap abap
i had a similar case some time ago, are you able to set the batch-users language via SU01, logon-language or adress-language? this influences your MESSAGE's language but I also did not find this satisfying.
– zYrEx
Nov 8 at 14:52
My problem is that I am bound to the user on the other system. I don't think I'm able (or rather allowed) to change the language of the user itself for every single call of my module.
– Tassimmo
Nov 8 at 14:55
yeah, I was neither allowed to change it. eventually you have to translate the messages and transport them to the other system ..
– zYrEx
Nov 8 at 14:57
1
You say you want to enable the calling machine react to this message? Shouldn't you then rather send an error code (e.g. message class and number) instead of translated free text?
– Florian
Nov 8 at 15:57
The message I'm getting is the error message shown to the user on the other system.
– Tassimmo
Nov 9 at 6:36
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I access my coding in batch mode with a set system user via RFC, whose logon language is set to 'DE'. In case of an error, I use a message statement, so the application on the other system can handle this error.
MESSAGE i001(ztest) INTO DATA(e_error).
The message is translated in several languages. Depending on the language of the user on the other system, I need the message translated. But regardless of changing sy-langu or using SET (LOCALE) LANGUAGE statement, the message is still returned in german, the system users original setting (As stated in keyword documentation 'If the text environment is set using the statement SET LOCALE, this is ignored by the language in which the message is displayed. '
Before this change we used text elements, with which it worked.
Is it possible to change the language the MESSAGE statement uses while runtime?
sap abap
I access my coding in batch mode with a set system user via RFC, whose logon language is set to 'DE'. In case of an error, I use a message statement, so the application on the other system can handle this error.
MESSAGE i001(ztest) INTO DATA(e_error).
The message is translated in several languages. Depending on the language of the user on the other system, I need the message translated. But regardless of changing sy-langu or using SET (LOCALE) LANGUAGE statement, the message is still returned in german, the system users original setting (As stated in keyword documentation 'If the text environment is set using the statement SET LOCALE, this is ignored by the language in which the message is displayed. '
Before this change we used text elements, with which it worked.
Is it possible to change the language the MESSAGE statement uses while runtime?
sap abap
sap abap
asked Nov 8 at 14:47
Tassimmo
133
133
i had a similar case some time ago, are you able to set the batch-users language via SU01, logon-language or adress-language? this influences your MESSAGE's language but I also did not find this satisfying.
– zYrEx
Nov 8 at 14:52
My problem is that I am bound to the user on the other system. I don't think I'm able (or rather allowed) to change the language of the user itself for every single call of my module.
– Tassimmo
Nov 8 at 14:55
yeah, I was neither allowed to change it. eventually you have to translate the messages and transport them to the other system ..
– zYrEx
Nov 8 at 14:57
1
You say you want to enable the calling machine react to this message? Shouldn't you then rather send an error code (e.g. message class and number) instead of translated free text?
– Florian
Nov 8 at 15:57
The message I'm getting is the error message shown to the user on the other system.
– Tassimmo
Nov 9 at 6:36
add a comment |
i had a similar case some time ago, are you able to set the batch-users language via SU01, logon-language or adress-language? this influences your MESSAGE's language but I also did not find this satisfying.
– zYrEx
Nov 8 at 14:52
My problem is that I am bound to the user on the other system. I don't think I'm able (or rather allowed) to change the language of the user itself for every single call of my module.
– Tassimmo
Nov 8 at 14:55
yeah, I was neither allowed to change it. eventually you have to translate the messages and transport them to the other system ..
– zYrEx
Nov 8 at 14:57
1
You say you want to enable the calling machine react to this message? Shouldn't you then rather send an error code (e.g. message class and number) instead of translated free text?
– Florian
Nov 8 at 15:57
The message I'm getting is the error message shown to the user on the other system.
– Tassimmo
Nov 9 at 6:36
i had a similar case some time ago, are you able to set the batch-users language via SU01, logon-language or adress-language? this influences your MESSAGE's language but I also did not find this satisfying.
– zYrEx
Nov 8 at 14:52
i had a similar case some time ago, are you able to set the batch-users language via SU01, logon-language or adress-language? this influences your MESSAGE's language but I also did not find this satisfying.
– zYrEx
Nov 8 at 14:52
My problem is that I am bound to the user on the other system. I don't think I'm able (or rather allowed) to change the language of the user itself for every single call of my module.
– Tassimmo
Nov 8 at 14:55
My problem is that I am bound to the user on the other system. I don't think I'm able (or rather allowed) to change the language of the user itself for every single call of my module.
– Tassimmo
Nov 8 at 14:55
yeah, I was neither allowed to change it. eventually you have to translate the messages and transport them to the other system ..
– zYrEx
Nov 8 at 14:57
yeah, I was neither allowed to change it. eventually you have to translate the messages and transport them to the other system ..
– zYrEx
Nov 8 at 14:57
1
1
You say you want to enable the calling machine react to this message? Shouldn't you then rather send an error code (e.g. message class and number) instead of translated free text?
– Florian
Nov 8 at 15:57
You say you want to enable the calling machine react to this message? Shouldn't you then rather send an error code (e.g. message class and number) instead of translated free text?
– Florian
Nov 8 at 15:57
The message I'm getting is the error message shown to the user on the other system.
– Tassimmo
Nov 9 at 6:36
The message I'm getting is the error message shown to the user on the other system.
– Tassimmo
Nov 9 at 6:36
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
A second possible workaround is to :
- make your RFC-enabled function module (RFM 1) return the message ID + message number + 4 optional variables
- after calling the RFM 1, the calling program calls the RFC-enabled function module
BAPI_MESSAGE_GETDETAILto get the text in the desired language (parameter LANGUAGE or LANGUAGE_ISO).
add a comment |
up vote
1
down vote
A workaround could be, instead of using MESSAGE, just selecting the text of the message with the language you need (English in my example):
SELECT SINGLE text
INTO @DATA(e_error)
FROM t100
WHERE sprsl EQ 'E'
AND arbgb EQ 'ZTEST'
AND msgnr EQ '001'.
Obviously, if the message has placeholder(s), you have some more work to do.
2
There is the function moduleFORMAT_MESSAGEwhich is able to both return a text in any language and replace the placeholders ; this is the one which was used in very old releases (< 3.0) when the statementMESSAGEwas not able to replace placeholders.
– Sandra Rossi
Nov 8 at 19:04
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
A second possible workaround is to :
- make your RFC-enabled function module (RFM 1) return the message ID + message number + 4 optional variables
- after calling the RFM 1, the calling program calls the RFC-enabled function module
BAPI_MESSAGE_GETDETAILto get the text in the desired language (parameter LANGUAGE or LANGUAGE_ISO).
add a comment |
up vote
3
down vote
accepted
A second possible workaround is to :
- make your RFC-enabled function module (RFM 1) return the message ID + message number + 4 optional variables
- after calling the RFM 1, the calling program calls the RFC-enabled function module
BAPI_MESSAGE_GETDETAILto get the text in the desired language (parameter LANGUAGE or LANGUAGE_ISO).
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
A second possible workaround is to :
- make your RFC-enabled function module (RFM 1) return the message ID + message number + 4 optional variables
- after calling the RFM 1, the calling program calls the RFC-enabled function module
BAPI_MESSAGE_GETDETAILto get the text in the desired language (parameter LANGUAGE or LANGUAGE_ISO).
A second possible workaround is to :
- make your RFC-enabled function module (RFM 1) return the message ID + message number + 4 optional variables
- after calling the RFM 1, the calling program calls the RFC-enabled function module
BAPI_MESSAGE_GETDETAILto get the text in the desired language (parameter LANGUAGE or LANGUAGE_ISO).
edited Nov 9 at 21:16
answered Nov 8 at 19:32
Sandra Rossi
2,0731315
2,0731315
add a comment |
add a comment |
up vote
1
down vote
A workaround could be, instead of using MESSAGE, just selecting the text of the message with the language you need (English in my example):
SELECT SINGLE text
INTO @DATA(e_error)
FROM t100
WHERE sprsl EQ 'E'
AND arbgb EQ 'ZTEST'
AND msgnr EQ '001'.
Obviously, if the message has placeholder(s), you have some more work to do.
2
There is the function moduleFORMAT_MESSAGEwhich is able to both return a text in any language and replace the placeholders ; this is the one which was used in very old releases (< 3.0) when the statementMESSAGEwas not able to replace placeholders.
– Sandra Rossi
Nov 8 at 19:04
add a comment |
up vote
1
down vote
A workaround could be, instead of using MESSAGE, just selecting the text of the message with the language you need (English in my example):
SELECT SINGLE text
INTO @DATA(e_error)
FROM t100
WHERE sprsl EQ 'E'
AND arbgb EQ 'ZTEST'
AND msgnr EQ '001'.
Obviously, if the message has placeholder(s), you have some more work to do.
2
There is the function moduleFORMAT_MESSAGEwhich is able to both return a text in any language and replace the placeholders ; this is the one which was used in very old releases (< 3.0) when the statementMESSAGEwas not able to replace placeholders.
– Sandra Rossi
Nov 8 at 19:04
add a comment |
up vote
1
down vote
up vote
1
down vote
A workaround could be, instead of using MESSAGE, just selecting the text of the message with the language you need (English in my example):
SELECT SINGLE text
INTO @DATA(e_error)
FROM t100
WHERE sprsl EQ 'E'
AND arbgb EQ 'ZTEST'
AND msgnr EQ '001'.
Obviously, if the message has placeholder(s), you have some more work to do.
A workaround could be, instead of using MESSAGE, just selecting the text of the message with the language you need (English in my example):
SELECT SINGLE text
INTO @DATA(e_error)
FROM t100
WHERE sprsl EQ 'E'
AND arbgb EQ 'ZTEST'
AND msgnr EQ '001'.
Obviously, if the message has placeholder(s), you have some more work to do.
answered Nov 8 at 15:09
JozsefSzikszai
1,513311
1,513311
2
There is the function moduleFORMAT_MESSAGEwhich is able to both return a text in any language and replace the placeholders ; this is the one which was used in very old releases (< 3.0) when the statementMESSAGEwas not able to replace placeholders.
– Sandra Rossi
Nov 8 at 19:04
add a comment |
2
There is the function moduleFORMAT_MESSAGEwhich is able to both return a text in any language and replace the placeholders ; this is the one which was used in very old releases (< 3.0) when the statementMESSAGEwas not able to replace placeholders.
– Sandra Rossi
Nov 8 at 19:04
2
2
There is the function module
FORMAT_MESSAGE which is able to both return a text in any language and replace the placeholders ; this is the one which was used in very old releases (< 3.0) when the statement MESSAGE was not able to replace placeholders.– Sandra Rossi
Nov 8 at 19:04
There is the function module
FORMAT_MESSAGE which is able to both return a text in any language and replace the placeholders ; this is the one which was used in very old releases (< 3.0) when the statement MESSAGE was not able to replace placeholders.– Sandra Rossi
Nov 8 at 19:04
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53210128%2fset-language-for-message-statement%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
i had a similar case some time ago, are you able to set the batch-users language via SU01, logon-language or adress-language? this influences your MESSAGE's language but I also did not find this satisfying.
– zYrEx
Nov 8 at 14:52
My problem is that I am bound to the user on the other system. I don't think I'm able (or rather allowed) to change the language of the user itself for every single call of my module.
– Tassimmo
Nov 8 at 14:55
yeah, I was neither allowed to change it. eventually you have to translate the messages and transport them to the other system ..
– zYrEx
Nov 8 at 14:57
1
You say you want to enable the calling machine react to this message? Shouldn't you then rather send an error code (e.g. message class and number) instead of translated free text?
– Florian
Nov 8 at 15:57
The message I'm getting is the error message shown to the user on the other system.
– Tassimmo
Nov 9 at 6:36