2006 Jun 28 5:17 PM
Hi all -
This question may have a simple answer that I'm just missing.
I found a FM called "HR_PUT_ORG_STRUCTURE" that writes infotype 0001 data to the buffer according to the comments in the code.
How do I save the data from the buffer to the DB? I've tried commit work, RH_UPDATE_DATABASE and RHOM_WRITE_BUFFER_TO_DB, none seem to work.
Thanks in advance!
Bryan
2006 Jun 28 5:55 PM
Can you use? :
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0001'
number = pernr
subtype = p0001_aux-subty
objectid = p0001_aux-objps
lockindicator = p0001_aux-sprps
validityend = p0001_aux-endda
validitybegin = p0001_aux-begda
recordnumber = p0001_aux-seqnr
record = p0001_aux
operation = 'MOD'
tclas = 'A'
dialog_mode = '0'
nocommit = 'X'
IMPORTING
return = return1.
2006 Jun 28 5:55 PM
Can you use? :
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0001'
number = pernr
subtype = p0001_aux-subty
objectid = p0001_aux-objps
lockindicator = p0001_aux-sprps
validityend = p0001_aux-endda
validitybegin = p0001_aux-begda
recordnumber = p0001_aux-seqnr
record = p0001_aux
operation = 'MOD'
tclas = 'A'
dialog_mode = '0'
nocommit = 'X'
IMPORTING
return = return1.
2006 Jun 28 6:02 PM
I'll try it, but I don't think it's going to work. I've tried using that FM in another program, and it won't let me change infotype 0001 values. If I go into transaction PA30, that won't let me change those values either, if the employee has been tied to an org unit - Basically, I'm trying to change an employee's org unit when that org unit gets updated in the org master.
It seems this value (pa0001-orgeh) only changes when you change where the position is assigned in Org master data, PPOSE. Basically, I'm trying to simulate that.
Thanks for the suggestion though. Once I've tested I'll come back and award points as appropriate.
2006 Jun 28 9:28 PM
That did it! I'm not sure why I couldn't get it to work before, but thanks for your help.