‎2008 Feb 24 7:09 AM
‎2008 Feb 24 8:38 AM
HI,
IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNI
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
‎2008 Feb 24 8:04 AM
You can do it progr4amatically.
take one internal table as errormessages.
keep the structure similar as components inm message like
message,message no,id,etc.
whenever call transaction fials add the entry of error to errormessage table and finally display the internal table in alv/list.
please reward if useful.
‎2008 Feb 24 8:38 AM
HI,
IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNI
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
‎2008 Feb 24 9:34 AM
In SESSION method errors are handled by session only. You error log in session method .
In CALL TRANSACTION method you need to handle errors explicitly.
See the code for error handling
DATA: BEGIN OF i_mess OCCURS 0,
l_mstring(480),
msgnr(5),
msgv1(15),
END OF i_mess.
DATA : messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
PERFORM mess.
FORM mess .
LOOP AT messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = messtab-msgid
lang = messtab-msgspra
no = messtab-msgnr
v1 = messtab-msgv1
v2 = messtab-msgv2
v3 = messtab-msgv3
v4 = messtab-msgv4
IMPORTING
msg = l_mstring
EXCEPTIONS
not_found = 1
OTHERS = 2.
CONDENSE l_mstring.
i_mess-l_mstring = l_mstring(250).
i_mess-msgnr = messtab-msgnr.
i_mess-msgv1 = messtab-msgv1.
APPEND i_mess.
ENDLOOP.
ENDFORM.
This perform is used to handle eroor in Call transaction method.
Thx
Jagadeesh
‎2008 Feb 24 5:05 PM
U can also use funtion modules
message_text_build
Regards
Devanand