Google Search - Blog...........

ABAP - Creating A File & Folder In Presentation Server

report ztest.


parameters: p_dir like rlgrap-filename,
p_file like rlgrap-filename.

data: it_data type table of char30 with header line.

start-of-selection.

call function 'TMP_GUI_CREATE_DIRECTORY'
exporting
dirname = p_dir
* NO_FLUSH = ' '
exceptions
failed = 1
others = 2
.

it_data = 'This is test file'.
append it_data.


data: l_file type string.

concatenate p_dir '\' p_file '.txt' into l_file.

call function 'GUI_DOWNLOAD'
exporting
filename = l_file
tables
data_tab = it_data
.


*You can use some for file operations CL_GUI_FRONTEND_SERVICES
*DIRECTORY_BROWSE Shows a Directory Selection Window
*DIRECTORY_CREATE Creates a Directory in the Client
*DIRECTORY_DELETE Deletes a Directory in the Client
*DIRECTORY_EXIST Checks if a directory exists
*DIRECTORY_GET_CURRENT Returns the Current Directory
*DIRECTORY_LIST_FILES Lists Files in a Given Directory


ALSO READ:

- Download SAP Data In XML Format.

- Download SAPScript Output To PDF File.

- Download Data From Application Server Files To Presentation Server Using FM C13Z_APPL_TO_FRONT_END.

- Creating A Directory On Presentation Server Using FM GUI_CREATE_DIRECTORY.

- Removing A Directory From Presentation Server Using FM GUI_REMOVE_DIRECTORY.


RETURN TO MAIN INDEX:

- Sample Programs On Uploading & Downloading Files.

- Sample Programs On HR ABAP.

- Sample Report Programs On ALV List/ Grid Display.

- Sample Programs On Selection Screen.

- Sample Programs On BDC.

.....Back To MAIN INDEX.


No comments:

Post a Comment