2006 Nov 14 2:17 PM
Hi ,
I am putting a file in Unix server using
Open Dataset,
Transfer and
Close dataset
If there is an error in any one of these(sy-subrc NE 0) , I am doing some action.
Now, there is a requirement to capture the error which Unix throws because of which the transfer was not successful.
Is there any way to achieve this?
Thanks in advance,
Ashish
2006 Nov 14 2:25 PM
For open datset:
These are the possible sy-subrc values:
Return Value
sy-subrc Description
0 File was opened.
8 Operating system could not open file.
Exceptions
Catchable Exceptions
CX_SY_FILE_OPEN
Cause: File is already open (only in Unicode programs)
Runtime Error: DATASET_REOPEN
CX_SY_CODEPAGE_CONVERTER_INIT
Cause: The desired conversion is not supported. (Due to specification of invalid code page or of language not supported in the conversion, with SET LOCALE LANGUAGE.)
Runtime Error: CONVT_CODEPAGE_INIT (catchable)
CX_SY_CONVERSION_CODEPAGE
Cause: Internal error in the conversion.
Runtime Error: CONVT_CODEPAGE (catchable)
CX_SY_FILE_AUTHORITY
Cause: No authorization for access to file
Runtime Error: OPEN_DATASET_NO_AUTHORITY (catchable)
Cause: Authorization for access to this file is missing in OPEN DATASET with addition FILTER.
Runtime Error: OPEN_PIPE_NO_AUTHORITY (catchable)
CX_SY_PIPES_NOT_SUPPORTED
CX_SY_TOO_MANY_FILES
Cause: Maximum number of open files exceeded.
Runtime Error: DATASET_TOO_MANY_FILES (catchable)
Non-Catchable Exceptions
Cause: You tried to open a pipe that is already open.
Runtime Error: DATASET_PIPE_POSITION
for transfer, we do not have any sy-subrc returned.
2006 Nov 14 3:36 PM
Hi Ravi,
Thanks for the inputs. I have one additional question. Sometimes the data transfer does not happen and no runtime error occurs. Is there any way of finding this out as to what kind of error occurred (Some FM or something).
Regards,
Ashish
2006 Nov 14 2:34 PM
hi
good
go through this link, i hope this ll help you to solve your problem
https://weblogs.sdn.sap.com/cs/user/view/cs_msg/7502
thanks
mrutyun^