2006 Oct 17 4:14 AM
i have got err msgs on to mess_tab (bdcmsgcoll) but i need to interpret the description of the message available at msg-id 004. where to look up. Is there any FM available for the same
2006 Oct 17 4:56 AM
Hi,
u can look for the messages using FM Format_Message or u can see them directly in database table T100.
2006 Oct 17 4:16 AM
hi Uma,
Use <b>FORMAT_MESSAGE</b> FM for the same
loop at messtab where MSGTYP = 'E' or type = 'A'.
call function 'FORMAT_MESSAGE'
exporting
id = messtab-msgid
lang = '-E'
no = messtab-msgnr
v1 = messtab-msgv1
v2 = messtab-msgv2
v3 = messtab-msgv3
v4 = messtab-msgv4
importing
msg = %_list-line.
append %_list.
clear: %_list.
endloop.Regards,
santosh
Message was edited by: Santosh Kumar P
2006 Oct 17 4:23 AM
Hi,
Check the field MSGTYP in the BDCMSGCOLL internal table..If it is E or A then it is not successfull..
use the function module MESSAGE_PREPARE for the corresponding Message id, message number, MSGV1,V2, V3,V4 to get the text.
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
Message was edited by: Narendran Muthukumaran
2006 Oct 17 4:56 AM
Hi,
u can look for the messages using FM Format_Message or u can see them directly in database table T100.
2006 Oct 17 5:24 AM
Hi ,
See the below code
FORM call_transaction .
DATA: w_mode VALUE 'N'.
DATA:w_errors type i.
data:l_vbeln like vbak-vbeln.
data:l_text1(110).
CLEAR g_r_rb17va31.
Exucute transaction via Call Transaction
CALL TRANSACTION 'VA31'
USING bdcdata
MODE w_mode
UPDATE 'S'
MESSAGES INTO t_msg .
IF sy-subrc eq 0.
IF sy-subrc EQ 0.
READ TABLE t_msg WITH KEY msgtyp = 'S'
msgid = 'V1'.
*&New Scheduling Agreement
g_r_rb17va31-vbelnn = t_msg-msgv2.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = g_r_rb17va31-vbelnn
IMPORTING
OUTPUT = g_r_rb17va31-vbelnn
.
*&Get New Scheduling Number and Update the same into /RB17/VA31 Table
UPDATE /rb17/va31
SET vbelnn = g_r_rb17va31-vbelnn
WHERE vbelno = g_t_ovbeln-vbelno .
COMMIT WORK.
endif.
ELSE.
* Check for all error messages
LOOP AT t_msg.
IF t_msg-msgtyp = 'E'.
ADD 1 TO w_errors.
l_arbgb = t_msg-msgid.
l_msgnr = t_msg-msgnr.
l_vbeln = g_t_ovbeln-vbelno.
CALL FUNCTION 'RP_READ_T100'
EXPORTING
ARBGB = l_arbgb
msgnr = l_msgnr
MSGV1 = ' '
MSGV2 = ' '
MSGV3 = ' '
MSGV4 = ' '
SPRSL = SY-LANGU
IMPORTING
TEXT = l_text
EXCEPTIONS
NO_ENTRY_FOUND = 1
OTHERS = 2
.
t_itab-status = l_text.
t_itab-vbeln = l_vbeln.
append t_itab TO g_t_err_log.
ENDIF.
endloop.
CONCATENATE l_vbeln l_text INTO l_text1.
MESSAGE I899
WITH l_text1.
You can also use MESSAGE_PREPARE AND FORMAT_MESSAGE fms TO CAPTURE THE MESSAGE TEXT .
REGARDS,