‎2016 Aug 15 3:26 PM
Hey there!
I was wondering maybe someone could help me with an issue when trying to update project information (i.e updating dates).
For doing that, I am using the BAPI BAPI_PROJECT_MAINTAIN.
For example, when trying to update the start and end date of a wbs element, I am populating these rows in the bapi's tables:
and
But, the E_MESSAGE_TABLE returns me an error alongside with some warning and information messages, like:
Error: "Field /Time Stamp: Changing the contents of the field is not permitted"
Information: "TTR_INIT"
However, when I go to the Project Builder (cj20n), I can see that the dates have been successfully updated.. Still - the returned error message concerns me - does anyone have any explanation for these errors and knows how to resolve this?
Thank you ,
Mario
‎2016 Aug 15 4:54 PM
Hi Mario,
you can use below BAPI in sequence.
BAPI_PS_INITIALIZATION
BAPI_BUS2054_CHANGE_MULTI
BAPI_PS_PRECOMMIT
BAPI_TRANSACTION_COMMIT
Please read the FM Documentation.
Regards,
Praphul
‎2016 Aug 15 4:54 PM
Hi Mario,
you can use below BAPI in sequence.
BAPI_PS_INITIALIZATION
BAPI_BUS2054_CHANGE_MULTI
BAPI_PS_PRECOMMIT
BAPI_TRANSACTION_COMMIT
Please read the FM Documentation.
Regards,
Praphul
‎2016 Aug 16 12:09 PM
Hello,
thank you for your answer - I tried your solution, and when trying to change the dates with BAPI_BUS2054_CHANGE_MULTI, I get an error of "Enter an allowed object class.".
The code I tried it with is as follows:
I_PROJ = 'Z/003'
WA_IT_WBS_ELEMENT-WBS_ELEMENT = 'Z/003-12'.
WA_IT_WBS_ELEMENT-WBS_BASIC_START_DATE = '20160803'.
WA_IT_WBS_ELEMENT-WBS_BASIC_FINISH_DATE = '20160826'.
APPEND WA_IT_WBS_ELEMENT TO IT_WBS_ELEMENT.
WA_IT_UPDATE_WBS_ELEMENT-WBS_ELEMENT = 'Z/003-12'.
WA_IT_UPDATE_WBS_ELEMENT-WBS_BASIC_FINISH_DATE = 'X'.
WA_IT_UPDATE_WBS_ELEMENT-WBS_BASIC_FINISH_DATE = 'X'.
APPEND WA_IT_UPDATE_WBS_ELEMENT TO IT_UPDATE_WBS_ELEMENT.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'
.
CALL FUNCTION 'BAPI_BUS2054_CHANGE_MULTI'
EXPORTING
I_PROJECT_DEFINITION = I_PROJ
TABLES
IT_WBS_ELEMENT = IT_WBS_ELEMENT
IT_UPDATE_WBS_ELEMENT = IT_UPDATE_WBS_ELEMENT
ET_RETURN = ET_RETURN <<<<<<<< RETURNS THE ERROR MESSAGE
** EXTENSIONIN =
** EXTENSIONOUT =
* .
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
TABLES
ET_RETURN = ET_RETURN
* .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
** EXPORTING
** WAIT =
IMPORTING
RETURN = ET_RETURN
Still - I think the same thing could also be done in the BAPI_PROJECT_MAINTAIN, as it supports changing the milestones and network as well (also need to change those too). Furthermore - I get the same error "Field /Time Stamp: Changing the contents of the field is not permitted" when trying to update the wbs description, but when checking the project with cj20n I can see that the description has been actually changed successfully.
Heres a snapshot of the returned messages when trying to update the dates/description with BAPI_PROJECT_MAINTAIN:
Any ideas what i am doing wrong?
‎2016 Aug 16 12:32 PM
hi mario,
i think you have missed some parameters in the above function module,
data : ls_extensionin TYPE bapiparex,
lt_extensionin TYPE STANDARD TABLE OF bapiparex.
CLEAR ls_extensionin.
ls_extensionin-structure = 'BAPI_TE_WBS_ELEMENT'. " Extension Structure
ls_extensionin-valuepart1 = ls_te_wbs_element.
APPEND ls_extensionin TO lt_extensionin.
pass this lt_extensionin to extensionin(parameter) of above FM...
regards,
vinay....
‎2016 Aug 29 2:13 PM
Hello Vinay,
thanks for you answer! I ran into some similar problems with your suggested BAPI.. Nevertheless - my primary wish was to use the BAPI_PROJECT_MAINTAIN, as is should allow me to change every project detail. I followed the BAPI's documentation and used the exact same fields as was in the sample of the documentation - still I get the error message.