‎2008 Jun 12 4:14 PM
Dear Friends,
In Call tranasction error handling if sy-subrc ne 0 we will move
into one internal table and we can download it to presentaion server using WS_download so why do we use FORMAT_MESSAGE wht is the use of that..
Regards
Jagadeeshwar.B
‎2008 Jun 13 8:32 AM
Hi jagadeesh,
CALL TRANSACTION tcode USING lt_bdcdata
MODE 'E' MESSAGES INTO itab.
Now itab contains only message no and message Id and not the actual message.
So to get the actual message we use 'Format_message' .In format_message we pass message id, message number and language .so based on these we get the exact message from T100 table.
Regards,
Sachin M M
‎2008 Jun 12 4:15 PM
FORMAT_MESSAGE will give you actual message based on the message id, message no, and message variables.
Regards,
Naimesh Patel
‎2008 Jun 12 4:21 PM
Thanks Nimesh for quick response, so format_message gives predifined system mesages. then how does the user identify which is the error record based on format_message.
Or does format_message gives any idea of the record that has been errored out.
Regards
Jagadeesh B
‎2008 Jun 12 4:16 PM
The messages returned by the call transaction BDCMSGCOLL Internal table will not make any sense to the business user.
If youuse FORMAT_MESSAGE fm you wil get a proper english text for the message .
Regards,
Ravi
‎2008 Jun 13 8:05 AM
Hi Ravi Kanth,
Thanks for your answer, with using format_message function module how would be the output.
pls let me know.
thanks
Regards
Jagadeeswar.B
‎2008 Jun 12 4:17 PM
‎2008 Jun 13 8:25 AM
Using 'FORMAT_MESSAGE' you will get the exact message in English.
In the importing parameter you will receive the message into variable 'msg', which you can write in the report output
CALL TRANSACTION 'ME21' USING bdcdata MODE 'N' UPDATE 'S' MESSAGES INTO it_message.
LOOP AT it_message.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_message-msgid
lang = it_message-msgspra
no = it_message-msgnr
v1 = it_message-msgv1
v2 = it_message-msgv2
IMPORTING
msg = v_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
ENDLOOP.
‎2008 Jun 13 8:32 AM
Hi jagadeesh,
CALL TRANSACTION tcode USING lt_bdcdata
MODE 'E' MESSAGES INTO itab.
Now itab contains only message no and message Id and not the actual message.
So to get the actual message we use 'Format_message' .In format_message we pass message id, message number and language .so based on these we get the exact message from T100 table.
Regards,
Sachin M M