09-16-2008 7:41 AM
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.
09-16-2008 9:16 AM
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
09-16-2008 9:18 AM
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.
09-16-2008 10:16 AM
12-22-2010 12:37 AM