Application Development 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: 

save the file and give date & time stamp

Former Member
0 Kudos

1. Reading the Excel file from the selection screen as a parameter.

2. Using F.M. ALSM_EXCEL_TO_INTERNAL_TABLE reading Excel file into

Internal table.

3. Implementing the Business Logic.

4. Move output to Final Internal table.

5. Final internal table should generate a Flat file. By using GUI_DOWNLOAD.

6. That flat file should be saved with the name and location given in the Excel.

7. When ever I run the program output file will generate in the same location but with date and time stamp. Because I’m running the program for range of employees say initially I run for 1 – 10,000 employees next 10,001- 20,000 like that.

Whenever I run for 2nd time it will overwrite the previous output, that’s the reason I’m using date and time stamp.

Eg:

PERSONAL Numbers Name Location

00000001 xxxxx-24.04.2007-10.30 C:\

00000002 xxxxx-24.04.2007-10.35

00000003 xxxxx-25.04.2007-10.40

00000004 xxxxx-25.04.2007-10.30

Can any one help me how to save the file and give date & time stamp through hardcode?

please help me in this issue.

4 REPLIES 4

dev_parbutteea
Active Contributor
0 Kudos

why don't you use sy-datum and sy-uzeit

Former Member
0 Kudos

Before downloading the file..

Give the output file name as follows:

concatenate 'XYZ' " Some initial string

sy-datum

sy-uzeit

into out_file_name separated by '_'.

Former Member
0 Kudos

Hi Vamsi,

As I understand your requirement is to download the file with a date and time stamp using FM 'GUI_DOWNLOAD'. In that case you can concatenate your file name with system date and system time like -

CONCATENATE '00000001' sy-datum sy-uzeit into w_filename.

Now pass w_filename as filename parameter to 'GUI_DOWNLOAD'.

Hope this helps!

Regards,

Saurabh

Former Member
0 Kudos

I am not clear with your problem. Based on the understanding of your question,

there can be two cases.

1- U want to insert time stamp in the output file.

2- Time stamp is already there, u just have to solve the overwriting issue.

If your question goes with option 2, You can make use of import parameters

<b>CONFIRM_OVERWRITE</b> : Which will ask for confirmation before overwriting.

<b>APPEND</b> : which you can choose either to append the data to the existing file or overwrite it.

Please inform if the issue is not resolved.

Message was edited by:

BINU RAJ BINU