Locked record in infotype 0167

Hi,
I would be thankful if some one can explain me the concept of lock record of an employee in infotype 0167.
As in one of my requirement i have to fetch both the records ie active and locked (having same begda and endda).
Is there any specific thing i need to do apart from
INITIALIZATION.
pnp-sw-ignorelockedrecords = 'N'.
Regards
Manu

Hi Manu,
Locked record means taht record id not yet ready to process / use in reporting, becuase that data is insuffient. You can lock/unlock a infotype record using pA30-0167-edit-Lock/Unlock option.
For example infotype 2001 or 2002.
Regards,
Ranjith

Similar Messages

  • How to Unlock a Locked Recoed for Infotype 2010..

    Dear Expert,
    How can I unlock a locked record from Infotype 2010. When I am using BDC how should I decide which record to select in PA30 once I have passed the date and Employee Number details on the screen.
    If on the same date if there are more than one record and if the first one is not locked then the BDC is locking them insted of unlocking it.
    Is there any function module which can help me. The Code I have used is as below.
    The field SPRPS is coming during recording but bdc gives error stating this field is not there on the screen so could not use this one as well..
    IF T_REPORT-INFOTYPE = '2010'.
              PERFORM BDC_DYNPRO USING 'SAPMP50A' '1000'.
              PERFORM BDC_FIELD  USING 'BDC_OKCODE' '=LIST'.
              PERFORM BDC_FIELD  USING 'RP50G-PERNR' T_REPORT-PERNR.
              PERFORM BDC_FIELD  USING 'RP50G-TIMR6' 'X'.
              PERFORM BDC_FIELD  USING 'RP50G-BEGDA' TEMP_BEGDA.
              PERFORM BDC_FIELD  USING 'RP50G-ENDDA' TEMP_BEGDA.
              PERFORM BDC_FIELD  USING 'RP50G-CHOIC' '2010'.
              PERFORM BDC_FIELD  USING 'RP50G-SUBTY' T_REPORT-LGART.
             PERFORM BDC_FIELD  USING 'P50G-SPRPS' 'X'.
              PERFORM BDC_DYNPRO USING 'MP200000' '3450'.
              PERFORM BDC_FIELD  USING 'BDC_CURSOR' 'P2010-BEGDA(01)'.
              PERFORM BDC_FIELD  USING 'BDC_OKCODE' '=EDQ'.
              PERFORM BDC_FIELD  USING 'RP50M-BEGDA' TEMP_BEGDA.
              PERFORM BDC_FIELD  USING 'RP50M-ENDDA' TEMP_BEGDA.
              PERFORM BDC_FIELD  USING 'RP50M-PAGEA' ' 1'.
              PERFORM BDC_FIELD  USING 'RP50M-SELE2(01)' 'X'.
              PERFORM BDC_DYNPRO USING 'MP200000' '2450'.
              PERFORM BDC_FIELD  USING 'BDC_OKCODE' '/00'.
              PERFORM BDC_DYNPRO USING 'MP200000' '2450'.
              PERFORM BDC_FIELD  USING 'BDC_CURSOR' 'P2010-LGART'.
              PERFORM BDC_FIELD  USING 'BDC_OKCODE' 'UPD'.
    Unlock the Details to the R/3 using Tcode PA30.
              CALL TRANSACTION 'PA30' USING BDCDATA MODE 'P' MESSAGES INTO MESSTAB.
    Regards,
    Vidya..

    first of all, use a BAPI instead of BDC.. HR_MAINTAIN_MASTERDATA
    you may have to do some up-front logic to determine which records to unlock, if necessary.
    EDIT: that is a FM, not BAPI.
    Edited by: robert phelan on Mar 16, 2009 8:57 PM

  • Custom Infotype not displaying locked records in the list screen (3000)

    I have a custom infotype (9xxx) that will not display the locked records (locked indicator (sprps) is set to X) in the list screen (3000) in PA20 and PA30.
    Any ideas on what may be causing the records to not display in the list screen?
    Thanks,
    Ted

    Hi,
    for creating both employee and appliciant infotype you must check 'Both'  in PM01  IT tab.
    Regards.

  • Standard Report to display locked records of an infotype

    Hi All,
    Is there any SAP standard report to display the locked records of an employee.
    Suppose for an employee his two absence record has been locked and one additional payment has been locked. Is there any SAP standard report to display his locked records.
    Thanks and Regards,
    Visali. Malepati

    Hi,
    Hi there is no standard report  to get the locked records.
    You create a query thru quick viewer.
    where you can heve selection field as lock indicator and Personnel number.
    Steps:
    1. Goto SQ01
    click Qucikviewer
    or
    SQVI
    2.Create a new query
    Datasouce:Table
    Table:PA0006
    3.Lst field Selection tab:
    Add the fields pernr,lock indicator,enddat,begdate.
    4.Selection fields Tab:
    Add the fields pernr,lock indicator
    5.Execute:
    Your Query is ready now:

  • Problem while inserting a record to infotype 416

    Iam facing a problem while inserting a record to the infotype 416 for a personnel no using the FM 'HR_INFOTYPE_OPERATION'.I have created a FM to insert a record to the infotype 416.In that FM iam using the FM 'HR_INFOTYPE_OPERATION' to create a record for infotype 416.while executing  my FM the FM 'HR_INFOTYPE_OPERATION' is returning the return value 0.But when i check in PA30 for the infotype 416,there is no record created for that personnel no.Also in the table PA0416 the record is not get created.SO what might be the problem.can anyone please provide me help on this.
    I have attached the code of my FM for ur reference.
    FUNCTION Y_ESS_FL_ENCASH.
    DATA: G_COMPENSATION_AMOUNT LIKE PA0416-AMONT,
          G_RETURN TYPE BAPIRETURN1.
    DATA T_PA0416 LIKE P0416 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
           TCLAS                 = 'A'
           PERNR                 = '00000014'
           INFTY                 = '0416'
         BEGDA                 = sy-datum
         ENDDA                 =  sy-datum
           BYPASS_BUFFER         = 'X'
         LEGACY_MODE           = ' '
    IMPORTING
         SUBRC                 =
          TABLES
            INFTY_TAB             = T_PA0416
    EXCEPTIONS
      INFTY_NOT_FOUND       = 1
      OTHERS                = 2
        LOOP AT T_PA0416
        WHERE SUBTY = '1002'.
        ENDLOOP.
        IF SY-SUBRC <> 0.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
               NUMBER = '00000014'
            IMPORTING
               RETURN = G_RETURN.
          IF SY-SUBRC <> 0.
             MESSAGE I016(RP) WITH ' RECORD IS ALREADY LOCKED'.
          ENDIF.
          T_PA0416-PERNR = '00000014'.
          T_PA0416-SUBTY = '1002'.
          T_PA0416-INFTY = '0416'.
          T_PA0416-OBJPS = ''.
          T_PA0416-SPRPS = ''.
          T_PA0416-SEQNR = ''.
          T_PA0416-AEDTM = SY-DATUM.
          T_PA0416-UNAME = SY-UNAME.
          T_PA0416-ENDDA = SY-DATUM.
          T_PA0416-BEGDA = SY-DATUM.
          T_PA0416-NUMBR = '10'.
          T_PA0416-WGTYP = '1530'.
          T_PA0416-AMONT = '15000'.
          T_PA0416-WAERS = 'INR'.
          T_PA0416-QUONR = '1'.
          APPEND T_PA0416.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '0416'
              NUMBER                 = '00000014'
              SUBTYPE                = '1002'
      OBJECTID               =
      LOCKINDICATOR          =
             VALIDITYEND            = '31129999'
             VALIDITYBEGIN          = SY-DATUM
            RECORDNUMBER           = ''
              RECORD                 = T_PA0416
              OPERATION              = 'INS'
              TCLAS                  = 'A'
      DIALOG_MODE            = '0'
            NOCOMMIT               = 'X'
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
            IMPORTING
              RETURN                 = G_RETURN.
      KEY                    =
          IF G_RETURN+0(1) EQ 'E'.
                  MESSAGE I086(ZHR) WITH 'Record is not inserted in IT416'.
          ELSE.
              COMMIT WORK.
          ENDIF.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              NUMBER = '00000014'
            IMPORTING
              RETURN = G_RETURN.
        ENDIF.
    ENDFUNCTION.

    Hi Murthy
    With a first glance, I think you have given a wrong parameter value to "validityend". It should be '99991231' not '31129999' .
    If your problem still persists, try inserting the data online from PA30. If your input causes no errors, then please state what the return parameter contains.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Creating new record in infotype during BADI

    Hi all,
    We want to use the BADI HRPAD00INFTY "Update / Infotype maintenance" for trigering an automatic creation of some infotype records using FM HR_INFOTYPE_OPERATION.
    The creation should only happen when a new record of infotype 2001 subtype GT01 is created.
    Every time when we try something we get an error on the first insert we do using the FM.
    The Enqueue goes fine (returns subrc = 0) but when doing the insert with the FM we get the error "EPG                  428A complex application error has occurred" in the return.
    We checked the data that we're passing thru the FM and there everything is fine.
    Is it possible that due to the lock of the original save is generating we can't insert anything else and how can we work around this problem?
    We also have this problem when using the user exit and we tried to do a submit to another report but there we can't even make the lock.
    Regards,
    Olivier

    Forum post in ABAP, General: Infotype reecord creation in a BAdI - Issue
    Infotype 0008 reecord creation in a BAdI - Issue
    Reward Points if useful.

  • Link between control record and infotype 0003.

    Hi all,
    Can anybody explain me, what is the link between control record and infotype 0003?
    Thanks & Regards,
    Lucky.

    Hi,
    Control record is a heart of payroll area(pa03)
    Conrtol record alswa based on payroll area where it determines the current payroll period for the exact date
    It defines the payroll past for retro active accounting recongnation.
    It lock the master data and teh time data to prevent changes from being made during the payroll run, this lock is valid for the paryroll past and the payroll present changes with effect the future can still be made.
    It determines the earliset retrocatice a/cing period.
    In simple control record is to control the payroll status of the employee
    Payroll Status:(IT 0003)
    The Payroll Status infotype (0003) contains data for Payroll Accounting and Time Evaluation.
    The system automatically creates this infotype when the employee is hired. In general, the system updates the infotype and writes the changes to the payroll past.
    You can change the payroll status of an individual employee using Payroll/Retroactive Accounting and Time Evaluation.
    Thanks
    Vibin

  • Locking records entered through ESS

    Is it possible to make it so that when an employee enters data through Personal Data, they enter locked records instead of actually writing directly to the database?
    We're researching the ability to have the employees enter locked records and then having an HR Administrator unlock them after reviewing them
    Anyone done this before?

    Tim,
    You can be selective about which Infotypes are locked by default via authorisations, as there is a seperate auth check for each Infotype available.  Where it doesn't work well is in cases where you only want the Infotype locked in some circumstances.
    Probably the ultimate solution would be something built with the new HCM Processes & Forms, and the new HR Administrator functionality on the portal side.
    I think there is already a standard example delivered for the US recently, where the usual ESS address Webdynpro has been replaced by a form that gets actioned by the HR Admins before the Infotype gets updated.
    Chris can possibly give you some more info on that, I hear he just luuuuuves that stuff
    Regards,
    John

  • Lock records when in Update Mode / problem with 2 users on 1 document

    Hi,
    when user A updates e.g. a purchase order and user B goes into this purchase order and updates e.g. the remark before user A, then user A cannot save his changes. Imagine user A has put in several new lines and has made several price adjustments, his work will be gone.
    In most cases this should not happen very often, but it could. Since B1 recognizes when another user has updated the document before, it should be possible to solve this situation more convenient (either by lock, saving to a new document, comparing to the old version, etc).
    Thank you
    Sebastian

    Hi Sebastian,
    Your request is understandable. It may not have big problem to change current process by coding. However to lock records whenever in update mode, that could create too many locks. It is basically not good for performance. The trade off may be allowing save as function. However, this may not be a desirable solution for most end users.
    Thanks,
    Gordon

  • How to lock record in a remote database ???

    Hi All!
    How to lock record in a remote table ??? Is it possible to lock by using the RPC ??? What are the options available ??
    thanks
    Sanjeeb Bose
    HCL Infosystems Ltd
    Kolkata India

    DBLinks may be one option...
    --Shirish                                                                                                                                                                                                                       

  • Short dump while changing the end date of infotype 0167 through PA30

    Hi all,
    I am getting short dump while changing the end date of infotype 0167(Health Plans) through Tcode PA30.
    dump descript is as below
    An exception occurred that was not caught.
    Runtime Errors         UNCAUGHT_EXCEPTION
    Except.                CX_HRPA_VIOLATED_POSTCOND
    Date and Time          11.03.2010 07:06:26
    What happened?
        The exception 'CX_HRPA_VIOLATED_POSTCONDITION' was raised, but it was not
         caught anywhere along
        the call hierarchy.
        Since exceptions represent error situations and this error was not
        adequately responded to, the running ABAP program
         'CL_HRPA_SAPUP50R_ADAPTER======CP' has to be
        terminated.
    thanks
    shahid

    Search OSS Notes for that.

  • Reading Locked records from HR table using LDB PNP

    Hi,
    I am trying to read the table pa0168 using LDB PNP.
    But the problem is that get pernr staement does not retrieve locked records i.e where PA0168-sprps eq "X'.
    Can anybody help me with this.
    I have to use LDB  so i don't want a solution of writing a select * for the pa0168 table.
    hence i have to use get pernr statement but it should also retrieve locked records.
    how can i achieve that.? please help
    Thanks
    GT
    Message was edited by: GT

    Hi GT,
    In the START-OF-SELECTION event, set the parameter value
    pnp-sw-ignorelockedrecords = 'N'.
    Good Luck,
    Suresh Datti
    ( Pl award points if the answer helps you )

  • How to lock records in 8.1.7?

    Hi,
    How can I lock records in 8.1.7 so that only one user can select/update these records at one time? If possible, can it return an error mesg if one user try to select/update records locked by others?
    Thanks a lot.
    David

    Oracle automatically locks a row just before updating or deleting.
    You can lock rows explicitly before doing an update etc by selecting it for update:
    select * from emp where empno=21 for update;
    update emp
    set sal=sal*1.1
    where empno=21;
    commit;
    The lock will be released on the commit (or rollback).
    Please note that in Oracle, writers never block readers and readers never block writers. Which means, that although you have locked a row (or group of rows) for update, other users will still be able to select against those rows (in the pre-changed or consistant state).

  • Fetching last but one record from Infotype

    Hello Everyone,
    Can you kindly let me know how to fetch the last but one records of IT0171 and IT0000, then compare the endda of both of the records.
    Thank you for your help.
    Regards,
    Vinod

    Hi,
    First sort your internal table by ENDDA descending.
    Then read index 2. This will give you the last but one record.
    INFOTYPES: 0171.
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr           = '506'
        infty           = '0171'
        begda           = '18000101'
        endda           = '99991231'
      TABLES
        infty_tab       = p0171
      EXCEPTIONS
        infty_not_found = 1
        OTHERS          = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
      SORT p0171 BY ENDDA descending.
      READ TABLE p0171 INDEX 2.  ---> reads the previous record of the last entry.
      write:/ 'test'.
    ENDIF.
    Regards,
    Soumya.

  • How to get locked records of a pernr while using PNP LDB

    is there any way to retrieve locked records of a pernr
    while using PNP LDB??currently the get pernr event is unable to load locked records of a pernr.

    Hi,
    PL use this piece of code in your Program..
    INITIALIZATION.
    PNP-SW-IGNORELOCKEDRECORDS = 'N'.
    Regards,
    Suresh Datti

