<?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 HR_MAINTAIN_MASTERDATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415868#M1049085</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From a program Z that updates the IT0009, I am calling to the FM HR_INFOTYPE_OPERATION, and this one calls to FM HR_MAINTAIN_MASTERDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM HR_MAINTAIN_MASTERDATA returns the mistake  184 " The employee / Applicant yet is not blocked ". I have verified that the mentioned message is avoided if  PA30 is opened, with the employee whose we update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, he would be grateful for some indication to achieve that the function executes without needing the PA30 is opened, situation that is not reasonable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2008 21:07:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-05T21:07:15Z</dc:date>
    <item>
      <title>HR_MAINTAIN_MASTERDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415868#M1049085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From a program Z that updates the IT0009, I am calling to the FM HR_INFOTYPE_OPERATION, and this one calls to FM HR_MAINTAIN_MASTERDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM HR_MAINTAIN_MASTERDATA returns the mistake  184 " The employee / Applicant yet is not blocked ". I have verified that the mentioned message is avoided if  PA30 is opened, with the employee whose we update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, he would be grateful for some indication to achieve that the function executes without needing the PA30 is opened, situation that is not reasonable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 21:07:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415868#M1049085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-05T21:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: HR_MAINTAIN_MASTERDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415869#M1049086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before Calling the FM call another FM BAPI_EMPLOYEE_ENQUEUE. *-- &amp;gt; Lock Employee*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and after the call is done call BAPI_EMPLOYEE_DEQUEUE &lt;STRONG&gt;--&amp;gt; Unlock Employee&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this resolves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Sep 2008 00:35:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415869#M1049086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-06T00:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: HR_MAINTAIN_MASTERDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415870#M1049087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to lock before calling and unlock after the call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"Locking
call function 'HR_EMPLOYEE_ENQUEUE'
  exporting
    number             = wa_personal-pernr
* IMPORTING
*   RETURN             =
*   LOCKING_USER       =
.


call function 'HR_INFOTYPE_OPERATION'
  exporting
    infty                  = '0002'
    number                 = fs_personal-pernr
*   SUBTYPE                =
*   OBJECTID               =
*   LOCKINDICATOR          =
   validityend            = fs_personal-endda
   validitybegin          = fs_personal-begda
*   RECORDNUMBER           =
    record                 = fs_personal
    operation              = 'MOD'
*   TCLAS                  = 'A'
*   DIALOG_MODE            = '0'
*   NOCOMMIT               =
*   VIEW_IDENTIFIER        =
*   SECONDARY_RECORD       =
 importing
   return                 = w_ret
*   KEY                    =
          .

"unlock 
call function 'HR_EMPLOYEE_DEQUEUE'
  exporting
    number        = wa_personal-pernr
* IMPORTING
*   RETURN        =
          .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Sep 2008 03:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415870#M1049087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-06T03:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: HR_MAINTAIN_MASTERDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415871#M1049088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to call the function module 'HR_EMPLOYEE_ENQUEUE'  before HR_MAINTAIN_MASTERDATA to lock the record, ie., no other person can work on that record except you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then call the function module HR_MAINTAIN_MASTERDATA .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to call the function module 'HR_EMPLOYEE_DEQUEUE' after HR_MAINTAIN_MASTERDATA to unlock the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONSTANTS: change TYPE pspar-actio VALUE 'MOD'.

      "This code is requred and locks the record ready for modification
      CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
        EXPORTING
         number = p_pernr.


      "loop at p0071 into p_p0071.  "added to put code in context
      validitybegin = p_record-begda.
      validityend   = p_record-endda.
      p_record-endda = pn-begda - 1.

      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '0071'
          subtype       = p_record-subty
          objectid      = P_record-objps
          number        = p_record-pernr     "employeenumber
          validityend   = validityend
          validitybegin = validitybegin
          record        = p_record
          recordnumber  = p_record-SEQNR
          operation     = change
          nocommit      = nocommit
          dialog_mode   = '0'
        IMPORTING
          return        = return_struct
          key           = personaldatakey
        EXCEPTIONS
          OTHERS        = 0.

       "endloop.

     "unlock record after modification
     CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
       EXPORTING
        number = p_pernr.&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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Sep 2008 03:37:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-maintain-masterdata/m-p/4415871#M1049088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-06T03:37:46Z</dc:date>
    </item>
  </channel>
</rss>

