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: 

current time in module pool programming in text field

Former Member
0 Kudos

Hello Friends,

In module pool programming ther is a input output field for time i want the current system time should be displayed in that field and when user press saves tht time should get saved in the database tables.

regards,

Sunny

7 REPLIES 7

Former Member
0 Kudos

hi

Pass the current time into tht variable.

w_time = sy-uziet.

Regards

faisal_altaf2
Active Contributor
0 Kudos

Hi, sunny,

If I understand your question correctly than I think that the following code will help you, you will have to write this code in the called program means where you are calling your screens.

data: tf_rec_no(10). u201Ctf_rec_nou201D is the field name on your screen

initialization.
write: sy-uzeit to tf_rec_no.

after this you can update db using this field.

Replay if any problem or you have some different query.

Kind Regards,

Faisal.

Former Member
0 Kudos

HI,

First you you pass the value of systm field SY-UZEIT to your i/o field and then you create one button and and assign OK_CODE type sy-ucomm to that . SO after entering the data and after pressing button the data will save to data base.

Regards

Sathish

Former Member
0 Kudos

Hi,

Declare a variable in TOPinclude of type sy-uzeit.

DATA: Times TYPE sy-useit.

Times = sy-uzeit.

In the PBO simply assign the value of the 'Times' to the i/o text fiels

textfield-field = Times.

In PAI on the press of some button that adds the data in the table Simply assign the value of this text field to the table field.

Table-field = text-field.

modify Table.

PS: Text field and the Table field name should be same.

Former Member
0 Kudos

Hi Sunny,

create an input box on the screen, say txttime and then in the PBO of the flow logic assign the value of sy-uzeit in the module under PBO.

Process Before Output.

module display output.

in se38 under the module display.

module display output.

txttime = sy-uzeit.

endmodule.

in PAi upon clicking a button you can save the contents on the screen into your database table (directly or via internal table).

Regards,

Sachin.

Former Member
0 Kudos

Hi,

In screen layout you can create one input field and name it i.e. ztime. In Attribute->Dict->Format select TIMS.

In PBO write the code like this:

data: ztime type t.

ztime = sy-uzeit.

It display the current system time.

Regards,

Bhaskar

Former Member
0 Kudos

thnks