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 while transfering data to Apps server

0 Kudos
242

HI !

I have created an exit to transfer the data of a query directly onto the apps server and I get this error. Could anyone pls let me know how to rectify this please.

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_FILE_OPEN_MODE', was not

caught in

procedure "EXIT_RSAQEXCE_001" "(FUNCTION)", nor was it propagated by a RAISING

clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

When accessing the file "/NAL.LOCAL/APPLICATION/SAP/IFACESDEV/QUERYOUT", the

system recognized that this file is

not open. Therefore, the file cannot be accessed.

* Retrieve the app server filename
select single low into l_file
    from tvarvc
    where name = 'Z_QUERY_DOWNLOAD_FILENAME'.

open dataset l_file for output
  in text mode encoding default.

* Transfer the data
loop at datatab.
  clear <ls_row>.
  move-corresponding datatab to <ls_row>.
  transfer <ls_row> to l_file.
  append <ls_row> to <lt_table>.
endloop.

close dataset l_file.

Thanks

6 REPLIES 6

0 Kudos
100

Any suggestions please?

Thanks

0 Kudos
100

Hey

The file was not opened successfully using the OPEN statement. You can check it using sy-subrc = 0.

Transfer the data only if sy-subrc = 0.

What is happening in ur case is that the file is not being opened successfully, and u are trying to transfer data into it, hence the short dump.

Hope it helps.

Raveesh

0 Kudos
100

Hi!

Yes , indeed , I am checking the value for sy-subrc and thats not zero , its 8 after open dataset. I meant to ask is there any particular reason for that to happen, as the file path does exist and everything seems to be fine. I am not preety sure about the authorizations , if I have it or not but all others areas are fine.

Thanks

0 Kudos
100

It's likely that your id or SAP system do not have appropriate authority to the folder.

If you do Open dataset for output in text mode encoding default and you get a return code of 8, then the open failed.

0 Kudos
100

>

> Hi!

>

> Yes , indeed , I am checking the value for sy-subrc and thats not zero , its 8 after open dataset.

That's the sort of thing you have to include in the initial post.

See [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] .

Rob

Former Member
0 Kudos
100

first why dont you check sy-subrc = 0 for both select and open data set statement. then recheck if the path exist