Application Development 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: 

BAPI to upload HR mater data

Former Member
0 Kudos

Hi,

We have a requirement to upload employee addresses from an excel file to table PA0006. We are using the standard BAPI , BAPI_ADDRESSEMP_CREATE for this purpose. All mandatory fields like PERNR,BEGDA,ENDDA and SUBTY are being passed to this BAPI.Also we have used appropriate function modules to enqueue and dequeue the PERNR. However we get a message 'Make an entry in all required fields'. Can somebody tell us what we might be missing out on?

Thanks in advance!

Regards,

Nejuma Iqbal

5 REPLIES 5

former_member186746
Active Contributor
0 Kudos

Check if the bapi has a return parameter, in this one not only the message is shown, but also on which field.

For HR master operations, you can also use HR_INFOTYPE_OPERATION.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Iqbal,

I tried that function module in se37 itself and it is working fine. You just need to pass PERNR, BEGDA, ENDDA, Address Type and POSTALCODE (sub type), as they are the mandatory fields.

Make sure that all the fields are populated correctly in the debug mode.

Regards,

Kiran Chennapai

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Try using HR_INFOTYPE_OPERATION.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

This sample code is from SDN.

REPORT ztest MESSAGE-ID 00.

DATA: BEGIN OF return_int OCCURS 0.

INCLUDE STRUCTURE bapireturn1.

DATA: END OF return_int.

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

EXPORTING

number = '48'.

CALL FUNCTION 'BAPI_ADDRESSEMP_CREATE'

EXPORTING

employeenumber = '48'

validitybegin = '20061231'

validityend = '99991231'

addresstype = '2'

coname = 'USA'

city = 'Atlanta'

TABLES

return = return_int.

LOOP AT return_int.

ENDLOOP.

IF whatever.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ENDIF.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'

EXPORTING

number = '48'.

Kindly reward points by clicking the star on the left of reply,if it helps.

Former Member
0 Kudos

Resolved!