Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error message from unix server

aaparanjpe
Explorer
0 Kudos
130

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

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos
78

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.

0 Kudos
78

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

Former Member
0 Kudos
78

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^