2010 Jan 28 8:40 AM
Hi all,
I have program to upload data in XML format, in certain cases, the program end with shortdump.
It's happen when program reading upload file (READ DATASET).
Is it posible we avoid the shortdump? may be there is any statement to handle the error so program can continue run?
Because i can to create error log report for this upload program, so we can inform to user which file is error.
I read TRY-ENDTRY, is it posible to user it?
regards,
Hengky
2010 Jan 28 8:52 AM
2010 Jan 28 9:12 AM
I'm forget the Shortdump, it looked like unicode error or something.
The thing that I need is I want program can continue even the file is error, so I can report to user which file is needed correction.
regard,
Hengky
2010 Jan 28 9:23 AM
Hi,
do it like this:
TRY.
READ DATASET...
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
* Log message: The required conversion in not supported
CATCH CX_SY_CONVERSION_CODEPAGE.
* Log message: Convesrsion is not possible
CATCH CX_SY_FILE_AUTHORITY.
*Log message: No authorization for access to a file
CATCH CX_SY_FILE_IO.
* Log message: When reading the file, an error occured
CATCH CX_SY_FILE_OPEN.
*Log message: The file could not be opened
CATCH CX_SY_PIPE_REOPEN.
* Log message: Pipe closed
ENDTRY.
For more info on these exceptions, see [READ DATASET|http://help.sap.com/abapdocu_70/en/ABAPREAD_DATASET.htm].
Regards,
Adrian
2010 Jan 28 9:27 AM
And if You want to make it properly, do the same also for OPEN DATASET and CLOSE DATASET. Exceptions which can occur by these two statements can be found in [Statements for the ABAP File Interface |http://help.sap.com/abapdocu_70/en/ABENFILE_INTERFACE_STATEMENTS.htm].
Adrian