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

parameter declaration

Former Member
0 Likes
1,045

Hi all ,

I want to hardcode a parameter in selection -screen like this

document\name\file20071120.txt .

date should be always current date .How can i do that ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,008

Hi,

SY-DATUM will be the current date or the date in which execute the program..

Is this what you want..

OR

Do you want the parameter text as "Run Date"..

Please let me know..

Thanks,

Naren

9 REPLIES 9
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,008

Hello Priya

You could code like this:

PARAMETERS:
  p_date     TYPE default syst-datum,
  p_file       TYPE filename default 'documentnamefile20071120.txt'.

Regards

Uwe

Read only

0 Likes
1,008

if i give like this it will take always 20061120 . if i run this program i need to get tommarrows date. how can i do that one?

Read only

Former Member
0 Likes
1,008

Hi

PARAMETERS:

p_date TYPE sy-datum default sy-datum,

p_file(80) TYPE c default 'document\name\file20071120.txt'.

This should work.

Regards

Kathirvel

Read only

Former Member
0 Likes
1,008

This will give next days date

START-OF-SELECTION.

V_DATE = SY-DATUM + 1.

Regards

Kathirvel

Read only

Former Member
0 Likes
1,008

HI,

Try this..

PARAMETERS: p_file TYPE filename.

INITIALIZATION.

  • For today's date.

CONCATENATE 'document\name\file' SY-DATUM '.txt'

INTO P_FILE.

  • For tomorrow's date.

DATA: V_DATE TYPE SYDATUM.

V_DATE = SY-DATUM + 1.

CONCATENATE 'document\name\file' V_DATE '.txt'

INTO P_FILE.

Thanks,

Naren

Read only

0 Likes
1,008

narendra ,

Iam looking for rundate . It should display rundate .

Read only

Former Member
0 Likes
1,009

Hi,

SY-DATUM will be the current date or the date in which execute the program..

Is this what you want..

OR

Do you want the parameter text as "Run Date"..

Please let me know..

Thanks,

Naren

Read only

Former Member
0 Likes
1,008

Do you really want the users to be able to change this? If not, make it a normal data field and not a parameter. You can still handle this programatically.

Rob

Read only

Former Member
0 Likes
1,008

Hi

PARAMETERS:

p_date TYPE sy-datum default sy-datum,

p_file(80) TYPE c default 'document\name\file'.

AT SELECTION-SCREEN OUPUT.

  • execution date

concatenate p_file sy-datum '.txt' into p_file.

start-of-selecion.

...

..

Now whenever the report is run, The execution date will populated in the file name as you wanted.

Hope this solves your problem.

Regards

Kathirvel