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

HR Infotypes upload

Former Member
0 Likes
3,487

Hi All,

Which is the best way to upload HR infotypes for morethan 40 countries( each country will have different fileds eg 0002 and 0006)

Please suggest.

1 ACCEPTED SOLUTION
Read only

koolspy_ultimate
Active Contributor
0 Likes
2,552

hi piscian,

you can use this fm HR_INFOTYPE_OPERATION

For Reference please [visit this |http://wiki.sdn.sap.com/wiki/display/Snippets/UpdateanInfotype] link

Hi All,

Which is the best way to upload HR infotypes for morethan 40 countries( each country will have different fileds eg 0002 and 0006)

Please suggest.

12 REPLIES 12
Read only

Former Member
0 Likes
2,552

Use function module "HR_INFOTYPE_OPERATION" to upload data to infotypes 0002 & 0006.

Read only

koolspy_ultimate
Active Contributor
0 Likes
2,553

hi piscian,

you can use this fm HR_INFOTYPE_OPERATION

For Reference please [visit this |http://wiki.sdn.sap.com/wiki/display/Snippets/UpdateanInfotype] link

Read only

0 Likes
2,552

i need to upload Hiring action in mass

Read only

0 Likes
2,552

hi,

not sure but try this fm HR_MAINTAIN_MASTERDATA.

[Ref click here|;

why don't you try lsmw, or ecatt to upload.

Regards,

koolspy.

Edited by: koolspy on Sep 6, 2011 3:08 PM

Read only

0 Likes
2,552

i need to upload Hiring action in mass

Here, I am assuming that you need to update all those infotypes that comes under hiring action. If this is it, then you should probably go with the function module and create infotype records for the desired infotypes. Since, this is a mass upload, you can loop through the internal table data by calling FM "HR_INFOTYPE_OPERATION" within the loop.

I have done this successfully long back for one of my client and the process is still in use.

Cheers,

Rupesh

Read only

Former Member
0 Likes
2,552

LSMW or eCATT is a better option to upload mass data.....

Thanks,

Muktar

Read only

0 Likes
2,552

Thanks for all answers.

I am HR functional consultant, my requirement is to give solution to do mass hiring fwhich will creates 0,1 and 2 infotypes.

i need the Program/LSMW/BDC which is useful globally, its should useful to hire for US to hire for India to hire for canada etc (at a time we use this program to hire for single country only, but useful for all countries mass hire)

Iam just analysing which is the best way Program/LSMW/BDC program

LSMWAs a fucntional consultant i can do LSMW but as we hav 50 countries do i need to do 50 LSMWs becuase each country will have different fields in 2 infotype and 0 and 1 common for all?

ABAP programincase of program i need to ask my abap consutlatn to develop program using FM , but can they use this FM for my requirements.

I need one program which is useful for globally

BDCProgram I think BDC recording also similar LSMW , same question will one BDC use ful for globally

Please give your suggestions, what you used for globally

Read only

0 Likes
2,552

Developing a program using Function module would serve your purpose. As the FM update is independent of the country and hence can be used globally aas you have mentioned.

As far as BDC and LSMW is concerned, the infotype field may not be the same across countries as a result the different recordings might be required to upload data.

Read only

Former Member
0 Likes
2,552

Hi,

Follow below sample code...

tables: pa0105.

infotypes: 0105.

DATA : I_RETURN TYPE BAPIRETURN1,

I_KEY TYPE BAPIPAKEY,

PERNR TYPE P0001-PERNR,

I_P0105 TYPE TABLE OF P0105 WITH HEADER LINE,

ENDDA TYPE P0105-ENDDA,

BEGDA TYPE P0105-BEGDA.

MOVE '00000010' TO PERNR.

BEGDA = SY-DATUM + 1.

ENDDA = SY-DATUM + 1.

i_p0105-pernr = PERNR.

i_p0105-infty = '0105'.

i_p0105-subty = '0002'.

i_p0105-endda = ENDDA.

i_p0105-begda = BEGDA.

I_P0105-USRTY = '0002'.

I_P0105-USRID = ' '.

APPEND i_p0105.

CALL FUNCTION 'DEQUEUE_ALL' .

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

EXPORTING

NUMBER = PERNR.

IF SY-SUBRC = 0.

WRITE 'Employee Locked Successfully'.

ENDIF.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

INFTY = '0105'

NUMBER = PERNR

SUBTYPE = '0002'

VALIDITYEND = BEGDA

VALIDITYBEGIN = ENDDA

RECORD = i_p0105

OPERATION = 'INS'

TCLAS = 'A'

DIALOG_MODE = '0'

NOCOMMIT = 'X'

IMPORTING

RETURN = I_RETURN

KEY = I_KEY.

IF SY-SUBRC = 0.

WRITE : 'FM returns sy-subrc 0'.

ENDIF.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'.

Ram.

Read only

0 Likes
2,552

i didnt require it for IT 105.

Read only

0 Likes
2,552

remove all fields required option with customize. then execute a batch with masterdata function. it will create only pernrs. then develop a simple program to get data from excel and modify pa0000, pa0001, pa0002.

Read only

Former Member
0 Likes
2,552

Hi,

Currently i have to do a massive upload with all the new employees of a new company that we have bought recently. I have thought to use the function HR_INFOTYPE_OPERATION, I´ll start with the infotype 0 continuing with the rest of infotypes that de PA40 transaction use it: 1,2, 6, 9 , 7, go on...

I don´t know it is correct, or i must create a new hire action for instances 88 - New hire company with infotypes 1 and 2, use legacy for upload this infotypes and later or use the function HR_INFOTYPE_OPERATION for the rest of infotypes that i must to fill up.

Any advices ?????

Thank you in advance...