‎2006 Oct 20 6:47 PM
hi all,
i have a internal table treturn like t_return like bapiret2 occurs 0 with header line to hold the error messages from bapi_goodsmvt.
and i have other internal table t_msg type standard table of solisti1 initial size 0
with header line, which is the message table for the functional module SO_NEW_DOCUMENT_ATT_SEND_API1
so all the error msgs type E in treturn should be sent to t_msg.
can any one send the code for this please.
thanks.
‎2006 Oct 20 6:53 PM
Hi, what you can do is loop at the T_RETURN table and process each record thru function module MESSAGE_PREPARE, it excepts the message information and builds the message for you.
call function 'MESSAGE_PREPARE'
exporting
language = sy-langu
msg_id = t_return-id
msg_no = t_return-number
msg_var1 = t_return-MESSAGE_V1
msg_var2 = t_return-MESSAGE_V2
msg_var3 = t_return-MESSAGE_V3
msg_var4 = t_return-MESSAGE_V4
importing
msg_text = message.
You can then simple add the message to the T_MSG internal table.
t_msg = message.
append t_msg.Regards,
Rich Heilman