Dear Experts,
For the purpose of the data migration of Open projects and WBS, I am using the following BAPI's:
Project Definition: BAPI_BUS2001_CREATE
WBS Elements : BAPI_BUS2054_CREATE_MULTI
I have chosen these two BAPI's, as the projects have custom enhancements and the same has to updated during the creation. As both the BAPI's have the EXTENIN structure and the documentation also suggests you can update the custom enhancements through these structures.
The Flow of the BAPI's is as given below:
For Project Definition creation:
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2001_CREATE'
EXPORTING
i_project_definition = wa_projdef
TABLES
ET_RETURN = it_return
EXTENSIONIN = it_extin
EXTENSIONOUT = it_extout.
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
TABLES
et_return = it_return1.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = wa_return.
.
I am passing the values to the Extensionin structures as given in the documentation but without any success as the Project definition and WBS Elements are created without the custom enhancement values.
There is also a BADI 'BAPIEXT_BUS2001', but I dont think any action is required as I am not doing any further processing.
Also I checked the OSS note 637345, it says replace the CI_PROJ structure into ZCI_PROJ in the BAPI_TE_PROJECT_DEFINITION if you have alpha-numeric fields in the custom enhancement. As I have only character fields, I am of opinion that this might not help.
Kindly advise a solution to this problem . Prompt replies highly appreciated.