Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI/Function Module to update HR Infotype 0 pspar fields

Former Member
0 Kudos

I am using the FM HR_INFOTYPE_OPERATION to update our Employee Data.  It is working great except for Infotype 0 in some cases.  The problem is that our Infotype 0 screen has the Org Assignment information at the bottom of the screen (Position, Personnel Area, Employee group and Employee subgroup).   For some actions it requires that I change the Employee Group/Subgroup and this is not stored in the pa0000 table – it is only on this screen using the  structure pspar.   I can do this via PA30 and/or a BDC by copying the Infotype 0 record, changing the start date, Action Type and Reason and when I press enter it opens up the EE Group/subgroup for entry so I can change it.  I just can’t find how to do this in a FM or BAPI. 

   

Does anyone have any ideas?

1 ACCEPTED SOLUTION

Former Member

I solved my own problem so just posting it in case anyone else runs into the same issue.  I just passed these additional fields in pspar structure using the secondary record export parameter.

   datawa_pspar type pspar.

   wa_pspar-persg = '3'.
    wa_pspar-persk = '97'.
    wa_pspar-plans = '99999999'.

*Terminate codes for Infotype 0000
  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      INFTY         = '0000'                 "InfoType 0001
      NUMBER        = wa_pa0000-pernr        "Employee #
      VALIDITYEND   = wa_pa0000-endda        "End Date
      VALIDITYBEGIN = im_delimit_dt          "Begin Date
      RECORD        = wa_Pa0000             "Record to chg/ins or del
      OPERATION     = 'INS'         "Copy and delmit
*      VIEW_IDENTIFIER = '
      SECONDARY_RECORD = wa_pspar
*      NOCOMMIT      =  'X'    "if X then don't commit
    IMPORTING
      RETURN        = wa_BAPIRETURN1.

6 REPLIES 6

Former Member

I solved my own problem so just posting it in case anyone else runs into the same issue.  I just passed these additional fields in pspar structure using the secondary record export parameter.

   datawa_pspar type pspar.

   wa_pspar-persg = '3'.
    wa_pspar-persk = '97'.
    wa_pspar-plans = '99999999'.

*Terminate codes for Infotype 0000
  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      INFTY         = '0000'                 "InfoType 0001
      NUMBER        = wa_pa0000-pernr        "Employee #
      VALIDITYEND   = wa_pa0000-endda        "End Date
      VALIDITYBEGIN = im_delimit_dt          "Begin Date
      RECORD        = wa_Pa0000             "Record to chg/ins or del
      OPERATION     = 'INS'         "Copy and delmit
*      VIEW_IDENTIFIER = '
      SECONDARY_RECORD = wa_pspar
*      NOCOMMIT      =  'X'    "if X then don't commit
    IMPORTING
      RETURN        = wa_BAPIRETURN1.

0 Kudos

Hi Janice,

I tried the same its not updating the personal area.

It will be great if you can share your code

Regards,

Gaurang

0 Kudos

Hi Gaurang,

After I went and did all of this work it was no longer required.  And, since then our development environment has been refresed so I don't even have a copy of the full code any more.  I had previosuly posted (see above) the code that I had used and it worked (or from what I can remember as this was over a year ago).

0 Kudos

Hi Janice,

Thanks a lot for a quick response. May be I will re-post the same question.

Thanks and Regards,

Gaurang

0 Kudos

Thank you so much for posting the solution to your own question! Not many people remember to do this and it's so helpful. This was the exact question I was facing and finding your solution helped save me much time.

Cheers,
Amy

Former Member
0 Kudos

Hi janice ,

Needed ur help for infotype 0000,0001.Please reply