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: 

Insert data with default user id , date and time in se80

suityan98
Explorer
0 Kudos

I have performed inserting of data into a table. However, there is another requirement which is the table required data including created by, created date, and create time.

How can I insert my data with the default username, default date, and default time?

FORM GET_USERINPUT .
"get user input from the screen
clear wa_driver.
wa_driver-bukrs = gv_bukrs.
wa_driver-icno = gv_icno.
wa_driver-driver = gv_driver.
wa_driver-vehicle_no = gv_vehicleno.
wa_driver-transporter = gv_transporter.
wa_driver-validfr = gv_validfr.
wa_driver-validto = gv_validto.
wa_driver-status = gv_status.
wa_driver-reasons = gv_reasons.
wa_driver-remarks = gv_remarks.
"get default username?
"get default system date?
"get default system time?
ENDFORM.
3 REPLIES 3

abo
Active Contributor

Assuming wa_driver has the appropriate fields, this is a possibility:

wa_driver-uname = sy-uname.
wa_driver-date = sy-datlo.
wa_driver-time = sy-timlo.

system date/time required by OP, so rather sy-datum and sy-uzeit?

Sandra_Rossi
Active Contributor
0 Kudos

You can search the forum, you can imagine it has been asked hundreds of times...