03-31-2010 8:09 PM
Hi SAP Gurus
I wanted to add a field in my table that will capture DateTime stamp for records creation. Could u pls let me know how can i do that.
Thanks....
03-31-2010 8:15 PM
Please add fields Created On, Time Created of type data element ERFDATE (Created On) and ERFTIME (Time Created) in your table. Pass sy-datum to ERFDATE when you are creating the record and SY-UZEIT to ERFTIME field.
03-31-2010 8:15 PM
Please add fields Created On, Time Created of type data element ERFDATE (Created On) and ERFTIME (Time Created) in your table. Pass sy-datum to ERFDATE when you are creating the record and SY-UZEIT to ERFTIME field.
03-31-2010 8:57 PM
Thanks for all for helping me in resolving the issue. I gave the points accordingly to all.
Just wanted to let u know that i found Chandravadan's solution coz it looksed easier for me as Non-abaper.
Thanks...
03-31-2010 8:22 PM
You need a field of type ICL_TIMESTAMP.
Convert date sy-datum
time sy-uzeit
into time stamp <new field>
time zone sy-zonlo.
03-31-2010 8:23 PM
capture the time just before the insert:
DATA: BEGIN OF wa,
...
time_stamp TYPE timestampl,
...
END OF wa.
...
GET TIME STAMP FIELD wa-time_stamp.
INSERT dbtab FROM wa.
03-31-2010 8:25 PM
Add a field to your table with a domain of TIMESTAMP. Use a FM like NBWD_TIMESTAMP_GENERATE to populate it.
Rob