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: 

How can I show current date with text as a default in the text box of selection screen?

Former Member
0 Kudos

Hi Experts,

How can I show  current date with text as a default in the text box of selection screen?

For example: 'C:\My Documents\Material_Change_DDMMYYYY.xls' where DDMMYYYY is the current date.

Regards,

Suman

Moderator message: very basic, please read ABAP documentation and search for information before posting.

Message was edited by: Thomas Zloch

2 REPLIES 2

Former Member
0 Kudos

You have to use AT SELECTION-SCREEN OUTPUT.

data: date type string,

        value type string.

AT SELECTION-SCREEN OUTPUT.

date = sy-datum.

concatenate 'C:\My Documents\Material_Change'  date '.XLS into value.

p_file = value.

Kartik2
Contributor
0 Kudos

Hi,

you can do it as below -

   PARAMETERS : p_file TYPE string LOWER CASE.

DATA :

  lv_string TYPE string.

AT SELECTION-SCREEN OUTPUT.
  CONCATENATE 'C:\My Documents\Material_Change_'
              sy-datum
              '.xls'
              INTO lv_string.

  p_file = lv_string.

Thanks and regards,

kartik