HR - Get inactive personnel

Hi All,
Im using PNP logical databese to retrieve certain records from table PA0009 based on the company code provided in the selection screen.
However, I realize using GET PERNR, it seem the personnel under status Eg. Terminate, withdrawn. are not being selected out. It is correct?
Can anyone advise how can retrieve the those inactive personnel only based on the company code entered in the selection screen as I know only table PA0000 is stored the status only. Please kindly advise. Thanks.

Hi Hari,
I understand you would like to get Inactive User in Domain based on Last Logon Time Stamp per article:
https://gallery.technet.microsoft.com/scriptcenter/Get-Inactive-User-in-78b8db79
The script should be OK, however, there are might be some reasons that it doesn't return expected result:
1.Since DC replication is not immediately, results are varying from DC servers if there is more than one DC servers in your domain.
2.LastLogonTimeStamp would log the time when you last log on, if you are still logging on the server, the time stamp should be the last time you logged off.
Please refer these two articles:
http://social.technet.microsoft.com/wiki/contents/articles/22461.understanding-the-ad-account-attributes-lastlogon-lastlogontimestamp-and-lastlogondate.aspx
http://blogs.technet.com/b/bahramr/archive/2008/01/25/powershell-script-to-disable-inactive-accounts-in-active-directory.aspx
You could run the script after DC replication is completed.
Regards,
Rebecca Tu
TechNet Community Support

