cancel
Showing results for 
Search instead for 
Did you mean: 

Doubts in fetching the latest record of employees

Former Member
0 Kudos

Hi experts ,

I have a doubt.I am working on smart forms.I need to fetch the latest details of employees.

Some forms are action based and as well as non action based.I think for non action based to fetch the latest record we can give the condition as begda le sydatum and endda ge sy-datum in the where clause.I want to know how to fetch the latest record for action based forms.

Accepted Solutions (0)

Answers (2)

Answers (2)

venkat_o
Active Contributor
0 Kudos

Sreenivasan, Just follow the steps to get the latest record for the employee within the given period. 1.Define internal table for the infotypes

INFOTYPES:0000,0001.
2. Use the below Include.
Include DBPNPMAC.
3.Use the below function module to get employee information by giving some inputs mentioned.
HR_READ_INFOTYPE
        Exp.  <-- Pernr 
                 <--Infotype
                 <-- Begda
                 <--   Endda
      Tables <--Infotype Table
4.use the macro to read the latest record.
RP-PROVIDE-FROM-LAST p0000 space <start-date> <end-date.
"space--> when there is no subtype for the infotype.
If you are working on form for HR purpose why dont u use PNP logical database to write Driver program .. I hope that it helps you. Regards, Venkat.O.

Former Member
0 Kudos

Hi Srinivasan,

You can make use of set parameter and get parameter for the action based forms.

Try out and let me know,

Regards,

Swapnil