<?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: Problem with HR_INFOTYPE_OPERATION in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008347#M409626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZZKNB_BAPI_INFOTYPE_CALL .

* Use 'BAPI_EMPLOYEE_ENQUEUE' to lock the employee before updating
DATA: l_bapireturn LIKE bapireturn1.

DATA: bapipakey_tab LIKE bapipakey OCCURS 0 WITH HEADER LINE.

data: l_p0169 like p0169.

parameters: p_pernr like p0169-pernr default '07000003'.

start-of-selection.

  CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
       EXPORTING
            number = p_pernr
       IMPORTING
            return = l_bapireturn.

  IF l_bapireturn-id NE space.
    WRITE: / l_p0169-pernr, 'Enqueue failed'.
    exit.
  ENDIF.

*-- Suported operations:
*-- change          (operation = 'MOD')
*-- Create          (operation = 'INS')
*-- DELETE          (operation = 'DEL')
*-- CREATESUCCESSOR (operation = 'COP')
  .
  l_p0169-barea = '7A'.
  l_p0169-pltyp = 'RRSP'.
  l_p0169-bplan = 'RRSP'.
  l_p0169-elidt = '20000101'.
  l_p0169-enrty = 'M'.
  l_p0169-perio = '4'.

  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
       EXPORTING
            infty         = '0169'
            subty         = 'RRSP'
            number        = p_pernr
            record        = l_p0169
            validitybegin = '20021001'
            validityend   = '99991231'
            operation     = 'INS'
*           dialog_mode   = '0'  "Use default
*           nocommit      = '1'  "Use default
       IMPORTING
            return        = l_bapireturn
            key           = bapipakey_tab.

  IF l_bapireturn-id NE space.
    WRITE: /   p_pernr,
            20 'Create was unsuccessful',
                l_bapireturn-id,
                l_bapireturn-message+0(40).
  ELSE.
    WRITE: /   p_pernr,
            20 'Create was successful',
                l_bapireturn-id,
                l_bapireturn-message+0(40).
  ENDIF.


* Use 'BAPI_EMPLOYEE_DEQUEUE' to un-lock the employee before updating
  CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
       EXPORTING
            number = l_p0169-pernr
       IMPORTING
            return = l_bapireturn.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/tip/0,289483,sid21_gci930145,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/tip/0,289483,sid21_gci930145,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Mar 2007 07:02:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-27T07:02:15Z</dc:date>
    <item>
      <title>Problem with HR_INFOTYPE_OPERATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008346#M409625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the FM 'HR_INFOTYPE_OPERATION' to create an Infotype 179 record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I execute my code, it said 'Make an entry in all required fields.'.&lt;/P&gt;&lt;P&gt;Then I set the FM display_mode to '2' and execute, it shows that the Tax number field (an required field) is empty. However, I'm sure that I pass in all the required field into the FM's parameter(record). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone know why this happen? Is it cuased by the system itself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Irene Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 06:57:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008346#M409625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T06:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with HR_INFOTYPE_OPERATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008347#M409626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZZKNB_BAPI_INFOTYPE_CALL .

* Use 'BAPI_EMPLOYEE_ENQUEUE' to lock the employee before updating
DATA: l_bapireturn LIKE bapireturn1.

DATA: bapipakey_tab LIKE bapipakey OCCURS 0 WITH HEADER LINE.

data: l_p0169 like p0169.

parameters: p_pernr like p0169-pernr default '07000003'.

start-of-selection.

  CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
       EXPORTING
            number = p_pernr
       IMPORTING
            return = l_bapireturn.

  IF l_bapireturn-id NE space.
    WRITE: / l_p0169-pernr, 'Enqueue failed'.
    exit.
  ENDIF.

*-- Suported operations:
*-- change          (operation = 'MOD')
*-- Create          (operation = 'INS')
*-- DELETE          (operation = 'DEL')
*-- CREATESUCCESSOR (operation = 'COP')
  .
  l_p0169-barea = '7A'.
  l_p0169-pltyp = 'RRSP'.
  l_p0169-bplan = 'RRSP'.
  l_p0169-elidt = '20000101'.
  l_p0169-enrty = 'M'.
  l_p0169-perio = '4'.

  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
       EXPORTING
            infty         = '0169'
            subty         = 'RRSP'
            number        = p_pernr
            record        = l_p0169
            validitybegin = '20021001'
            validityend   = '99991231'
            operation     = 'INS'
*           dialog_mode   = '0'  "Use default
*           nocommit      = '1'  "Use default
       IMPORTING
            return        = l_bapireturn
            key           = bapipakey_tab.

  IF l_bapireturn-id NE space.
    WRITE: /   p_pernr,
            20 'Create was unsuccessful',
                l_bapireturn-id,
                l_bapireturn-message+0(40).
  ELSE.
    WRITE: /   p_pernr,
            20 'Create was successful',
                l_bapireturn-id,
                l_bapireturn-message+0(40).
  ENDIF.


* Use 'BAPI_EMPLOYEE_DEQUEUE' to un-lock the employee before updating
  CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
       EXPORTING
            number = l_p0169-pernr
       IMPORTING
            return = l_bapireturn.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/tip/0,289483,sid21_gci930145,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/tip/0,289483,sid21_gci930145,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 07:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008347#M409626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T07:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with HR_INFOTYPE_OPERATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008348#M409627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz go through these functionality of the HR_INFOTYPE_OPERATION and use accordingly.&lt;/P&gt;&lt;P&gt;Functionality&lt;/P&gt;&lt;P&gt;This function module enables you to maintain master data for employees and applicants. You can transfer one data record. All validation checks take place that would take place in the individual maintenance screens in the dialog. If necessary, the module returns an error message. The error messages are the same as the error messages in the dialog, that is, the individual maintenance screen error messages are transferred rather than interpreted by this module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;The update takes place using a 'Call dialog' from the module pool infotypes. For this reason, some restrictions apply for the infotypes that are to be handled in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screens for individual infotypes can not overwrite the transferred data for PBO.&lt;/P&gt;&lt;P&gt;No essential checks that are programmed 'on request' will be included in the module, as these will not run.&lt;/P&gt;&lt;P&gt;No messages can be processed for PBO. This will lead to error message 428(PG).&lt;/P&gt;&lt;P&gt;No 'leave screens' may be programmed, unless 'set screen 0' has been set previously. This also leads to error message 428(PG).&lt;/P&gt;&lt;P&gt;If you receive error messages of type 'Required field not filled...', you can not specify the field any more precisely. In this case, you must try to transfer the data into the system using the dialog transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter&lt;/P&gt;&lt;P&gt;INFTY&lt;/P&gt;&lt;P&gt;NUMBER&lt;/P&gt;&lt;P&gt;SUBTYPE&lt;/P&gt;&lt;P&gt;OBJECTID&lt;/P&gt;&lt;P&gt;LOCKINDICATOR&lt;/P&gt;&lt;P&gt;VALIDITYEND&lt;/P&gt;&lt;P&gt;VALIDITYBEGIN&lt;/P&gt;&lt;P&gt;RECORDNUMBER&lt;/P&gt;&lt;P&gt;RECORD&lt;/P&gt;&lt;P&gt;OPERATION&lt;/P&gt;&lt;P&gt;TCLAS&lt;/P&gt;&lt;P&gt;DIALOG_MODE&lt;/P&gt;&lt;P&gt;NOCOMMIT&lt;/P&gt;&lt;P&gt;VIEW_IDENTIFIER&lt;/P&gt;&lt;P&gt;SECONDARY_RECORD&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;KEY&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;go through this example&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZZKNB_BAPI_INFOTYPE_CALL .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use 'BAPI_EMPLOYEE_ENQUEUE' to lock the employee before updating&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_bapireturn LIKE bapireturn1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: bapipakey_tab LIKE bapipakey OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_p0169 like p0169.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_pernr like p0169-pernr default '07000003'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            number = p_pernr&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            return = l_bapireturn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF l_bapireturn-id NE space.&lt;/P&gt;&lt;P&gt;    WRITE: / l_p0169-pernr, 'Enqueue failed'.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Suported operations:&lt;/P&gt;&lt;P&gt;*-- change          (operation = 'MOD')&lt;/P&gt;&lt;P&gt;*-- Create          (operation = 'INS')&lt;/P&gt;&lt;P&gt;*-- DELETE          (operation = 'DEL')&lt;/P&gt;&lt;P&gt;*-- CREATESUCCESSOR (operation = 'COP')&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  l_p0169-barea = '7A'.&lt;/P&gt;&lt;P&gt;  l_p0169-pltyp = 'RRSP'.&lt;/P&gt;&lt;P&gt;  l_p0169-bplan = 'RRSP'.&lt;/P&gt;&lt;P&gt;  l_p0169-elidt = '20000101'.&lt;/P&gt;&lt;P&gt;  l_p0169-enrty = 'M'.&lt;/P&gt;&lt;P&gt;  l_p0169-perio = '4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            infty         = '0169'&lt;/P&gt;&lt;P&gt;            subty         = 'RRSP'&lt;/P&gt;&lt;P&gt;            number        = p_pernr&lt;/P&gt;&lt;P&gt;            record        = l_p0169&lt;/P&gt;&lt;P&gt;            validitybegin = '20021001'&lt;/P&gt;&lt;P&gt;            validityend   = '99991231'&lt;/P&gt;&lt;P&gt;            operation     = 'INS'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          dialog_mode   = '0'  "Use default&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          nocommit      = '1'  "Use default&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            return        = l_bapireturn&lt;/P&gt;&lt;P&gt;            key           = bapipakey_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF l_bapireturn-id NE space.&lt;/P&gt;&lt;P&gt;    WRITE: /   p_pernr,&lt;/P&gt;&lt;P&gt;            20 'Create was unsuccessful',&lt;/P&gt;&lt;P&gt;                l_bapireturn-id,&lt;/P&gt;&lt;P&gt;                l_bapireturn-message+0(40).&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    WRITE: /   p_pernr,&lt;/P&gt;&lt;P&gt;            20 'Create was successful',&lt;/P&gt;&lt;P&gt;                l_bapireturn-id,&lt;/P&gt;&lt;P&gt;                l_bapireturn-message+0(40).&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use 'BAPI_EMPLOYEE_DEQUEUE' to un-lock the employee before updating&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            number = l_p0169-pernr&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            return = l_bapireturn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 07:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008348#M409627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T07:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with HR_INFOTYPE_OPERATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008349#M409628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goto PA30 and check all the mandatory fields for this infotype as given on the screen and pass them in your internal table alongwith the other values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 08:03:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-hr-infotype-operation/m-p/2008349#M409628</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-03-27T08:03:15Z</dc:date>
    </item>
  </channel>
</rss>