Similar Messages

  • How to get the personnel plan work schedule

    Hi,
    I write a report ,need get the personnel plan work schedule of the input month.
    for example:
    at input screen : I input : 2007-01  and pernr:10000001;
    I hope get the plan work schedule days (rusult :25 work days)of  the  person 10000001  at  January 2007 .
    Now I find some HR TM functions ,such as :
    HR_PERSONAL_WORK_SCHEDULE
    HR_PERSONAL_WORK_SCHEDULE_PNP
    but I don't know how to test , I had try many times ,but not get what I want . so I want to know if have any other function can make me get what I want .

    Hi Olivia,
    tables: ptpsp.
    parameters:
    pernr type pa0001-pernr,
    begda type pa0001-begda,
    endda type pa0001-endda.
    data:
    i_ptpsp type table of ptpsp.
    <b>CALL FUNCTION 'HR_PERSONAL_WORK_SCHEDULE'</b>
           EXPORTING
               <b> PERNR             = PERNR
                BEGDA             = BEGDA
                ENDDA             = ENDDA</b>
              KUG               =
              REFRESH           = 'X'
              WORKING_HOURS     = 'X'
              SWITCH_ACTIV      =
              MODIFY_ENTRIES    = 'X'
              I0001_I0007_ERROR = '0'
         IMPORTING
              WARNING_OCCURED   =
           TABLES
              I0000             =
              I0001             =
              I0002             =
              I0007             =
              I0049             =
              I2001             =
              I2002             =
              I2003             =
      <b>          PERWS             = I_PTPSP</b>
         EXCEPTIONS
              ERROR_OCCURED     = 1
              ABORT_OCCURED     = 2
              OTHERS            = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    table <b>I_PTPSP</b> is having all the data u needed..

  • ODS and Transformations get inactive after i transport it in PD.

    i have transported my  ETL model in production , Now Everything what we have transported has come into production system but transformation and ODS in our ETL model get inactivated . Also while i want to display the transformation it give massege that " 'the infosource that we have created  before the transformation in not active and can not be used . ' 
    Our ETL model is like
    Cube(now Active)  --- tranformation(Now is in not active state) --  ODS(Now is in not active state) -- transformaion(Now is in not active state) -- infosource(Now in active state) -- transformation(Now in active state) -- PSA .
    the part    ": tranformation --  ODS -- transformaion " gets inactivated after transportation also DTP which pull data from ODS to cube also get inactive .
    Please suggest me to how i can activate these inactive object  or i have to transport these object again to PD
    Thanks .

    Hi Bryan ,
            Yes data was their inside the ODS  while transporting , Now i have successfully transported the request , nd now activating ODS transformation nd DTP . Actually i got a prog to activate transformation and DTP and want to share with all ...  . i juz activate mt DTP and transformation though these prog .
    Program for DTP ACTIVATION
    *& Report  ZDTP_ACTIVATE
    *Coded by NBS BI team
    *Date: 15-JAN-2010
    *Function: For DTPs activation
    REPORT  ZDTP_ACTIVATE.
    TYPES: BEGIN OF t_dtp,
    dtp LIKE rsbkdtpstat-dtp,
    objstat LIKE rsbkdtpstat-objstat,
    src LIKE rsbkdtp-src,
    tgt LIKE rsbkdtp-tgt,
    END OF t_dtp.
    TYPES: i_dtp TYPE STANDARD TABLE OF t_dtp.
    DATA: lv_output(255) TYPE c,
    lv_subrc TYPE sysubrc,
      tab_dtp TYPE i_dtp,
      r_dtp TYPE REF TO cl_rsbk_dtp.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: p_id TYPE char35.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      FIELD-SYMBOLS: <fs_dtp> TYPE t_dtp.
      REFRESH tab_dtp.
      SELECT * FROM rsbkdtp AS a JOIN rsbkdtpstat
             AS b ON adtp = bdtp INTO
            CORRESPONDING FIELDS OF TABLE tab_dtp
             WHERE a~dtp = p_id AND
                a~objvers = 'A' AND
                  b~objstat = 'INA'.
      IF tab_dtp IS NOT INITIAL.
        LOOP AT tab_dtp ASSIGNING <fs_dtp>.
          CALL METHOD cl_rsbk_dtp=>factory
            EXPORTING
              i_dtp   = <fs_dtp>-dtp
            RECEIVING
              r_r_dtp = r_dtp.
          IF sy-subrc = 0.
            CALL METHOD r_dtp->activate
              EXPORTING
                i_objvers             = rs_c_objvers-modified
                i_force_activation    = rs_c_true
                i_show_check_protocol = rs_c_false
                i_with_cto            = rs_c_true
              IMPORTING
                e_subrc               = lv_subrc.
            IF lv_subrc = 0.
              CONCATENATE 'Activated DTP : ' <fs_dtp>-dtp ' : ' <fs_dtp>-src '->' <fs_dtp>-tgt INTO lv_output.
            ELSE.
              CONCATENATE 'DTP : ' <fs_dtp>-dtp ' : ' <fs_dtp>-src '->' <fs_dtp>-tgt ' Could Not be Activated' INTO lv_output.
            ENDIF.
          ENDIF.
          WRITE:/ lv_output.
        ENDLOOP.
      ELSE.
        WRITE:/ 'DTP is not Inactive'.
      ENDIF.
    Program for TRANSFORMATION ACTIVATION
    **& Report  ZTRFN_ACTIVATE
    *Coded by NBS BI team.
    *Date: 15-Jan-2010
    *Function: Activates in-active transformation only.
    REPORT  ZTRFN_ACTIVATE.
    TYPES: t_tran TYPE rstran,
    i_tran TYPE STANDARD TABLE OF t_tran.
    DATA: r_tran_maintain TYPE REF TO cl_rstran_maintain,
    lv_subrc TYPE sy-subrc,
    lv_output(255) TYPE c,
    tab_tran TYPE i_tran,
    i_s_source TYPE rstran_s_tlogo,
    i_s_target TYPE rstran_s_tlogo.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: p_id TYPE char35.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      FIELD-SYMBOLS: <fs_trans> TYPE t_tran.
      REFRESH tab_tran.
      SELECT * FROM rstran
      INTO TABLE tab_tran
      WHERE tranid = p_id AND objvers = 'A' AND objstat = 'INA'.
      SORT tab_tran.
      IF tab_tran IS NOT INITIAL.
        LOOP AT tab_tran ASSIGNING <fs_trans>.
          TRY.
              CREATE OBJECT r_tran_maintain
                EXPORTING
                  i_tranid       = <fs_trans>-tranid
                  i_s_source     = i_s_source
                  i_s_target     = i_s_target
                  i_expert       = rs_c_false
                  i_mode         = rsawc_c_tfc-display
                  i_with_message = rs_c_true.
            CATCH cx_rstran_not_found .
            CATCH cx_rstran_input_invalid .
            CATCH cx_rstran_cancelled .
            CATCH cx_rstran_not_authorized .
            CATCH cx_rstran_display_only .
            CATCH cx_rstran_already_exist .
            CATCH cx_rstran_error_with_message .
          ENDTRY.
          CALL METHOD r_tran_maintain->check
            EXPORTING
              i_with_display = rs_c_true
            IMPORTING
              e_subrc        = lv_subrc.
          IF lv_subrc = 0.
            CONCATENATE 'Activated Transformation : ' <fs_trans>-tranid ' : ' <fs_trans>-sourcename '->' <fs_trans>-targetname INTO lv_output.
          ELSE.
            CONCATENATE 'Transformation : ' <fs_trans>-tranid ' : ' <fs_trans>-sourcename '->' <fs_trans>-targetname 'Could Not be Activated' INTO lv_output.
          ENDIF.
          IF lv_subrc = 0.
            TRY.
                CALL METHOD r_tran_maintain->execute
                  EXPORTING
                    i_wrkmode = cl_rstran_stat=>wrkmode_activate
                  IMPORTING
                    e_subrc   = lv_subrc.
              CATCH cx_rstran_cancelled .
              CATCH cx_rstran_error_with_message .
              CATCH cx_rstran_display_only .
            ENDTRY.
          ENDIF.
          WRITE:/ lv_output.
        ENDLOOP.
      ELSE.
        WRITE:/ 'Transformation is not Inactive'.
      ENDIF.

  • Update Rules gets inactive automatically

    Hello All,
    After the transport of the Update rules with the related objects to the not modifiable system, everything works fine for some time. But after sometime many update rules gets inactive automatically. We  hav'nt changed the Info provider or transported any thing.
    We are in BI 7.0.Can any one help me to analyse this issue.
    Thanks,

    Hi,
    This problem may ocurs due to dependecies on the objects that you transported, any way you can activate them using the below Program,
    Go to SE38
          Run the program : RSAU_UPDR_REACTIVATE_ALL
          Give the necessary details and execute the Program.

  • Alerts in Satelite System configured in Solman sometimes will get inactive

    I want to setup some alerts for a satellite system into solution monitoring, after the activation of some alerts, we have some problems .
    For example I have activated  into alerts server--> Setup Monitoring --> Cpu utilization
    When I want to check the alert into Solution Monitoring --> System Monitoring/Administration, I see in the system box a grey diamond, if I select the system, I have a component list, with two columns Rating and Component Description.
    The column Rating it's grey diamond and said Node MTE is inactive, I select  the component and get the alerts list.
    In the alert Utilization have the grey diammond, but in column Value, I see that the alert have a value.
    If I refresh, sometimes I can see that the Rating get colour green, and other times grey diamond, every time I refresh the Rating will have different States.
    I need to navigate at last level, to see if alert it's working ok or not, and with a lot of alerts that it's not practical.
    Somebody could help me?
    Thanks in advance
    Alberto

    Hi Alberto,
    unfortunately I can't help you. But I can confirm the problem. The same problem appears in my system, too.
    But the most time with the MTE Node "CPU Utilisation"
    Maybe you can try to deactivate the monitoring in the setup of system monitoring in TX dswp.
    That sometimes solves the problem for a while.
    regards
    Tobias
    Edited by: Schlosser Tobias on Jan 14, 2010 11:14 AM

  • User session  connected to forms  freq get inactive in oracle

    Hi
    we are having oracle 10.2.0.3 on aix 5.3 RAC environment. we are having monitor database scripts to check how the session and how many long running sessions are there like this? but on last few days we found that suddenly out of two nodes one node only got session increasing(long running session) on the next node is normal and if we found most of the session were goes into inactive that too especially those who are connected to the oracle forms
    terminal. i took awrrpt.sql but i m not much familiar to find the exact reasons from that report i just look the sql queries but i could not find any difference due to the query ? i m thinking of some of the questions
    1.) why the sessions goes inactive when they are connected to forms?
    I know its very strange thing of asking questions to someone abt my environment but i just want to know from anybody that they might had this issue earlier.
    Now after looking that thing what i understood from my knowledge is
    1.) Sessions more inactive
    2.) esp. for forms
    3.) that too on one node most freq.
    4.) is this problem due to any recent time deployment on production from forms?
    Pls anybody guide me ...
    Thanks
    M.Murali..

    Hi
    thanks for prompt reply.yeah these are situations but i cant predict how come all of suddenly goes into inactive session and there is no sql_id is also there to want to find where it get strucks? but someday when user logged complaints like when they are click one button it goes hangs.At tht time i traced his/her sessions from backend there is query which works fine in backend(database level) but when i m monitoring couldn't find any sql is so i dont know is the real problem with database or what?
    Thanks
    M.Murali..

  • Emp seperation report (How can I get inactive emp separately)

    Hi.. Frdzs,
    We have employee separation report in this my client requirement is he want to generate inacive (status) separately, regarding this I have taken STATUS as out field but through this I'm getting all status (acive, Inactive, etc).
    So, pls let me know how can I get employees report status wise.
    Awaiting for ur reply.
    $Lakshmi

    Hi,
    Have you selected the Value 1 in the Employee Status field. Then definetly, you will get the Employee list who are all in the Inactive State.
    Good Luck
    Om
    Reward it, if u feel helpful.

  • Delete Position with an Inactive Personnel Number

    I have a position active in OM.  The pernr tied to the A 008 relationship does not exist.  How this happened is unsure, but I need to remove the position or the A 008 relationship as it is affecting reporting.
    I've tried a PO13 to simply delete the relationship and have also tried program RHRHDL00 to remove the relationship, and the position object itself.
    I'm given the error that "Personnel Number does not exist" when I try all methods of deletion.
    Thoughts?
    Cheers,
    Stephen

    I thought of that too, but there is no maintenance dialog for HRP1001 or did I miss something?
    If your referring to get an ABAPer or a DBA to do it I could of course got that route.
    I was trying to solve this functionally.
    Thanks.
    Stephen

  • How to get inactive BOM by using FM?

    dear all,
    we are used to get BOM list by using FM 'CS_BOM_EXPL_MAT_V2 ';
    but when there is a inactive BOM,FM 'CS_BOM_EXPL_MAT_V2 '  can only be used to get the first level materials,
    pls tell me how can i resolve this problem,or there may be an another FM for this situation?
    tks!
    Edited by: snow zeng on Dec 22, 2009 10:29 AM

    haha,that's a solution:
    CS11- BOM explosion with status inactive

  • How to get Inactive sites information at web application level

    How can i get the inactive sharepoint sites information through sql server

    Hi Ravikiran,
    SharePoint sites can be stated as 'unused' but cannot be stated as 'inactive'. On the other hand inactive is a term suitable for databases.
    SQL Server can give you information on inactive databases but to collect information of unused SharePoint sites you should navigate to Central Administration tool.
    Refer this TechNet article: https://technet.microsoft.com/en-us/library/ff631154(v=office.14).aspx

  • [Icons] Get inactive version

    Hi all,
    We can see the whole set of icons available in SAP through SHOWICON or RSTXICON programs, or even through SE16 on ICON table.
    But what about inactive icons? The ones we can see when the function is not available to us in the SAP Gui...
    Is there a trick to get them - programatically - since I would like to have them for my BSP applications.
    Thanks in advance.
    Best regards,
    Guillaume

    Hi Suresh,
    That was what I was afraid of...
    I was kind of hoping there was a trick where the icon was somehow modified "on-the-fly" as it seems to be done with ABAP Look & Feel Service.
    Best regards,
    Guillaume

  • Transferring inactive personnel numbers via IDOC (HRMD_A) - how?

    Hello everyone,
    we are using IDOCs of type HRMD_A to transfer some infotypes (0,1,2,3 and a few others) of all employee numbers from the HR system to the FI system. The transfer is initiated using transaction PFAL with transfer type "Insert". So far, so good.
    Now we find that employees that have gone inactive (e.g. left the company) are not being transmitted, not even if in PFAL the time period selection is set to "ALL". As the consequence, these personnel numbers remain active in FI because their exit action is never being transmitted.
    Since transaction PFAL uses object type and object id parameters for identification of the objects to be transmitted, I reckon that object-selection is OM-based. By setting object type to 'P' and leaving object ID blank, I choose to transfer all personnel numbers that are known in OM. Once an employee exits the company, however, he is effectively leaving the OM, seeing that he no longer occupies a position. I take it that this causes this personnel number no longer to be transmitted, even though in past periods she existed in the OM, and even though time period "all" was selected in the selection-screen of PFAL.
    A possible factor in this may be that sometimes exits of employees are maintained in the HR system retrospectively, i.e. after they have already left the company.
    How can I deal with this and make sure all personnel numbers are being transmitted including the information that they have left the company? As it is now, these personnel numbers remain "active" in the FI system forever, because PFAL on the HCM system stops transmitting them for good once they have become inactive.

    1. start BD61 and active globaly change pointers
    2. start sm31 and maintain V_TBDA2 for activation change pointers  for HRMD_A message
    3. start we20 and check you linked system for message HRMD_A
    4. start bd64 and check you distibution model for HRMD_A.
    if all this step is configured you can chang master data via ppome or pa30 and check via re_rhalecps generated changepointers.
    than you can use bd21 for hrmd_a message for generated master hr data in outbound idoc (use we02 to see outbound idocs)

  • BEx Report: How to get Inactive Customers from past 2 years

    Hi Gurus,
    Our requirement is to  develop a BEx report to display inactive customers (Customers who does not have any sales from past 2 years)
    We have a Multi-provider which has Invoice Cubes with all transaction data. the Multi provider does not contain Customer master info object, It Contains only Invoice cubes for Euro and North America.
    Now we need to build a report on top of this Multi provider and achieve the inactive customer logic.
    I request anyone who have worked on this kind of report, please help me with this.
    Please note that we are using BI 7.
    Thanks and Regards,
    Rama.

    Thanks all for you replies,
    Rahul, We have Customer infoobject in the invoice cube, but not the customer master data infoobject itself separately.
    So we have to use the customer infoobject included as part of the invoice cubes.
    there is a similar concept called Slow moving Material.. which can be achieved in a similar way..
    There is an example in Sap help portal on this. Not sure how we can do that for Inactive customers..
    Any more ideas welcome.
    Thanks and appreciate all your efforts to contribute to this..
    Regards,
    Rama.

  • Get Inactive User in Domain based on Last Logon Time Stamp

    Dear Experts,
    I have used this code, but it is not displaying proper result, please help me how to display only "Daysinactive=90", for me it is display all the user.Please help me
    # Gets time stamps for all User in the domain that have NOT logged in since after specified date 
    # Mod by Tilo 2014-04-01 
    import-module activedirectory  
    $domain = "domain.mydom.com"  
    $DaysInactive = 90  
    $time = (Get-Date).Adddays(-($DaysInactive)) 
    # Get all AD User with lastLogonTimestamp less than our time and set to enable 
    Get-ADUser -Filter {LastLogonTimeStamp -lt $time -and enabled -eq $true} -Properties LastLogonTimeStamp | 
    # Output Name and lastLogonTimestamp into CSV  
    select-object Name,@{Name="Stamp"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp).ToString('yyyy-MM-dd_hh:mm:ss')}} | export-csv OLD_User.csv -notypeinformation
    Hari

    Hi,
    Use the -AccountInactive parameter of Search-ADAccount:
    http://ss64.com/ps/search-adaccount.html
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How to ?...:Tracing   causes of  a status getting inactive..

    I have encounterd  this problem. A billing request was created for a service order. The Staus PTBL  should have been set . On further checking, a find that the  staus was mande in  active . Is there any way to find the source that made this PTBL status inactive?

    Hi,
      Lock the report to a new transport request from SE09/10 transaction and try to generate the same, 
    Hope this helps,
    Rgds,

Maybe you are looking for

  • Excise invoice date and delivery date difference..

    Hi all, 1. Excise invoice is generated in the month of July for the delivery happened in June. Is there any implications? When i do registry update and Utilisation, does it have an effect? 2. Pending Excise are yet to be created for the month of June

  • TS3899 I am not able to excess my email on my iphone and ipad.

    I kept changing the email password in the Accounts Yahoo!. However, it doesn't seems to change at all. My iphone and ipad doesn't seems to be able to excess to my yahoo email. It just prompt out - the user name or passwork for "apple.imap.mail.yahoo.

  • Error 4261 in i tunes

    After successfully burning CDs for the car for 4 years I now get error 4261. I have tried different manufactures of CDs, I have tried slowing the burning rate. I have restored my comp to a point I was last successful. I did try to download the latest

  • Listeners are going down frequently..

    Hi, I have two node cluster databases.in that cluster 5 databases are running. We have configuared 2 listeners for each database and registered in OCR.But frequently some listeners are going down or UNKNOWN state from first node only. everything is r

  • HR Auth: Social Security Number

    Hi! Social Security number is listed among other information in InfoType 0002. Can you set authorizations so that the user would see all other information of IT 0002 exept the Social Security Number? I.e how to rule out the users visibility to Social