2009 Jan 09 9:37 AM
I am passing certain code in table itab and then doing a syntax check using SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd .The problem with this method is it check the code line by line and assign mess with the first error msg but I want to trap all the error message of the code in itab at once in another table.
Is it possible to trap all the error msg at once in a internal table.
2009 Jan 09 10:41 AM
hi
Your file w_physical_file will contain all your error messages, but it won't be enough to correct errors in your input file. For each record in w_physical_file, you need some sort of indicator to tell which record is in error.
hope this helps
regards
Aakash Banga
2009 Jan 09 10:54 AM
No, I dont have to correct it I just want to trap all the error messages.Where would I get access to this file w_physical_file...
2009 Jan 09 11:14 AM
You can use the bellow fm. But you will get the message like in ABAP editor. It may be useful for you...
data : isource(255) occurs 0 with header line,
icorrect(255) occurs 0 with header line,
iwarning like RSLINLMSG occurs 0 with header line,
ierror like RSLINLMSG occurs 0 with header line.
read report 'Your prog name in CAPS' into isource.
CALL FUNCTION 'EDITOR_SYNTAX_CHECK'
EXPORTING
* I_GLOBAL_CHECK = ' '
* I_GLOBAL_PROGRAM = ' '
i_program = 'Your prog name in CAPS'
* I_R2_CHECK = ' '
* I_R2_DESTINATION = ' '
* I_TRDIR = ' '
* I_CORRWARN = ' '
ALL_ERRORS = 'X'
* IMPORTING
* O_ERROR_INCLUDE =
* O_ERROR_LINE =
* O_ERROR_MESSAGE =
* O_ERROR_OFFSET =
* O_ERROR_SUBRC =
tables
i_source = isource
O_CORRECTION_TAB = icorrect
O_WARNINGS_TAB = iwarning
O_ERROR_TAB = ierror
.
regards
Shiba Prasad Dutta