Skip to Content

FM 'HR_INFOTYPE_OPERATION' throws error for Infotype 0021 modification

Hi all,

I am using the FM 'HR_INFOTYPE_OPERATION' to modify the data in pa0021.

LOOP AT T_P0021 ASSIGNING <Wa_p0021>.CALL FUNCTION 'HR_INFOTYPE_OPERATION'
 EXPORTING
 INFTY = '0021'
 NUMBER = <wa_p0021>-pernr
 SUBTYPE = <Wa_p0021>-subty
 VALIDITYEND = <wa_p0021>-endda
 VALIDITYBEGIN = <wa_p0021>-begda
 RECORD = <Wa_p0021>
 OPERATION = 'MOD'
 DIALOG_MODE = '2'
 VIEW_IDENTIFIER = '07'
 IMPORTING
 RETURN = return.
 ENDLOOP.
I get an error saying 'No data stored for 0021 in the selected period'. Yes the pa0021 has different dates for the pernr and subty, however i am trying to modify that record with the new dates that i am passing through the function module.

Please help
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 10, 2017 at 09:23 AM

    Hi,

    If you're using new BEGDA and ENDDA then you should use an insert or a copy.

    Kind regards, Rob Dielemans

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Rob,

      Thanks, even when i try with INS , i get an error saying '009No data stored for 0003 in the selected period' .

      I am trying to update the pa0021 table for the employee with new dates , but i am not able to do it.

  • avatar image
    Former Member
    May 11, 2017 at 06:03 AM

    Hi,

    You can change existing record's begda and endda by deleting the existing record only.

    1. Delete existing record

    2. Create a new record with new begda and new endda.

    Thanks and Regards,

    Chandra

    Add comment
    10|10000 characters needed characters exceeded

  • May 11, 2017 at 02:23 PM

    Hi Divya,

    Kindly check by updating the particular employee(infotype 21) information manually in transaction PA30, Hope the same error will trigger during manual update.

    Regards

    Rajkumar Narasimman

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Dhivya,

      Modify statement updates the value directly in database table without checking any condition. (We should not use this method, it should be avoided).

      HR_INFOTYPE_OPERATION validates all the conditions before updating the data in database table. For example Time Constraints.

      Kindly check and update the infotype 0021 manually using transaction PA30 manually for the problematic customer.

      1. If Manual update worked well, then the issue with FM HR_INFOTYPE_OPERATION
      2. If Manual update fails, then we need to check with functional consultant.

      Regards

      Rajkumar Narasimman