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: 

OPEN dataset getting no authority dump

Former Member
0 Kudos
4,965

Using OPEN dataset getting no authority dump.

Statement used is

-


OPEN DATASET y_filename FOR APPENDING IN TEXT MODE ENCODING DEFAULT

-


This statement is giving dump message "no authority"

y_filename has the value /usr/sap/tmp/text03012008.txt

Above mentioned file "text03012008.txt" does not exit on Application server and should be created

kindly advsie

7 REPLIES 7

raymond_giuseppi
Active Contributor
0 Kudos
1,254

As specified in online-help on instruction OPEN DATASET you have to check authority before opening any dataset.

Use Function Module AUTHORITY_CHECK_DATASET

Else you could try to CATCH the error OPEN_DATASET_NO_AUTHORITY

If an error occurs, then OPEN DATASET FOR OUTPUT

If an other error occurs, then has your user the right to create file on this directory.

CATCH SYSTEM-EXCEPTIONS OPEN_DATASET_NO_AUTHORITY = 1.

OPEN DATASET y_filename FOR APPENDING IN TEXT MODE ENCODING DEFAULT.

ENDCATCH.

IF sy-subrc = 1.

CATCH SYSTEM-EXCEPTIONS OPEN_DATASET_NO_AUTHORITY = 1.

OPEN DATASET y_filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT

ENDCATCH.

ENDIF.

IF sy-subrc = 1.

" errror message => Contact BC team for authorization

ENDIF.

Regards

0 Kudos
1,254

Used the FM AUTHORITY_CHECK_DATASET

getting the output as no authority

How to proceed as I know that the file does not exit and has to be created through the open dataset command .

0 Kudos
1,254

The person who is running ur report( creating the file) should have the authority to create in the database ie application layer level

Former Member
0 Kudos
1,254

Are you running this in the foreground or background? Does the userID have operating system file permission to the file?

/usr/sap/tmp/text03012008.txt

Can you verify the application server can see this path from the console?

Former Member
0 Kudos
1,254

Hi,

Ur id must have Authority to create a File on App Server. If not ask the basis to give a authorization.

Regards,

Srinivas M

Former Member
0 Kudos
1,254

Thanks will check with the basis team .

daniel_coelho
Explorer
0 Kudos
1,254
AUTHORITY-CHECK OBJECT 'S_DATASET'
ID 'PROGRAM' FIELD sy-cprog
ID 'ACTVT' FIELD 'READ' "WRITE READ_WITH_FILTER WRITE_WITH_FILTER DELETE
ID 'FILENAME' FIELD y_filename.

IF sy-subrc IS INITIAL.
OPEN DATASET y_filename.
ENDIF.