<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Pernr could not be locked' error while using FM BAPI_EMPLOYEE_ENQUEUE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100166#M1972647</link>
    <description>&lt;P&gt;Thanks for the info man. But I don't think that's the issue because we are using the same user to create/delete other infotypes like 0014 (recurring) and modify 0008 and it works out fine. With 0041 infotype its not working. &lt;/P&gt;</description>
    <pubDate>Sun, 24 Nov 2019 15:13:35 GMT</pubDate>
    <dc:creator>Kirubakar</dc:creator>
    <dc:date>2019-11-24T15:13:35Z</dc:date>
    <item>
      <title>Pernr could not be locked' error while using FM BAPI_EMPLOYEE_ENQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100164#M1972645</link>
      <description>&lt;P&gt;Hey Guys, &lt;/P&gt;
  &lt;P&gt;I understand this is a very common issue and has been asked here in the forums extensively, but hear me out here! Trust me, I have checked so many posts here in the community and tried a variety of different things. But no luck. &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Business Scenario: &lt;/STRONG&gt;I am trying to modify Infotype 41 nd add a certain date type through a BADI when P2P replication happens from SuccessFactors to Employee Central Payroll. &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Sequence of Calls: &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;1. BAPI_EMPLOYEE_ENQUEUE&lt;/P&gt;
  &lt;P&gt;2. HR_INFOTYPE_OPERATION&lt;/P&gt;
  &lt;P&gt;3. BAPI_EMPLOYEE_DEQUEUE&lt;/P&gt;
  &lt;P&gt;Standard stuff right?!!!&lt;/P&gt;
  &lt;P&gt;Guess not!&lt;/P&gt;
  &lt;P&gt;I get an error during 'BAPI_EMPLOYEE_ENQUEUE&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Error: &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1751564-error.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Solutions Tried:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;- I am following the best practice and only locking the employee once per all the info type updates&lt;/P&gt;
  &lt;P&gt;1. Checked IT003 if the employee is locked - &lt;STRONG&gt;Not locked&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1751565-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;2. Tried Running 'BAPI_EMPLOYEE_DEQUEUE' in SM37 and then tried running the BADI again. - &lt;STRONG&gt;No Luck&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;3. Checked SM04 -&lt;STRONG&gt; I cant see any User based lock on that employee&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;4. Check SM12 - Nothing!&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1751566-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;5. Ran FM 'ENQUEUE_READ' to check for any locks on the PERNR -&lt;STRONG&gt; nope NADA&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1751567-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;6. Even tried 'IF_HR_ENQUEUE_OBJECT' - Yup you guessed it.... NOTHING1&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1751568-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I have tried everything. What could be the issue?&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Kriba&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 18:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100164#M1972645</guid>
      <dc:creator>Kirubakar</dc:creator>
      <dc:date>2019-11-22T18:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Pernr could not be locked' error while using FM BAPI_EMPLOYEE_ENQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100165#M1972646</link>
      <description>&lt;P&gt; @&lt;A href="https://answers.sap.com/users/867685/kribaezhilmani1.html"&gt;Kriba Ezhilmani&lt;/A&gt; I could see you have tried most of the possible options, nothing has worked out.&lt;/P&gt;&lt;P&gt;As I guess before we access any HR data, authorization comes into picture, it could be possible user id inwhich you are running the program doesn't authorize to read any HR data which could have caused failure in locking.&lt;/P&gt;&lt;P&gt;Check with Security team and try taking Authorization trace to check if any authorization is failed when you run ENQUEUE.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2019 11:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100165#M1972646</guid>
      <dc:creator>ThangaPrakash</dc:creator>
      <dc:date>2019-11-23T11:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pernr could not be locked' error while using FM BAPI_EMPLOYEE_ENQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100166#M1972647</link>
      <description>&lt;P&gt;Thanks for the info man. But I don't think that's the issue because we are using the same user to create/delete other infotypes like 0014 (recurring) and modify 0008 and it works out fine. With 0041 infotype its not working. &lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 15:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100166#M1972647</guid>
      <dc:creator>Kirubakar</dc:creator>
      <dc:date>2019-11-24T15:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Pernr could not be locked' error while using FM BAPI_EMPLOYEE_ENQUEUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100167#M1972648</link>
      <description>&lt;P&gt;Resolved: The issue was that a
double locking was being attempted. The system locks a PERNR for the P2P
replication to happen. And in the BADI I was attempting to lock the employee
again using 'BAPI_EMPLOYEE_ENQUEUE' before updating the infotype, which is the best practice. This was
causing the issue. Once I removed the locking mechanism within the BADI, it
worked perfectly.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 15:47:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pernr-could-not-be-locked-error-while-using-fm-bapi-employee-enqueue/m-p/12100167#M1972648</guid>
      <dc:creator>Kirubakar</dc:creator>
      <dc:date>2019-11-25T15:47:38Z</dc:date>
    </item>
  </channel>
</rss>

