12-18-2012 10:35 PM
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?
12-24-2012 8:49 PM
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.
data: wa_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.
12-24-2012 8:49 PM
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.
data: wa_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.
01-10-2014 8:53 AM
Hi Janice,
I tried the same its not updating the personal area.
It will be great if you can share your code
Regards,
Gaurang
01-10-2014 3:30 PM
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).
01-10-2014 3:45 PM
Hi Janice,
Thanks a lot for a quick response. May be I will re-post the same question.
Thanks and Regards,
Gaurang
01-28-2020 6:02 PM
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
08-28-2014 5:33 AM