‎2006 Feb 08 11:35 AM
Hello!
I am working with an Inbound interface, which has to update new personnel number into intotypes PA0000, PA0001, PA0002, PA0006 & PA0008. To update i am using 'HR_INFOTYPE_OPERATION' function module . When assumed Personnel number is to be created, this Function Module is throwing an error 'Personnel Number not yet assigned',
I am giving the personnel number within the external number range.
Now I need to know is there any fuctionality associated with assigning the personnel number, if so how,.........
Thank You
Regards
Rajesh
‎2006 Feb 08 11:39 AM
Hi Rajesh,
first make sure that the employee is hired into the system, i.e., hire the employee using the actions infotype
‎2006 Feb 08 11:40 AM
Hi,
Check this sample code and kindly reward points by clicking the star on the left of reply,if it helps.
Constants: c_ins1 TYPE actio VALUE 'INS',
LOOP AT l_i_p0015 INTO l_wa_p0015.
CALL FUNCTION 'ENQUEUE_EPPRELE'
EXPORTING
pernr = l_wa_p0015-pernr
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = c_0015
NUMBER = l_wa_p0015-pernr
SUBTYPE = l_wa_p0015-subty
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = l_wa_p0015-begda
VALIDITYBEGIN = l_wa_p0015-endda
RECORDNUMBER =
RECORD = l_wa_p0015
OPERATION = c_ins1
TCLAS = c_a
DIALOG_MODE = '0'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN = l_i_return .
KEY =
.
To dequeue the selected employee
CALL FUNCTION 'DEQUEUE_EPPRELE'
EXPORTING
pernr = l_wa_p0015-pernr.
endloop.
‎2006 Feb 08 11:45 AM
‎2006 Feb 08 12:01 PM
HI rajesh,
1. 'Personnel Number not yet assigned',
This FM is
for editing/inserting
INFOTYPE DATA
(and not creating any new employee)
regards,
amit m.
‎2006 Feb 08 2:02 PM
Hi Amit!
I think you understood my requirement, i need to create an Employee through Function Module, If this function module doesnt do that, can you please suggest me the correct function module through which i can create an Employee,
Points will be awarded for the right suggestion
Thank You
Regards
Rajesh
‎2006 Feb 08 2:08 PM
‎2006 Feb 09 11:22 AM
Hello!
I cannot use PA40, coz i want it for Idoc, i also saw that, when employee is created in PA30 for actions, its also getting updated in PA0003,
HR_INFOTYPE_OPERATION does check in PA0003, so first employee should be in PA0003, how to go with this
I also want to know will function module HR_MAINTAIN_MASTERDATA can create employee,
I hope guys you could give some solution
Bye
Rajesh
‎2006 Feb 09 11:32 AM
HR_MAINTAIN_MASTERDATA can be used to create a record if
a PERNR already exists.
RPLAPL00 uses this FM.
FM ZHRWPC_PCR_SP_PA30 also uses this FM
Message was edited by: Srinivas Reddy
‎2009 May 14 10:37 AM
Hi...i am having the same problem with rajesh, im encountering error Personnel not yet assigned. The personnel number i am trying to create is externally assigned. Your reply to this thread will be of great help. Thanks guys!
*shara