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: 

Updating the Custom table with the date and time.

Former Member
0 Kudos

Hi Gurus,

I have a Custom table in which I am maintaing HR Manager names for employees using Personnel Sub Area as a medium. I have a requirement of having two more fields in the table with the Last changed date and time. I want the latest HR MAnager names tobe retrieved by smartform? How can this be done.

4 REPLIES 4

Former Member
0 Kudos

Wether you read the infotype 0002 at the end of time date.


data : lt_0002 type standard table of p0002.


  CALL FUNCTION 'HR_READ_INFOTYPE'
    EXPORTING
     TCLAS                 = 'A'
      PERNR                 =   " pernr to be read
      INFTY                 =  '0002'
     BEGDA                 = '99991231'
     ENDDA                 = '99991231'
    TABLES
      INFTY_TAB             = lt_0002
   EXCEPTIONS
     INFTY_NOT_FOUND       = 1
     OTHERS                = 2
            .

you then have the infotype into the table.
Fieldname Nachn and vorna...

or you can use employee get details bapi

franois_henrotte
Active Contributor
0 Kudos

1) add the two fields AEDAT and AETIM to your table definition

2) re-generate the maintenance screen and set the fields as "display only"

3) go to maintenance screen generator (SE54) in the menu Environment/Events : there you can provide some form routines of your maintenance program that will be run when certain event occurs. Set the event "01" with some form routine, then create the code and fill the two fields.

This way each record will always have the date of last modification.

0 Kudos

Can you please explain me with steps?

Former Member
0 Kudos

thanks