Application Development and Automation 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: 
Read only

Open data Set Error?

Former Member
0 Likes
2,607

Hi Guys,

I am using Open dataset for downloading the data into Application server .I am getting the error file path is not opened but in al11 i was able to see the path what i mentioned here except bseg.txt file.I am getting error at Open data set statement.I have to write the bseg table data into the file bseg.txt in application server.can any body suggest the solution for this problem.

Very urgent.

wa_BSEG_file = '/interfaces/DR1/MM/outbounb/ZMMOF3007/BSEG.txt'.

OPEN DATASET wa_BSEG_file FOR OUTPUT "Write to appl. server

IN TEXT MODE

Encoding default. "Open dataset Return code

IF sy-subrc = 0.

TRANSFER it_cosp1 to wa_BSEG_file.

Write : 'File Transferred BSIK'.

ELSE .

Write : 'File Not Found / Transferred BSIK'.

ENDIF.

CLOSE DATASET wa_BSEG_file.

Very urgent.Full marks will be alloted if u give me the correct answer.

Thanks,

Gopi.

12 REPLIES 12
Read only

Former Member
0 Likes
1,731

check with path : '/interfaces/DR1/MM/outbounb/ZMMOF3007/BSEG.txt' - do compare with AL11 ( It should same as AL11 File Path - this is case sensitive )

Read only

0 Likes
1,731

Hi Seshu,

The path is correct .I write exactly same as in AL11.Can u plz tell me how to solve this one Very Urgent Plzzzzzzzzz.

Thanks,

Gopi.

Read only

0 Likes
1,731

it should be file path problem,keep the file path as lower case.

for testing purpose - create one file at desktop.

now use SXDB Transaction ->here you can copy from local file to Application server files..

Let me know -- what is ur version ?

Read only

0 Likes
1,731

there is no authorization for accessing this tr code sxdb.

Read only

former_member194669
Active Contributor
0 Likes
1,731

Hi,

Due to serveral reasons

1. Check whether you have proper authority in the directory?

2. check the whether any files with same name?

3. use addition message in the open dataset statement so that you can know the system message it getting.



DATA: msg(100). 

OPEN DATASET wa_BSEG_file FOR OUTPUT MESSAGE msg
IN TEXT MODE Encoding default. 

aRs

Read only

0 Likes
1,731

Hi aRs,

I kep message msg like what u said in open data set. I debugged the program and sawed .In msg i got "No such file or Directory" But in application server i want and sawed in al11 tr code. there i was able find the path what i mentioned.can u plz tell me the solution for this.

Thanks,

Gopi.

Read only

Former Member
0 Likes
1,731

Keep a breakpoint in OPEN DATASET & check in debugger whether the filename is not turned to upper case.

Regards,

Sail

Read only

former_member194669
Active Contributor
0 Likes
1,731

Hi,

Check your path wa_BSEG_file with that in AL11. It will be case sensitive. change your path in the program as same your's in AL11.

aRs

Read only

0 Likes
1,731

Hi aRs,

I had done like what u told I copied the path from AL11 into wa_BSEG_file .

I declared wa_BSEG_file as

wa_BSEG_file TYPE file_table-filename Is it correct way of defineng or not?.if so does we need to run the program in background or running in foregorund is not a problem.

Thanks,

Gopi.

Read only

former_member194669
Active Contributor
0 Likes
1,731

Hi,

If your file name is not changing dynamically, then your declaration will not be a problem.

if changing dynamically. then you need to use logical file name using transaction FILE.

If your run the program in background or foreground that doesn't affect the writing file to application server.

aRs

Read only

0 Likes
1,731

Hi Guys,

I Succesfully downloaded the data into Application server.can any body tell me how to save that data into my Presentation server.

Thanks,

Gopi.

Read only

former_member194669
Active Contributor
0 Likes
1,731

Hi,

use fm GUI_DOWNLOAD.

aRs