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: 

rp-provide-from-last p0002 space pn-begda pn-endda.

Former Member
0 Kudos

         
Hello Gurus,

I need to know what is the sintax to get a particular person from PNP using

rp-provide-from-last p0002 space pn-begda pn-endda.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Or even better, someone knows a FM that can tell me if an employee is Active?


5 REPLIES 5

Former Member
0 Kudos

Or even better, someone knows a FM that can tell me if an employee is Active?


0 Kudos

I suppose 'HR_READ_INFTY'

0 Kudos

Hi

Maybe You can try use the report S_PH0_48000510   with employment status '3 Active'.

I dont remember how use this report but you could try.

0 Kudos

Hello Enrique,

Check this code, if the sy-subrc as equal 2, employee is inactive:

*&--------------------------------------------------------------------*

*&      Form  check_pernr_exists

*&--------------------------------------------------------------------*

*       Check if employee exists

*---------------------------------------------------------------------*

*      -->P_PERNR    Personnel Number

*      <--P_SUBRC    Return code

*---------------------------------------------------------------------*

FORM check_pernr_exists USING p_pernr TYPE any

                        CHANGING p_subrc TYPE sysubrc.

  CLEAR p_subrc.

  CALL FUNCTION 'RP_CHECK_PERNR'

    EXPORTING

      beg                     = sy-datum

      pnr                     = p_pernr

*   IMPORTING

*     NAME                    =

*     PERSA                   =

*     BUKRS                   =

*     KOSTL                   =

*     MOLGA                   =

*     PERSONNEL_SUBAREA       =

    EXCEPTIONS

      data_fault              = 1

      person_not_active       = 2

      person_unknown          = 3

      exit_fault              = 4

      pernr_missing           = 5

      date_missing            = 6

      OTHERS                  = 7

            .

  IF sy-subrc <> 0.

    p_subrc = sy-subrc.

  ENDIF.

ENDFORM.                    "check_pernr_exists

0 Kudos

Thanks so much.