Maybe you are looking for

  • Short closure POs in Mass

    Dear All, I want to shortclose the POs against whcih are open without receipts or partial receipts for many days (say 90). Currently all POs are released and I can not tick the "delievry completed" option for that POs without unreleaing. Also though

  • Org Unit reporting under OM

    Hello All, I always get this request from most of my end users about running a report/creating an ad hoc query that will list the Employee details of the parent Org and subsequent child Orgs (O) untill the last one available. Everytime I put the Pare

  • Multiple article select in Folio Producer [Add] article feature

    Folio Producer provides [Add] article feature allow designer collaborative workflow, thanks. I just completed adding articles from several shared folios, I would like to say, select multiple articles in folio is a MUST to make DPS sharing collaborati

  • Problems in activating the structure CI_Aufk for enhancemant CONFPP07 ?

    Hi , I got a requirement for developing a screen exit for transaction co11n ( i used CONFPP07 exit ) so i have added four field in the screen and added four field in  EXIT_SAPLCORU_S_100 --->  CAUFVD -.> CAUFVTAB-> CI_AUFK . now my problem is when i

  • Every time I click on anything on a page it opens it in a new tab. How do I make it stop?

    That's pretty much it. Any link I click on opens in a new tab. For example anything on facebook: a new notification, clicking on pictures, clicking on the facebook icon to refresh the page. I can't click on anything with out it opening a new tab.