‎2008 May 28 6:07 PM
‎2008 May 28 6:11 PM
‎2008 May 28 6:17 PM
hi Praveen,
This FM is used to format the message which we receive in bdc
use bdcmsgcoll structure to catch the error message from the call transaction.
then pass the values to this function module.
Without using this FM, u can take care of the message.
ip_bdcmsgcoll is the table that we get from call transaction..
data:ip_bdcmsgcoll structure bdcmsgcoll.
read table ip_bdcmsgcoll with key msgtyp = 'E' binary search .
if sy-subrc = 0.
call function 'FORMAT_MESSAGE'
exporting
id = ip_bdcmsgcoll-msgid
lang = '-E'
no = ip_bdcmsgcoll-msgnr
v1 = ip_bdcmsgcoll-msgv1
v2 = ip_bdcmsgcoll-msgv2
v3 = ip_bdcmsgcoll-msgv3
v4 = ip_bdcmsgcoll-msgv4
importing
msg = vl_message
exceptions
not_found = 1
others = 2.
hope its clear to you,
inspire if usefull,
Thanks ,
Kalyan.
‎2008 May 28 6:33 PM
Hi Praveen,
Format_Message FM is using to format the message to show the output
as a standard message. You have to pass this FM all standardard system variables only it will imports a message into a table.
using that table you can display the messages.
ip_bdcmsgcoll is the table that we get from call transaction..
data:ip_bdcmsgcoll structure bdcmsgcoll.
read table ip_bdcmsgcoll with key msgtyp = 'E' binary search .
if sy-subrc = 0.
call function 'FORMAT_MESSAGE'
exporting
id = ip_bdcmsgcoll-msgid
lang = '-E'
no = ip_bdcmsgcoll-msgnr
v1 = ip_bdcmsgcoll-msgv1
v2 = ip_bdcmsgcoll-msgv2
v3 = ip_bdcmsgcoll-msgv3
v4 = ip_bdcmsgcoll-msgv4
importing
msg = vl_message
exceptions
not_found = 1
others = 2.
Reward points if useful.
Cheers,
Swamy Kunche