cancel
Showing results for 
Search instead for 
Did you mean: 

What is the code to display current time in BSP Application in Input Screen

Former Member
0 Kudos

Hi friends,

What is the code to display current time in BSP Application in Input Screen?

Moosa

Accepted Solutions (1)

Accepted Solutions (1)

former_member184111
Active Contributor
0 Kudos

Hi Moosa,

The question is not clear.Please explain your requirment.

If you want to display urrent time on a BSP page..use a htmlb:textview element with

attribute text = <%= sy-uzeit %>

Regards,

Anubhav

Former Member
0 Kudos

Hi anubhav its working fine.

Time is displaying 144037 like this instead of 10:40:37 what to do for that and i want increase the time diplay font size also.?

Moosa

Former Member
0 Kudos

Hi

Not 10:40:37

its 02:40:37

former_member184111
Active Contributor
0 Kudos

Hi Moosa,

The value of sy-uzeit is the current value of application time.

For displaing it in 10:40:37 format you need to

DATA: hr(2),
          min(2),
          sec(2),
         lv_time type string.

hr = sy-uzeit+0(2)

min = sy-uzeit+2(4)

sec = sy-uzeit+4(6)

concatenate lv_time hr ':' min ':' sec into lv_time .

To display in bold..

<htmlb:textview text="<b><font size=15><%= lv_time %></font></b>">

0 Kudos

Moosa,

Following the easy way to do it:

DATA: l_time_beg(8), l_time(5).

l_time_beg = page->To_String( value = Application->ORDER_ITEMSC-BTIME ).

<htmlb:inputField id = "ID_DLV_BTIME"

value = "<%= l_time_beg %>"

type = "time"

doValidate = "TRUE"

size = "8"

maxlength = "8" />

Best Regards,

Alexandre

Answers (1)

Answers (1)

raja_thangamani
Active Contributor
0 Kudos

Even better you can use below code:

  <%= page->write( sy-uzeit ). %> 

Raja