<?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: BAPI_EMPLOYEE_ENQUEUE not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040176#M1610697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After reading this thread, its clear that a BDC creates a PERNR, and then you dequeue it. and then you have a spearate program  update pa2006 which throws an error that it cant be locked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you try the below two things?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Are you able to create an entry from the transaction code PA30 for the new pernr?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Just check whether u came out of PA30/PA40 transactions once it is dequeued after creating PERNR.&lt;/P&gt;&lt;P&gt;even thought its not the practice, once this 'BAPI_EMPLOYEE_ENQUEUE' fails, continue the code to&lt;/P&gt;&lt;P&gt;check whether you can dequeue it by using 'BAPI_EMPLOYEE_DEQUEUE', Atleast we will try to understand whether we do really have an issue with locking the pernr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jul 2011 13:25:36 GMT</pubDate>
    <dc:creator>Shahid</dc:creator>
    <dc:date>2011-07-15T13:25:36Z</dc:date>
    <item>
      <title>BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040167#M1610688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;  We are using the FM  BAPI_EMPLOYEE_ENQUEUE to lock the pernr while  creating the infotypes ,but sometimes the FM wil not work any idea what is the issue ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;CB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 11:09:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040167#M1610688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-14T11:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040168#M1610689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;what do you mean by not work?&lt;/P&gt;&lt;P&gt;do you get an error message?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 11:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040168#M1610689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-14T11:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040169#M1610690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;  IT gives the error saying the "Personal  number couldn't be locked" ,even thought we are  using below FM's &lt;/P&gt;&lt;P&gt;Lock the Pernr&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'BAPI_EMPLOYEE_ENQUEUE'
        exporting
          number = lw_pa0006_92-pernr
        importing
          return = wa_return.


      ls_p0006-pernr = lw_pa0006_92-pernr.
      ls_p0006-begda = lw_pa0006_92-begda.
      ls_p0006-endda = lw_pa0006_92-endda.
      ls_p0006-stras = lw_pa0006_92-stras.
      ls_p0006-pstlz = lw_pa0006_92-pstlz.
      ls_p0006-ort01 = lw_pa0006_92-ort01.
      ls_p0006-land1 = lw_pa0006_92-land1.


      call function 'HR_INFOTYPE_OPERATION'
        exporting
          infty         = '0006'
          number        = ls_p0006-pernr
          subtype       = '5'
          validityend   = ls_p0006-endda
          validitybegin = ls_p0006-begda
          record        = ls_p0006
          LOCKINDICATOR  = 'X'

          operation     = 'INS'
        importing
          return        = wa_return.

      call function 'BAPI_EMPLOYEE_DEQUEUE'
        exporting
          number = ls_p0006-pernr
        importing
          return = wa_return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there any issue with this code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;CB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:09:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040169#M1610690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-14T16:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040170#M1610691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where do you get the error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:18:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040170#M1610691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-14T16:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040171#M1610692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;gt;   IT gives the error saying the "Personal  number couldn't be locked" ,even thought we are  using below FM's &lt;/P&gt;&lt;P&gt;&amp;gt; Lock the Pernr&lt;/P&gt;&lt;P&gt;&amp;gt;       call function 'BAPI_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;&amp;gt;         exporting&lt;/P&gt;&lt;P&gt;&amp;gt;           number = lw_pa0006_92-pernr&lt;/P&gt;&lt;P&gt;&amp;gt;         importing&lt;/P&gt;&lt;P&gt;&amp;gt;           return = wa_return.&lt;/P&gt;&lt;P&gt;&amp;gt; CB&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please get the basics right, [SAP lock concept|http://help.sap.com/saphelp_nw04/helpdata/en/c2/2d7037ecc92a7ee10000009b38f8cf/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to check the message returned(wa_return) by the 'BAPI_EMPLOYEE_ENQUEUE' and only when the FM succeeds in locking the employee you should proceed to change the employee data via 'HR_INFOTYPE_OPERATION'. In case the FM fails to lock the employee(which would be the case when you/someone else are working parallelly on the same employee data in a different session) you should not change the employee data in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:37:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040171#M1610692</guid>
      <dc:creator>rajesh_paruchuru</dc:creator>
      <dc:date>2011-07-14T16:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040172#M1610693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;  Actually  we are newly creating an employee in the same  program  ,after doing BDC for PA40 ,we are deque the Pernr ,then we will go  use BAPI_EMPLOYEE_ENQUEUE to enque ,but this FM is not working ,since Pernr is new one  no one can access &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;CB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:59:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040172#M1610693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-14T16:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040173#M1610694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You are inserting a new record in PA0006. If teh pernr doesnt exist already, how will you lock it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;operation     = 'INS'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 05:09:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040173#M1610694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-15T05:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040174#M1610695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt; Before updating the pa0006 ,the pernr already created with PA40 action using BDC ,after thta we are deque the pernr and try to insert the pa0006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;CB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 06:00:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040174#M1610695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-15T06:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040175#M1610696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I count four operations and you still haven't told us after which one you get the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 13:06:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040175#M1610696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-15T13:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040176#M1610697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After reading this thread, its clear that a BDC creates a PERNR, and then you dequeue it. and then you have a spearate program  update pa2006 which throws an error that it cant be locked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you try the below two things?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Are you able to create an entry from the transaction code PA30 for the new pernr?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Just check whether u came out of PA30/PA40 transactions once it is dequeued after creating PERNR.&lt;/P&gt;&lt;P&gt;even thought its not the practice, once this 'BAPI_EMPLOYEE_ENQUEUE' fails, continue the code to&lt;/P&gt;&lt;P&gt;check whether you can dequeue it by using 'BAPI_EMPLOYEE_DEQUEUE', Atleast we will try to understand whether we do really have an issue with locking the pernr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 13:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040176#M1610697</guid>
      <dc:creator>Shahid</dc:creator>
      <dc:date>2011-07-15T13:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_EMPLOYEE_ENQUEUE not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040177#M1610698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&amp;gt;   Actually  we are newly creating an employee in the same  program  ,after doing BDC for PA40 ,we are deque the Pernr ,then we will go  use BAPI_EMPLOYEE_ENQUEUE to enque ,but this FM is not working ,since Pernr is new one  no one can access &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards&lt;/P&gt;&lt;P&gt;&amp;gt; CB&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are successful with your BDC, any locks set must have been removed, then ideally you should be able to place&lt;/P&gt;&lt;P&gt;locks on the new pernr created using the FM 'BAPI_EMPLOYEE_ENQUEUE'. Capture the return messages of the BDC(assuming that you are following CALL TRANSACTION..approach) and ensure that your BDC is infact successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the FM fails to lock the pernr, I would also expect to see the personnel number in the return message, viz.,&lt;/P&gt;&lt;P&gt; 'Personnel number xxxxxxxx could not be locked', which confirms that a new personnel number is infact created and the FM&lt;/P&gt;&lt;P&gt;failed to lock the pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you don't have to transfer 'X' to the 'LOCK_INDICATOR' parameter of the FM 'HR_INFOTYPE_OPERATION', this parameter indicates a lock set to the particular infotype record and is no way releated to SAP lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please work through the code yourself, debug diligently, provide appropriate and accurate information to community and expect help from the community. good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 15:46:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-employee-enqueue-not-working/m-p/8040177#M1610698</guid>
      <dc:creator>rajesh_paruchuru</dc:creator>
      <dc:date>2011-07-15T15:46:41Z</dc:date>
    </item>
  </channel>
</rss>

