Hi Omar,
You need to use OPEN_DATASET & READ DATASET statements to get the file from application server.
Steps:
- Open dataset in read mode
- Read the data set and collect into internal table
- Now, convert this into XSTRING by using function module SCMS_STRING_TO_XSTRING
- After converting into XSTRING, you can use CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE to download into local system
Please refer the below links
Upload File from SAP Application Server using ABAP
Application Server Program - ABAP Development - SCN Wiki
Hope this helps you.
Regards,
Rama