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 dataset - return code 8 - msg - Permission Denied

Former Member
0 Likes
2,300

This is the first time this company has tried to write files to the application server. They are running under Windows. The network admin set up a folder and I am getting a return code of 8 on 'open dataset'. When I use this function to get more information I am getting

a run-time error that the ABAP is bad.

What is wrong with this function call?

pfilename =
saberdev\blacksmith\ftpout\bsproduct.txt

call function 'AUTHORITY_CHECK_DATASET'

EXPORTING

program = 'ZBS_PRODUCT_OUTBOUND_INTERFACE'

activity = 'WRITE'

filename = pfilename

EXCEPTIONS

no_authority = 1

activity_unknown = 2

others = 3.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
959

hi,

Put the Path in Single Quotes and give a try ..

<b>

pfilename = '\saberdevblacksmithftpoutbsproduct.txt'.

</b>

Regards,

Santosh

3 REPLIES 3
Read only

Former Member
0 Likes
960

hi,

Put the Path in Single Quotes and give a try ..

<b>

pfilename = '\saberdevblacksmithftpoutbsproduct.txt'.

</b>

Regards,

Santosh

Read only

0 Likes
959

Thanks, Santosh, that helped.

Now I am getting sy-subrc = 0 on the function call but I am still getting a return code of 8 on the open dataset. Here is my code.

HELP!!

call function 'AUTHORITY_CHECK_DATASET'

EXPORTING

program = 'ZBS_PRODUCT_OUTBOUND_INTERFACE'

activity = 'WRITE'

filename = '
saberdev\blacksmith\ftpout\bsproduct.txt'

EXCEPTIONS

no_authority = 1

activity_unknown = 2

others = 3.

check sy-subrc = 0.

data: MSG(100).

pfilename = '
saberdev\blacksmith\ftpout\bsproduct.txt'.

CLEAR MSG.

OPEN DATASET pfilename FOR OUTPUT IN TEXT MODE MESSAGE MSG.

IF SY-SUBRC <> 0.

CONCATENATE 'file error: ' MSG INTO MSG.

MESSAGE E208(00) WITH MSG.

ENDIF.

Read only

Former Member
0 Likes
959

How is pfilename declared?