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

display current date & time in parameters

Former Member
0 Likes
2,613

Hi all,

I have the requirement like this.

Parameters: P_path(20).

In that i want to display the Systemdate & Time .txt.

ex: P_path : 8.26.2008.7.40.12.txt.

Here : 8.26.2008 is the system date

7.40.12 is the System time.

I want this because we are scheduling program in Background & this has to run for every One Hour.

So, P_path has to change for every one hour.

How to do this ?

Thanks

Krupali.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,395

Hi,

try this way-

Parameters:p_char(20) type c.

Initialization.

Concatenate
sy-datum sy-uzeit into p_char separated by '.'.

7 REPLIES 7
Read only

Former Member
0 Likes
1,396

Hi,

try this way-

Parameters:p_char(20) type c.

Initialization.

Concatenate
sy-datum sy-uzeit into p_char separated by '.'.

Read only

Former Member
0 Likes
1,395

Hi,

Do something like this in the initialization part of your abap.


Initialization .

concatenate sy-datum sy-uzeit into p_path

Hope this helps,

Erwan

Read only

Former Member
0 Likes
1,395

First use concatenate in the initialization event, this will display the required string as default value on the selection screen.


concatenate sy-datum sy-uzeit 'txt' into p_path separated by '.'.

Read only

Former Member
0 Likes
1,395

Hello,

Onw approach would be to use the Initialization event.

At that even concatenate the vaule for today's date and time into the paramter for the filename/path.

Regards

Greg Kern

Read only

Former Member
0 Likes
1,395

see below code block.

INITIALIZATION.

CONCATENATE sy-datum sy-uzeit '.txt' INTO string.

here string is your parameter.

Regards,

Pranav

Read only

Former Member
0 Likes
1,395

Hi KR,

Try this:

INITIALIZATION..

CONCATENATE sy-datum sy-uzeit into p_path separated by '.'

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
1,395

Hi,

Define two parameters with DATE (SY-DATUM)

TIME (SY-UZEIT)

CONCATENATE THE FILE & PATH, DATE AND TIME INTO SEPARATE STRING

Thanks

SEK