‎2009 Aug 12 6:18 PM
I want to use the BAPI_PERSDATA_CHANGE using the se37 transaction.
If i use without the BAPI_EMPLOYEE_ENQUEUE i get the error message
Employye/applicant is not locked yet
If i use the with BAPI_EMPLOYEE_ENQUEUE ,then it gives me message
"make an entry in all required fields".
I just want to change the "marital status" of the person.
Now what are the required fileds i should fill for this.
Best Regards
Manoj
‎2009 Aug 12 6:24 PM
Hi,
You cannot use BAPI_PERSDATA_CHANGE from SE37 becz you need to use bapi_commit_transaction after using the BAPI.
‎2009 Aug 12 6:28 PM
Hi,
You can also use BAPI_INFOTYPE_OPERATION for this purpose.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0002'
number = g_pernr "Personnel number
validitybegin = p_dol_dt
record = gt_p0015 "Record should be of type p0002 and fetch and fill all the data in existing record.
operation = 'MOD'
IMPORTING
return = gs_return.
But anyhow both the FMs can not be used for testing in SE37 as it wont update any data.Instead u have to write a sample code in SE38.
Edited by: Vimal V on Aug 12, 2009 7:28 PM
‎2009 Aug 12 6:31 PM
Hi,
thanks for the response.
but waht are the required fields that i need to lrovide to the BAPI to avoid the error mkessage
"make entry in all required fields"
Best Regards
Manoj
‎2009 Aug 12 6:40 PM
Just fetch all the fields from the record you want to Modify from PA0002.
Pass it in the records importing parameter of the FM.
and for other fields just follow the code snippet i pasted in my prvious post.Tell me if any issues.
Regards,
Vimal.
‎2009 Aug 13 1:57 PM
Hi Vimal,
I am sorry but i did not get ur answer.
The BAPI PERS_DATA_CHANGE
gives me an error asking me to fill the
"Make an entry in all required fields".
how should i coem to know which field are required.
Can you help me in this.
best Regards
Manoj
‎2009 Aug 13 2:02 PM
In BAPI_PERSDATA_CHANGE BAPI, following fields are mandatory EMPLOYEENUMBER SUBTYPE OBJECTID LOCKINDICATOR VALIDITYBEGIN VALIDITYEND RECORDNUMBER You should goto the import tab and check the optional column, if it is not ticked means the field is required field. Regards, Radhika.