2008 Jun 09 2:50 PM
Hi Guru's,
I am using call transaction method to upload data into SAP system i want to capture the error, which may be present in screen is there is any way to do it
please give some idea as early as possible
Ravi Kumar
2008 Jun 09 3:02 PM
Hi Ravi,
Use this function Module FORMAT_MESSAGE to get the error message
Before using this function module you just creat one internal table refering the structure bdcmsgcoll.
Example
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = message-msgid
lang = 'E'
no = message-msgnr
v1 = message-msgv1
v2 = message-msgv2
v3 = message-msgv3
v4 = message-msgv4
IMPORTING
msg = l_errmsg
EXCEPTIONS
not_found = 1
OTHERS = 2.
lang is "E' = Error S = success and I information.
I hope it will be usefull for u
Regards,
John Victor
Hi Ravi,
Use this function Module FORMAT_MESSAGE to get the error message
Before using this function module you just creat one internal table refering the structure bdcmsgcoll.
Example
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = message-msgid
lang = 'E'
no = message-msgnr
v1 = message-msgv1
v2 = message-msgv2
v3 = message-msgv3
v4 = message-msgv4
IMPORTING
msg = l_errmsg
EXCEPTIONS
not_found = 1
OTHERS = 2.
lang is "E' = Error S = success and I information.
I hope it will be usefull for u
Regards,
John Victor
2008 Jun 09 2:51 PM
Check the MESSAGES into MESS_TAB addition of the CALL TRANSACTION.
Regards,
Naimesh Patel
2008 Jun 09 3:02 PM
Hi Ravi,
Use this function Module FORMAT_MESSAGE to get the error message
Before using this function module you just creat one internal table refering the structure bdcmsgcoll.
Example
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = message-msgid
lang = 'E'
no = message-msgnr
v1 = message-msgv1
v2 = message-msgv2
v3 = message-msgv3
v4 = message-msgv4
IMPORTING
msg = l_errmsg
EXCEPTIONS
not_found = 1
OTHERS = 2.
lang is "E' = Error S = success and I information.
I hope it will be usefull for u
Regards,
John Victor
2008 Jun 09 4:09 PM
All errrors occured during CALL Transaction will be placed into IT_MESSAGES. you can loop thru this internal table & find for message type E to see the error messages.
Sample Code:
CALL TRANSACTION <Tcode> using IT_BDCDATA ....
MESSAGES INTO IT_MESSAGES.
IF SY-SUBRC <> 0 .
LOOP AT IT_MESSAGES WHERE MSG_TYPE = 'E'.
*--here you will be having all ERROR messages
ENDLOOP
ENDIF.
hope this gives some idea.
Regards,
Srikanth
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |