Skip to Content
avatar image
Former Member

Doubts in fetching the latest record of employees

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 09, 2008 at 01:57 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 09, 2008 at 02:22 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded