01-11-2007 12:26 PM
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
01-11-2007 4:18 PM
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
01-12-2007 3:57 AM
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
01-12-2007 4:03 AM
01-12-2007 4:08 AM
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.
02-10-2007 3:29 PM