2006 Dec 19 8:06 AM
Hi all,
I've recorded a BDC for transaction ABZON. When I run the transaction and successfully save, there is a status message that gives me a document number. However, when I run the BDC, only the return status is 0 and there is not document number.
When I debug, it looks like the MESSTAB table contains no information. If I input some wrong information, I do get some error messages. But I'm wondering how to get the success messages.
Also, would it be possible to add it to a custom table? Would I just modify the include to a custom include?
Thanks in advance.
2006 Dec 19 8:09 AM
Hi all,
I've recorded a BDC for transaction ABZON. When I run the transaction and successfully save, there is a status message that gives me a document number. However, when I run the BDC, only the return status is 0 and there is not document number.
When I debug, it looks like the MESSTAB table contains no information. If I input some wrong information, I do get some error messages. But I'm wondering how to get the success messages.
Also, would it be possible to add it to a custom table? Would I just modify the include to a custom include?
Thanks in advance.
2006 Dec 19 8:09 AM
2006 Dec 19 8:35 AM
Hi John,
Try this sample:
DATA: i_bdcmsg LIKE bdcmsgcoll OCCURS 100 WITH HEADER LINE.
CALL TRANSACTION 'XD06' USING i_bdctab
MODE c_n
UPDATE c_s
MESSAGES INTO i_bdcmsg.
READ TABLE i_bdcmsg WITH KEY msgtyp = c_e.
IF sy-subrc EQ 0.
wa_error_delete-kunnr = wa_delete-kunnr.
SORT i_bdcmsg BY msgtyp.
LOOP AT i_bdcmsg.
MOVE: i_bdcmsg-msgnr TO v_msgnr,
i_bdcmsg-msgv1 TO v_msgv1,
i_bdcmsg-msgv2 TO v_msgv2,
i_bdcmsg-msgv3 TO v_msgv3,
i_bdcmsg-msgv4 TO v_msgv4,
i_bdcmsg-msgid TO v_msgid.
Call Function module BAL_DSP_TXT_MSG_READ to get error message
CALL FUNCTION 'BAL_DSP_TXT_MSG_READ'
EXPORTING
i_langu = sy-langu
i_msgid = v_msgid
i_msgno = v_msgnr
i_msgv1 = v_msgv1
i_msgv2 = v_msgv2
i_msgv3 = v_msgv3
i_msgv4 = v_msgv4
IMPORTING
e_message_text = wa_error_delete-msg.
APPEND wa_error_delete TO i_error_delete.
ENDLOOP.
I am not really sure if it code will work for 'S' type messages.
Hope this helps even a bit.
2006 Dec 19 8:53 AM
after the execution write:
message s001(msgclass).
then double click on msgclass. IT takes u to that message class. Then u enter the required message to be displayed. save ..activate..comeback.
then it displays in the status bar, If u execute the query.
If u replace "S" with "I" in the message statement. It show sin a small dialog indow.
Cheers.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |