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

File name

Former Member
0 Likes
370

hi all,

in the report i need to send some output data to output path which has been set default as


global-general service\Master Data\SAP Backups\data'.

in selection screen i have given as

output path:
global-general service\Master Data\SAP Backups\data'.

whereas the problem is the output which we are getting from the report need to move to the above output path and should be saved in that path giving some filename as

DATA_SY-DATUM.XLS.

I have written code as

parameters: F_file LIKE rlgrap-filename default '
global-general service\Master Data\SAP Backups\data'.

how to write code to set the file name as DATA_SY-DATUM.XLS in the report

it means when the report executed the output data should fall under the path
global-general service\Master Data\SAP Backups\data'. with file name as DATA_SY-DATUM.XLS

please help to write code for this.

2 REPLIES 2
Read only

Former Member
0 Likes
327

Hi,

Try this..

parameters: P_FILE LIKE rlgrap-filename default '

global-general service\Master Data\SAP Backups\data'.

data: F_FILE LIKE rlgrap-filename default 'DATA_SY-DATUM.XLS '.

now to the complete name of the file (i.e. along with the path)

CONCATENATE p_file F_file INTO F_file.

F_FILE will have the complete name for the file.

**********************

Regards,

Syed

Read only

0 Likes
327

Hi Sail,

try with these code.

INITIALIZATION.

data: file1 type rlgrap-filename.

data: file_name type rlgrap-filename.

data: file_name1 type rlgrap-filename.

file_name1 = 'global-general service\Master Data\SAP Backups\data'.

file_name = sy-datum.

CONCATENATE file_name1 'DATA_' FILE_NAME '.xls' INTO file1.

parameters: F_file LIKE rlgrap-filename.

F_file = FILE1.

SELECT-OPTIONS: S_DATUM FOR SY-DATUM.

PARAMETERS: P_WERKS TYPE WERKS.

Thanks,

Nelson

Edited by: Nelson karunakar on Nov 5, 2008 10:46 AM