2007 Jul 24 11:16 PM
HI all...
Is it possible to somehow convert error code coming from BAPI call from <b><u>English to French</u></b>; provided user logged into SAP system with English language?
Thanks,
Pooja
2007 Jul 24 11:20 PM
HI,
loop at it_return. " return table from bapi
Use the language parameter in the format_message function module and pass FR and messege id etc to it.
endloop.
Thanks
Mahesh
HI all...
Is it possible to somehow convert error code coming from BAPI call from <b><u>English to French</u></b>; provided user logged into SAP system with English language?
Thanks,
Pooja
2007 Jul 24 11:20 PM
HI,
loop at it_return. " return table from bapi
Use the language parameter in the format_message function module and pass FR and messege id etc to it.
endloop.
Thanks
Mahesh
2007 Jul 25 4:01 PM
Hi Mahesh,
Thanks for your response.
I have used the functional module FORMAT_MESSAGE in following way and I am getting below showed values.
************************************************************************************************
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = 'FR'
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = message
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
**************************************************************************************************
Before function call message
-
-
No customer master record exists for customer 10000080----
-
Sales document was not changed
**************************************************************************************************
Message contains following value after function call :
-
-
Le document de vente n'est pas modifié-------Le document de vente n'est pas modifié</b>
***************************************************************************************************
I dont think that its really converting message into french, but its just converting into some constant text.
Do you know any other method which can handle my requirement ?
Thanks,
Pooja
2007 Jul 25 4:07 PM
Loop at return.
select message text from T100 with message class and number with language equal to french.
update in return.
endloop.
2007 Jul 25 4:16 PM
So Nilesh does it mean that I cant give any text stored in variable and FORMAT_MESSAGE converts into French ??
2007 Jul 25 4:18 PM
Message is basically the combined error code received from BAPI call.
Do you think I am going wrong in defining the functional module ?
2007 Jul 25 4:22 PM
oops i haven't checked the FM, it return the same text as which is maintained in t100 in resp. language.
Please confirm the message in T100 table where it is same in French or not.
2007 Jul 25 4:33 PM
Thanks Nilesh for your response.
I am not an ABAPer so I really dint understand your response.
As per me if I am sending two different text then response should be two different text but seems that FORMAT_MESSAGE is returning same text.
2007 Jul 25 4:39 PM
Format_message is not converting any message from one language to another language. It will return the stored message in provided language.
For ex.
If you pass ID as 00, Language as DE and NO as 002. It will return message in German language. If you change language from German to English it will return in English language.
What you have to do it just pass the return parameter from bapi to this format_message function module.
Just pass ID, Number, Message_v1 to Message_v4 and requried Language to the respective parameters of format_message function module.
2007 Jul 25 5:05 PM
Hi Nilesh,
I tried to work in your approach. I have variable ls_return1 which actually contains the return table from BAPI and I have tried passing that in FORMAT_MESSAGE in following way :
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = 'FR'
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = ls_return1
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
ENDIF.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
But I am getting error dump saying
Runtime error: OBJECTS_MOVE_NOT_SUPPORTED.
and text as :
Conversion of type "C" to type "h" not supported..........................
Nilesh/anyone else see any problem in here ???
Thanks
Pooja
2007 Jul 26 4:06 PM
Hi could you send me the input which you passing to format_message FM.
I guess some incorrect parameter you pass to format_message FM.
It will better you check with your technical consultant, if possible.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |