Application Development and Automation 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: 
Read only

Error during Infotype Update

Former Member
0 Likes
1,444

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,327

Hi Rajesh,

first make sure that the employee is hired into the system, i.e., hire the employee using the actions infotype

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,327

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.

Read only

Former Member
0 Likes
1,327

First make sure that the PERNR exists in PA0000 & PA0001

Read only

Former Member
0 Likes
1,327

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.

Read only

0 Likes
1,327

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

Read only

0 Likes
1,327

In order to create an Employee we need to go thru PA40.

Read only

0 Likes
1,327

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

Read only

0 Likes
1,327

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

Read only

Former Member
0 Likes
1,327

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