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

Opne data set issue

former_member463678
Participant
0 Likes
636

Hi,

I have problem with OPEN DATA SET statement.

OPEN DATASET FILE_PATH FOR OUTPUT IN BINARY MODE.

( Where file_path =
sacorf02\satsap$\ISM010\DATA\FILE\ZPRA_JE_UPLOAD )

After the execution of this statement sy-subrc set to 8 and giving dump.

it shows following in dump.

When accessing the file "ZPRA_JE_UPLOAD", the system recognized that this file is not open, the file cannot be accessed.

Can anybody pls help on this.

Regards,

Zakir.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
606

check whether u r having authorization or not for that path

5 REPLIES 5
Read only

Former Member
0 Likes
607

check whether u r having authorization or not for that path

Read only

Former Member
0 Likes
606

Hi,

I think you don't have write access in application server.Contact your basis person.

And also try to create file in your path through tcode CG3Z/CG3Y.

If you are unable to create contact basis person

Read only

Former Member
0 Likes
606

do u have read write authorization for the location

else check file path if it is correct (T-CODE AL11)

Read only

Former Member
0 Likes
606

Hello khan-

Change your file name from caps to lower.

ZPRA_JE_UPLOAD to ' zpra_je_upload '.

Cheers,

~Srini....

Read only

vinod_vemuru2
Active Contributor
0 Likes
606

Hi Zakir,

First thing to do before opening a file for read/write is to check the authority of the user. Use the FM AUTHORITY_CHECK_DATASET to check the appropriate authority. Pass ACTIVITY as WRITE/READ to this FM. Then based on the exception u can give appropriate messages in ur code.

TYPE-POOLS sabc.

CALL FUNCTION 'AUTHORITY_CHECK_DATASET'

EXPORTING

program = sy-cprog

activity = sabc_act_write

filename = l_filename

EXCEPTIONS

no_authority = 1

activity_unknown = 2

OTHERS = 3.

CHECK NOT sy-subrc IS INITIAL.

MESSAGE e700.

Another thing is application server file is case sensitive. Make sure that u r giving correct file name with correct case. If the file doesn't exist and u r trying to access then also u will get the dump.

Thanks,

Vinod.