2016 Jul 25 7:23 AM
Hi All,
In Proj table i created two custom fields, now i want to update the two z-fields with value.
So i used the below code :
ls_proj_ext_in-structure = 'BAPI_TE_PROJECT_DEFINITION'.
ls_proj_ext_in-valuepart1+0(24) = gs_alcon_sp-zzy.
ls_proj_ext_in-valuepart2+181(10) = gs_alcon_sp-zzs.
append ls_proj_ext_in to lt_proj_ext_in.
call function 'BAPI_PS_INITIALIZATION'.
ls_proj_def-project_definition = gs_proj-pspid.
call function 'BAPI_BUS2001_CHANGE'
exporting
i_project_definition = ls_proj_def
i_project_definition_upd = ls_proj_def_upd
tables
et_return = lt_return
extensionin = lt_proj_ext_in .
call function 'BAPI_PS_PRECOMMIT'
tables
et_return = lt_return.
refresh lt_return.
After that am getting value on lt_return as []
1)Final check of the project definition and the WBS elements: Error
2)Validation WBS Elements carried out
3).Fill in all required entry fields
so i dint get any updation on Proj table..
Kindly help me how to update the value on two z-filds bu using the bapi.
Thanks,
Nithya.
2016 Jul 25 10:54 AM
But you have your error message in the table listed above, not all mandatory fields were filled in:
1)Final check of the project definition and the WBS elements: Error
2)Validation WBS Elements carried out
3).Fill in all required entry fields
2016 Jul 25 11:09 AM
Hi,
You need to provide entry for all required field of BAPI BAPI_BUS2001_CHANGE.
To know more about the BAPI and required filed please refer function module documentation under se37 transaction toolbar.
2016 Jul 25 11:58 AM
Hi Nithya
You may need to add BAPI_TRANSACTION_COMMIT as well at the end .
Also try to validate if using the same set of data are you able to update the Project ?
As these errors seems to be data errors to me
Regards
Vinita