Thursday, September 17, 2020

Error while opening AL11 file from ABAP program

Interfacing against file system is common thing still even we are moving slowly to cloud oriented computing. There is bazillion of ABAP programs all over the world writing/reading data from/to files. There are ABAP statements like OPEN / TRANSFER / READ / GET / SET TRUNCATE / CLOSE / DELETE that supports working with the DATASET - files. The files are accessible for the users from SAP GUI via t-code AL11. Sometimes even people tend to refer to such files, as AL11 files despite physically the files are stored on OS level.

While programs like those that writes, data into the file are running as background jobs there can be following error popping up in spool of the job:

Error while opening AL11 file



It can be tricky error even when you schedule the job to run by very privileged user like DDIC or any other who is granted with SAP_ALL / SAP_NEW authorizations. Problem is that while the job runs under super privileged user the physical write on OS level is not done by the user under which the job runs. The user that deals with the file is in fact the OS level user – means the user under whom the SAP instance is running (who runs disp+work process).

Based on this the OS level user needs to be authorized to write/read particular folder on OS level.

 

More information:

27 - Recommendations for ABAP file interface

68718 - Problems with file authorizations and umask

Problem in file reading from al11

No comments: