Modify Infty 0057 using HR_INFOTYPE_OPERATION

Hi,
I am trying to update (MOD) an 0057-infotype record using HR_INFOTYPE_OPERATION. But no matter what I do, I cannot make it work. It works with INS and COP but then I get a new entry and the old entry is not delimited. When using MOD I receive the following message in RETURN (return_struct)
TYPE          E
ID          PG
NUMBER          009
MESSAGE          No data stored for 0057 in the selected period
LOG_NO
LOG_MSG_NO          000000
MESSAGE_V1          0057
The code I am using look like this:
Do you please have any advices to give according to this?
*& Report  ZHR_ESS_UPDATE_INFTY_0057
REPORT  zhr_ess_update_infty_0057.
PARAMETERS: p_pernr TYPE p0057-pernr,
            p_lgarto TYPE p0057-lgart,  "old lgart
            p_lgartn TYPE p0057-lgart.  "new lgart
CONSTANTS: change TYPE pspar-actio VALUE 'MOD'.
DATA: lt_p0057 TYPE TABLE OF p0057.
DATA: ls_current_p0057 LIKE LINE OF lt_p0057,
      ls_new_p0057 LIKE LINE OF lt_p0057.
DATA: l_p0057 LIKE p0057.
DATA: l_subrc LIKE sy-subrc.
DATA  return_struct LIKE bapireturn1.
DATA w_return TYPE  bapireturn1.
DATA: bapipakey_tab LIKE bapipakey OCCURS 0 WITH HEADER LINE.
DATA: validitybegin TYPE sy-datum,
      validityend   TYPE sy-datum.
CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
CALL FUNCTION 'HR_READ_INFOTYPE'
  EXPORTING
    tclas           = 'A'
    pernr           = p_pernr
    infty           = '0057'
  IMPORTING
    subrc           = l_subrc
  TABLES
    infty_tab       = lt_p0057
  EXCEPTIONS
    infty_not_found = 1
    OTHERS          = 2.
* Enqueue personnel number
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
  EXPORTING
    number = p_pernr
  IMPORTING
    return = w_return.
READ TABLE lt_p0057 INTO ls_current_p0057 INDEX 1..
ls_new_p0057-begda = sy-datum.
ls_new_p0057-endda = '99991231'.
ls_new_p0057-subty = p_lgartn.
ls_new_p0057-lgart = p_lgartn.
ls_new_p0057-mgart = p_lgartn.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty         = '0057'
    subtype       = ls_current_p0057-subty
    objectid      = ''
    lockindicator = ''
    number        = ls_current_p0057-pernr     "employeenumber
    validityend   = ls_current_p0057-begda
    validitybegin = ls_current_p0057-endda
    record        = ls_new_p0057
    recordnumber  = ls_current_p0057-seqnr
    operation     = change                     "MOD
    tclas         = 'A'
    nocommit      = '1'
    dialog_mode   = '0'
*   view_identifier  = '23'
  IMPORTING
    return        = return_struct
    key           = bapipakey_tab
  EXCEPTIONS
    OTHERS        = 0.
IF return_struct IS INITIAL.
  COMMIT WORK.
ENDIF.
* Enqueue personnel number
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
  EXPORTING
    number = p_pernr
  IMPORTING
    return = w_return.

Hi,
This was kind of embarrassing.  Thanks for finding the error!
Kind regards
Andreas

Similar Messages

  • Using HR_INFOTYPE_OPERATION in external subroutine for Dynamic Actions

    Hi,
    I am calling an external subroutine in the Dynamic Actions of an Infotype. In this external subroutine, I am using HR_INFOTYPE_OPERATION to modify OTHER records of the same Infotype number.
    However, when I tried to trigger the Dynamic Actions in PA30, the other infotypes get modified as intended. But when I refreshed the PA30 screen, the changes were reversed back as if the HR_INFOTYPE_OPERATION were not carried out at all. I have COMMIT WORK after the HR_INFOTYPE_OPERATION, refreshed the buffer. But it doesn't seem to work.
    My question is: Can i use HR_INFOTYPE_OPERATION in an external subroutine which is called during dynamic actions? As I have some complicated logic, I do not want to embed the coding in the Dynamic Actions. Is there a way for HR_INFOTYPE_OPERATION to work in the external subroutine with the changes being committed to the database?
    Thank you.

    Hi,
    I remember the same problem being faced by some of the forum members.
    Suresh Datti had replied that "Call the subroutine in a nother program using a SUBMIT statement. This will create two sessions and will update the DB". This was working fine for the users.
    Hope you can try this.
    Just call a program using SUBMIT statement and code your form routine inside that.
    Hope this helps you.
    Regards,
    Subbu.

  • How to create IT0128 subtype-02 record using HR_INFOTYPE_OPERATION

    Hi All,
    Can anyone suggest how to use HR_INFOTYPE_OPERATION to create/insert a record in IT0128 for an employee from an ABAP program.
    Some background:::
    Note that the field - "Short Title" which is mandatory in this Infotype. And it uses a Q-structure for its processing. Also it stores this field using a combination of text object, text id, language and text name.
             Text object = HRMESS
             Text id  =  HR_P
    Goto SE16 of an employee and check PA0128, you will notice above fields. The actual value is stored somewhere in system memory using a combination of above 4 fields.
    When i try using my program, it gives me an error "Make an entry in all required fields" (so not able to find how/what should i pass for field "Short Title").  Can anyone suggest how should i use HR_INFOTYPE_OPERATION to create an IT0128 record for subtype 02.
    Appreciate any help asap!!
    Best Regards,
    Abbasi Sadikot
    PS: Please dont post your reply if you dont have any idea of what this is.

    Hi
    HR_INFOTYPE_OPERATION -> calls -> HR_MAINTAIN_MASTERDATA -> this Func. Mod. then creates a batch and calls ->
    -> IF DIALOG_MODE EQ '0'.
    ->    CALL DIALOG 'HR_MAINTAIN_MASTER_DATA' USING BDCDATA MODE 'N'
    ->         EXPORTING
    the SY-SUBRC value after this should be zero. But it isn't. Can anybody suggest something. Or have any idea as what could be going wrong ??
    Here is my program by which i am trying to create IT0128 subtype-02:
    REPORT  ZABTWTEST                                 .
    data: it0128 like p0128 occurs 0 with header line.
    data: return like BAPIRETURN1.
    it0128-pernr = '20123001'.
    it0128-subty = '2'.
    it0128-begda = '20090101'.
    it0128-endda = '20090131'.
    it0128-SPRSL = 'EN'.
    it0128-OBJCT = 'HRMESS'.
    it0128-TXTID = 'HR_P'.
    it0128-OBNAM = '<internally assigned name>'.
    append it0128.
    CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
      EXPORTING
        number              = '20123001'
        validitybegin       = '19000101'   .
    loop at it0128.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = '0128'
        number                 = '20123001'
        VALIDITYEND            = it0128-endda
        VALIDITYBEGIN          = it0128-begda
        record                 = it0128
        operation              = 'COP'
        TCLAS                  = 'A'
        NOCOMMIT               = 'X'
      IMPORTING
        RETURN                 = return   .
    endloop.
    CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
      EXPORTING
        number              = '20123001'
        validitybegin       = '19000101'   .
    write return.   .
    Kindly correct me if i am wrong anywhere.
    Regards,
    Abbasi

  • Updating infotype 0041 using HR_INFOTYPE_OPERATION?

    Hi All:
    How do we update the dates in infotype 0041 using HR_INFOTYPE_OPERATION? lets say we have 6 dates populated in 41  and we another employee has 9 dates populated. We are reading these records and need to update the dates for all the employee records.
    Thanks
    Venkata

    Hi Venkata,
    What you can do is use the HR_INFOTYPE_OPERATION in Change or MOD(Modify) mode i.e.
    pass 'MOD' in operation parameter.
    Your recordnumber parameter should have the sequence number from infotype record you are updating (field SEQNR). All other parameters should be as it is had been for INS or insert operation.
    Regards.

  • Error While using HR_INFOTYPE_OPERATION to delete records

    Hi All
    I was able to find simlar error in SDN but it did not work for me. I am using HR_INFOTYPE_OPERATION  to delete PA2006 records and update with new values. I get the following error message "No data stored for 2006 in the selected period". But The records exist. I debugged and found it fails for authorization checks. I have all the authorizations as I am able to delete it using PA30.
    FYI inserting works fine.
    Please advice.
    Thanks, Raj

    Hi Santosh
    I used the same code which you have send. Below is the one. FYI, throught my debug, I was able to figure out it fails in authorization, even though I have all authorization and I was able to delete using PA30. Please advice.
    Below is teh code that I used.
        CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
          EXPORTING
            number       = t_file1-pernr
          IMPORTING
            return       = t_return
            locking_user = sy-uname.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '2006'
              NUMBER                 = t_file1-pernr
              SUBTYPE                = t_file1-subty
              VALIDITYEND            = t_file1-endda
              VALIDITYBEGIN          = t_file1-begda
              RECORD                 = P2006
              OPERATION              = 'MOD'
              DIALOG_MODE            = '1'
              NOCOMMIT               = 'X'
             IMPORTING
             RETURN                 = t_return
             KEY                    = personaldatakey.
      "Unlock the employee
          CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
            EXPORTING
              number = t_file-pernr
            IMPORTING
              return = t_return.
    Thanks, Raj

  • Using HR_infotype_operations , locking problem

    hi,  i am using HR_infotype_operations func module,
    basically a dynamic action triggers a subroutine in a report progrm and there I am using this functiom module, but it is not able to insert values in one of my custom infotype giving error in the return parameter as 'pernr could not be locked'
    can u please help me ?

    Hello,
    Please check the program by debugging the same.
    In the debugging mode -> go to -> break points-> at statement  here you give the keyword(MESSAGE) or Call function . this will stop the program at all message statements or call function.
    You can now find what has triggered this.
    Thanks,
    Krishna
    Message was edited by: Krishnakumar

  • Using hr_infotype_operation to update it0021 problem

    I am using hr_infotype_operation to update data for it0021 and it0528.
    In pa30, just in it0021 and different to update data for it0021 and it0528, IT0528 is not allowed maitain
    when i am using hr_infotype_operation to update data for it0021 and it0528 one by one, the problem occurs, it 0528 is not update.
    Any idea?

    Hi,
    The FM HR_INFOTYPE_OPERATION infact copy a BDC & performs all the screen validations that normally occur in PA30. It uses the CALL DIALOG option.
    Also,  set the MODE to '2' which is like the display ALL option in the CALL TRANSACTION.
    This will let you see the error in the foreground.
    Regards,
    Shamma

  • Problem in changing end date of PA-Infotype using HR_INFOTYPE_OPERATIONS .

    Hi All,
    I am trying to change the end date of an active record in an infotype using HR_INFOTYPE_OPERATIONS FM. But am getting an error, 'Infotype does not exist'.
    I am using operation as 'MOD' and passing appropriate parameters as required.
    it would be great if someone can help me out to understand, why could that error be coming?

    Hi Santosh,
    With this FM you cannot change the enddate as enddate is a key field and used to determine the exact record in the database.
    Why don't you use PA30 to change end date of an infotype record?
    Or else delete the row first w. HR_INFOTYPE_OPERATION DEL and insert it again with INS operation and new end date.
    Regards,
    Dilek
    Edited by: Dilek Ersoz Adak on Jan 8, 2010 7:54 AM

  • Modify trip receipts using HRTRV_IF_MODIFY_TRIP

    Hi all.
    I'm trying to modify trip receipts using the FM "HRTRV_IF_MODIFY_TRIP", but i'm getting the error: "Field PTk03-PAYCURR. does not exist in the screen SAPMP56T 1300."
    Is this normal? i mean, can i modify the payment currency via this FM?
    If yes, please tell me how to it.
    Regards.
    Gregory

    Please.
    I need help on that.
    Regards.
    Gregory.

  • Error - while using HR_INFOTYPE_OPERATION - 'URG'

    Hi Experts,
    While using HR_INFOTYPE_OPERATION for updating master data i got a Error Message -
    EPG        428A complex application error has occurred
    But it is not for every time . after 3 or 4 sucessfull run i get this message and after that it will take long time to overcome automatically . I tried with log off but it is not successful.
    Please Advice.

    If this is called from custom code, make sure you call function 'HR_PSBUFFER_INITIALIZE' for each new ee processed to clear the buffer. If not, when HR_INFOTYPE_OPERATION is executed, the buffer (internal table) may still have data from previous ee which can cause dump.
    Rgds.

  • I cannot modify a photo using an external application in iPhoto11-LION. The advanced window in preference iPhoto seems uncomplete

    I cannot modify a photo using an external application (adobe photoshop elements 10) in iPhoto11-LION. The advanced window in preference iPhoto seems uncomplete and unable to open a photo in it.

    Are you saying that PSE opens but the photo doesn't go there? That usually means you chose the logical file rather than the correct one as your external editor. See:
    http://barbarabrundage.com/2011/10/05/adobe-hide-and-seek-setting-pse-10-as-exte rnal-editor/

  • Error while modifying HR infotype PA0105 using HR_INFOTYPE_OPERATION

    Hello All,
    I am not able to modifying the infotype PA0105.
    Currently I am using the FM HR_INFOTYPE_OPERATION.
    But I am not able to modify the record.
    Has anyone faced any such situation...
    Please help..!!
    Useful pointers will be appreciated...
    Thanks & Regards,
    Tarun Gambhir

    Hope this helps you out...
          C_INS   LIKE PSPAR-ACTIO VALUE 'INS',
          W_000-PERNR = T_SAIDA-PERNR.
          W_000-INFTY = C_0000.
          W_000-ENDDA = C_DATA.
          W_000-BEGDA = T_PA0000-BEGDA.
          W_000-AEDTM = SY-DATUM.
          W_000-UNAME = SY-UNAME.
          W_000-MASSN = C_16.
          W_000-MASSG = S_MASSG-LOW.
          W_000-STAT1 = SPACE.
          W_000-STAT2 = C_3.
          W_000-STAT3 = C_1.
          W_PSPAR-PERNR = T_SAIDA-PERNR.
          W_PSPAR-INFTY = C_0000.
          W_PSPAR-PLANS = T_P0001-PLANS.
          W_PSPAR-WERKS = T_P0001-WERKS.
          W_PSPAR-PERSG = T_P0001-PERSG.
          W_PSPAR-PERSK = T_P0001-PERSK.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY            = C_0000
              NUMBER           = T_SAIDA-PERNR
              LOCKINDICATOR    = SPACE
              VALIDITYEND      = C_DATA
              VALIDITYBEGIN    = V_BASE
              RECORD           = W_000
              OPERATION        = C_INS
              SECONDARY_RECORD = W_PSPAR
            IMPORTING
              RETURN           = T_RET_FUNC                     "#EC *
              KEY              = T_KEY.                         "#EC *
    Greetings,
    Blag.

  • Using HR_INFOTYPE_OPERATION to update IT0021 and IT0106

    We're trying to update dependent data information using FM hr_infotype_operation but it doesn't seem to be working properly for IT0106. It does work for changes i make for IT0021, though.
    We have the requirement to modify an existing dep record, delimit the record, or add a new dependent record depending on some other logic.
    I know in the FM, you can specify a secondary structure. In the case of IT0021, it's secondary structure would be IT0106.
    I'm passing these fields to my p0106 structure:
    pernr
    subty
    begda
    endda
    aedtm
    uname
    perid
    but i'm not able to update the P0106 record. Any help would be appreciated.
    thanks,
    robert.

    ok great, i believe that fixed it. i think i had a couple of problems that when fixed separately didn't work, but when I put them altogether, it worked.
    my p0106 struc was not declared properly and the view identifier was not set (this pernr's was indeed 10).
    I need to fill in the rest of the p0106 struc from the existing record and it should work fine.
    thanks a ton.
    data: p0021_struc TYPE p0021,
          p0106_struc TYPE p0106,
          p_p_pskey   TYPE pskey.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty            = p_pskey-infty
          number           = p_pskey-pernr
          subtype          = p_pskey-subty
          objectid         = p_pskey-objps
          lockindicator    = p_pskey-sprps
          validityend      = p0021-endda         " '99991231'
          validitybegin    = p0021-begda
          record           = p0021_struc
          operation        = mode
          tclas            = 'A'
    *      dialog_mode      = '2'
          nocommit         = p_test
          VIEW_IDENTIFIER  = p0003-viekn
          secondary_record = p0106_struc
        IMPORTING
          return           = return
          key              = familykey
        EXCEPTIONS
          OTHERS           = 0.
    Message was edited by: robert phelan

  • About to use HR_INFOTYPE_OPERATION to create customer infotype issue:

    hi
    i want to create infotype use function(HR_INFOTYPE_OPERATION).
    this infotype is customer infotype.
    the first scenario is:
      i'm be sure no data about one employee in this infotype(9004).
      to call with data upload function and put data into internal table IT_PA9004.
      and the table data as follow:
    one line: it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 50 (customer field).
    two line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 60 (customer field).
    three line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 70 (customer field).
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    i run the programme and get information is:
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    but i use the transation PA30 to view all data:
    in database just exist one row:
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    the second scenario is:
    in database the infotype have exist one row:
               pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
               pa9004-begda = '20080318' , pa9004-endda = '20080318'
               pa9004-zzvalue = X (customer field).
    and i create another row:
    line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
              it_pa9004-begda = '20080318' , it_pa9004-endda = '99991231'
              it_pa9004-zzvalue = 80 (customer field)
    i run the programme and get information is:
    11022887 insert ok.
    the three scenario is:
        set  HR_INFOTYPE_OPERATION of import parameter operation = 'MOD'
        in any scenario will get error :not exist subtype .
    what heppend about HR_INFOTYPE_OPERATION working,i had to use this function to
       create other infotype of SAP owner.
       and will create successfully.
    so i thank it may be config Constraints about customer infotype.
    is time Constraints effect?
    so i want to how to check it?
    and if i want to create one infotype for customer using PM01 what some thing
    must be taken into account.
    think you advance.
    partial source code as follow:
    FORM ACTION_INSERT .
      DATA: P_FLAG TYPE C.
      DATA: WA_LOG LIKE LINE OF DATA_LOG.
      DATA: PP_ACTION TYPE PSPAR-ACTIO.
      LOOP AT IT_PA9004.
        CLEAR P_FLAG.
        CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
        PERFORM lock_employee USING IT_PA9004-pernr CHANGING P_FLAG.
        PP_ACTION = IT_PA9004-ACTION.
        PERFORM HR_INFOTYPE_OPERATION USING IT_PA9004 PP_ACTION CHANGING P_FLAG.
        IF P_FLAG IS INITIAL.
          if test_run = space.
            COMMIT WORK.
          else.
            ROLLBACK WORK.
          endif.
          write:/ it_pa9004-pernr,'insert ok'.
        ELSE.
          ROLLBACK WORK.
          write:/ it_pa9004-pernr,'error'.
        ENDIF.
        PERFORM unlock_employee USING IT_PA9004-pernr .
      ENDLOOP.
    ENDFORM.                    " ACTION_INSERT
    FORM LOCK_EMPLOYEE  USING    P_PERNR
                        CHANGING PP_FLAG.
      CHECK PP_FLAG IS INITIAL.
      CLEAR P_RETURN.
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = P_PERNR
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
      CALL FUNCTION 'HR_INITIALIZE_BUFFER'
        EXPORTING
          pernr = P_PERNR.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '1'.
      ENDIF.
    ENDFORM.                    " LOCK_EMPLOYEE
    FORM HR_INFOTYPE_OPERATION  USING    P_PA9004 LIKE IT_PA9004
                                         P_ACTION type PSPAR-ACTIO
                                CHANGING PP_FLAG.
      CHECK PP_FLAG  IS INITIAL.
      DATA: bapipakey type bapipakey,
            P_SUBTY TYPE P9004-SUBTY,
            PP_9004 TYPE TABLE OF  P9004 WITH HEADER LINE.
      CLEAR P_RETURN.
      REFRESH PP_9004.
      MOVE-CORRESPONDING P_PA9004 TO PP_9004.
      IF P_ACTION = 'INS'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      IF P_ACTION = 'MOD'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      APPEND PP_9004.
      P_SUBTY = P_LGART.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '9004'
         subtype       = 'FQ03'
          subtype       = P_SUBTY
          number        = PP_9004-pernr
          validityend   = PP_9004-ENDDA
          validitybegin = PP_9004-begda
         RECORDNUMBER  = pp_9004-seqnr
          record        = PP_9004
           operation     = 'INS'
         operation     = P_ACTION
          nocommit      = 'X'
        IMPORTING
          return        = P_RETURN
          key           = bapipakey
        EXCEPTIONS
          OTHERS        = 0.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '9'.
      ENDIF.
    ENDFORM.                    " HR_INFOTYPE_OPERATION
    FORM UNLOCK_EMPLOYEE  USING    P_PERNR.
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p_pernr
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
    ENDFORM.                    " UNLOCK_EMPLOYEE

    hi
    i want to create infotype use function(HR_INFOTYPE_OPERATION).
    this infotype is customer infotype.
    the first scenario is:
      i'm be sure no data about one employee in this infotype(9004).
      to call with data upload function and put data into internal table IT_PA9004.
      and the table data as follow:
    one line: it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 50 (customer field).
    two line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 60 (customer field).
    three line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 70 (customer field).
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    i run the programme and get information is:
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    but i use the transation PA30 to view all data:
    in database just exist one row:
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    the second scenario is:
    in database the infotype have exist one row:
               pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
               pa9004-begda = '20080318' , pa9004-endda = '20080318'
               pa9004-zzvalue = X (customer field).
    and i create another row:
    line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
              it_pa9004-begda = '20080318' , it_pa9004-endda = '99991231'
              it_pa9004-zzvalue = 80 (customer field)
    i run the programme and get information is:
    11022887 insert ok.
    but in database just exist the first data
               pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
               pa9004-begda = '20080318' , pa9004-endda = '20080318'
               pa9004-zzvalue = X (customer field).
    the three scenario is:
        set  HR_INFOTYPE_OPERATION of import parameter operation = 'MOD'
        in any scenario will get error :not exist subtype .
    what heppend about HR_INFOTYPE_OPERATION working,i had to use this function to
       create other infotype of SAP owner.
       and will create successfully.
    so i thank it may be config Constraints about customer infotype.
    is time Constraints effect?
    so i want to how to check it?
    and if i want to create one infotype for customer using PM01 what some thing
    must be taken into account.
    think you advance.
    partial source code as follow:
    FORM ACTION_INSERT .
      DATA: P_FLAG TYPE C.
      DATA: WA_LOG LIKE LINE OF DATA_LOG.
      DATA: PP_ACTION TYPE PSPAR-ACTIO.
      LOOP AT IT_PA9004.
        CLEAR P_FLAG.
        CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
        PERFORM lock_employee USING IT_PA9004-pernr CHANGING P_FLAG.
        PP_ACTION = IT_PA9004-ACTION.
        PERFORM HR_INFOTYPE_OPERATION USING IT_PA9004 PP_ACTION CHANGING P_FLAG.
        IF P_FLAG IS INITIAL.
          if test_run = space.
            COMMIT WORK.
          else.
            ROLLBACK WORK.
          endif.
          write:/ it_pa9004-pernr,'insert ok'.
        ELSE.
          ROLLBACK WORK.
          write:/ it_pa9004-pernr,'error'.
        ENDIF.
        PERFORM unlock_employee USING IT_PA9004-pernr .
      ENDLOOP.
    ENDFORM.                    " ACTION_INSERT
    FORM LOCK_EMPLOYEE  USING    P_PERNR
                        CHANGING PP_FLAG.
      CHECK PP_FLAG IS INITIAL.
      CLEAR P_RETURN.
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = P_PERNR
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
      CALL FUNCTION 'HR_INITIALIZE_BUFFER'
        EXPORTING
          pernr = P_PERNR.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '1'.
      ENDIF.
    ENDFORM.                    " LOCK_EMPLOYEE
    FORM HR_INFOTYPE_OPERATION  USING    P_PA9004 LIKE IT_PA9004
                                         P_ACTION type PSPAR-ACTIO
                                CHANGING PP_FLAG.
      CHECK PP_FLAG  IS INITIAL.
      DATA: bapipakey type bapipakey,
            P_SUBTY TYPE P9004-SUBTY,
            PP_9004 TYPE TABLE OF  P9004 WITH HEADER LINE.
      CLEAR P_RETURN.
      REFRESH PP_9004.
      MOVE-CORRESPONDING P_PA9004 TO PP_9004.
      IF P_ACTION = 'INS'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      IF P_ACTION = 'MOD'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      APPEND PP_9004.
      P_SUBTY = P_LGART.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '9004'
         subtype       = 'FQ03'
          subtype       = P_SUBTY
          number        = PP_9004-pernr
          validityend   = PP_9004-ENDDA
          validitybegin = PP_9004-begda
         RECORDNUMBER  = pp_9004-seqnr
          record        = PP_9004
           operation     = 'INS'
         operation     = P_ACTION
          nocommit      = 'X'
        IMPORTING
          return        = P_RETURN
          key           = bapipakey
        EXCEPTIONS
          OTHERS        = 0.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '9'.
      ENDIF.
    ENDFORM.                    " HR_INFOTYPE_OPERATION
    FORM UNLOCK_EMPLOYEE  USING    P_PERNR.
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p_pernr
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
    ENDFORM.                    " UNLOCK_EMPLOYEE

  • Strange Dump while using HR_INFOTYPE_OPERATION.

    Hi frnz,
    I am facing dump while using the FM 'HR_INFOTYPE_OPERATION' as below. <b>If I swap positions of w_p0041-endda and w_p0041-begda it does not give a dump but error msg is generated saying that no selection in the period(as obviously dates are in propper range).</b> <u>Whlie testing the FM in SE37 with the same data, it works fine.</u> Please help me find the problem.
    data: TCLAS like PSPAR-TCLAS,
          OPERATION like PSPAR-ACTIO,
          infty like PRELP-INFTY.
          infty = '0041'.
          OPERATION = 'MOD'.
          TCLAS = 'A'.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          INFTY                  = infty
          NUMBER                 = w_p0041-pernr
      SUBTYPE                =
      OBJECTID               =
      LOCKINDICATOR          =
         VALIDITYEND            = w_p0041-endda
         VALIDITYBEGIN          = w_p0041-begda
      RECORDNUMBER           =
          RECORD                 = w_p0041
          OPERATION              = OPERATION
          TCLAS                  = TCLAS
      DIALOG_MODE            = '0'
        NOCOMMIT               = SPACE
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
       IMPORTING
         RETURN                 =  Return
      KEY                    =

    Hi all ,
    I have already tried converting date to internal format, the data types are also fine. I am not able to paste the screen shot so here is a part of it. Please help.
    ************DUMP************************************
    If we can not remap we would like to just re-raise the
    exception like below like "RAISE EXCEPTION exception.".
    Unfortunately the kernel will then forget about the
    original source position.
    So this is the fallback strategy. Calling this method
    is only allowed if the exception can be resolved. Since
    this is not the case we indicate a parameter violation.
      RAISE EXCEPTION TYPE cx_hrpa_invalid_parameter
        EXPORTING
          previous  = exception
          parameter = 'EXCEPTION'.
    ENDMETHOD.
    ********************END**************
    Thanks
    Sachin

Maybe you are looking for

  • One or more post-processing actions failed. Consult the OPP service log for details.

    hi expert plz help me i can't understand here what can i do to resove this error. here is the logfile details of output post processor ebs- 11i (11.5.10.2) os - rhel 4 [9/2/13 4:54:48 PM] [main] Starting GSF service with concurrent process id = 29841

  • Mac doesn't recognize seagate go flex

    GoFlex hard drive is not appearing on desktop and not working.

  • CIN- Balance in transaction Currency

    Hi I have created Sales Order - Delivery - PGI - Billing (accounting document generated) & when creating the excise Invoice & when chosing the Utilization (Local) & saving it, the system is throwing an error "Balance in Transaction currency".  A bala

  • How to identify the program in which an enhanncement spot should be included?

    How to identify the program in which an enhanncement spot should be included? For example I want to validate VA02 for USER authorization. So an enhancement spot should be written in program MV45AFZB. How do you identify this program ?

  • RMI server invocation delay

    Hello, I have a problem with server invocations. If I call the method that just prints to the console toString of passed MyClass instance, it takes 4.5 seconds. If I pass String or null it works less than 10ms. This problem appears only at the specia