Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

SAP EWM Help Latest Questions

  • 0
  • 0
DPM125
Beginner

Reading data from AL11 (SAP application server directory) and then storing (downloading) it into your local server/system

What is AL11?

  • AL11 is a SAP transaction code that displays directories and files on the SAP application server.

  • From AL11, you can view file contents but not directly download them to your local server.

Options to Read Data from AL11 and Store Locally

1. Manually via AL11 + GUI Download

  1. Go to transaction AL11.

  2. Navigate to the directory → choose the file.

  3. Double-click → file contents displayed.

  4. Use System → List → Save → Local File (or Ctrl+Shift+F7) to save to your PC/server.

2. Use ABAP Program (Recommended for Automation)

  • You can write an ABAP program to read the file from the AL11 directory and download it to a local server path.

DATA: lv_filename TYPE string,
lv_localfile TYPE string,
lt_filedata TYPE TABLE OF string,
lv_line TYPE string.

lv_filename = ‘/usr/sap/interfaces/data.txt’. ” Path in AL11
lv_localfile = ‘C:\local\data.txt’. ” Local path (SAP GUI PC)

” Open file from AL11
OPEN DATASET lv_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc = 0.
DO.
READ DATASET lv_filename INTO lv_line.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND lv_line TO lt_filedata.
ENDDO.
CLOSE DATASET lv_filename.
ENDIF.

” Download to local PC
CALL FUNCTION ‘GUI_DOWNLOAD’
EXPORTING
filename = lv_localfile
TABLES
data_tab = lt_filedata.

 

3. Using FTP / SFTP

  • If your local server is not your SAP GUI machine (e.g., Linux/Windows server in a data center), you usually need FTP/SFTP transfer.

  • Steps:

    1. Copy the file from AL11 to an application server directory (if not already there).

    2. Use ABAP function modules like:

      • FTP_CONNECT

      • FTP_R3_TO_SERVER

      • FTP_DISCONNECT

    3. Or use SFTP via SAP PI/PO, SAP CPI, or third-party middleware.

4. Use SAP Data Services / PI / CPI (Integration Approach)

  • For larger-scale or scheduled transfers, integration tools like SAP Data Services or SAP PI/PO can automatically extract files from SAP app server and push them to local/network servers.

Related Questions

Leave an answer

Leave an answer