on 07-16-2008 8:52 AM
Dear Experts,
I am developing a utility program to change the status of multiple projects at once.
I am changing the status of Phase, task, check list,check list item and Project status from
Create to Release, release to Complete and to Work Effor Complete.With respective status change BAPIS.
when ever the projects is not able to change the status success fully due to validations
such as person respondsble not mainted or any other basic data is missing,
We are not committing the changes if every thing goes fine we are commiting with BAPI: BAPI_CPROJECTS_COMMIT_WORK
but when we commit with this it still retaining the previous project status in LUW and trying to commit previous project too.
and commit is getting failed.
I am not able to roll back or free the project with BAPI:BAPI_CPROJECTS_ROLLBACK_WORK and BAPI_BUS2172_FREE
BAPI_CPROJECTS_ROLLBACK_WORK: when iam trying to use this BAPI it is going to short dump
BAPI_BUS2172_FREE: It is returing error saying unable to free the project.
Could you please tell how to roll back the changes to the project or how to commit only success full projects (Project with out any errors in status change.)
Kindly do the needful
Thanking you.
-ravi
Problem got solved by creating a new report for status change code and submit it from main program for every project, which in turn creates a new LUW for every project processing and will destroy or commit after erroneous or successful change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
if I remember correctly, the rollback-bapi is to be called if the commit has failed, i.e.
commit
if commit failed
rollback
endif
Hope this helps. Best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Experts,
I am developing a utility program to change the status of multiple projects at once.
I am changing the status of Phase, task, check list,check list item and Project status from
Create to Release, release to Complete and to Work Effor Complete.With respective status change BAPIS.
when ever the projects is not able to change the status success fully due to validations
such as person respondsble not mainted or any other basic data is missing,
We are not committing the changes if every thing goes fine we are commiting with BAPI: BAPI_CPROJECTS_COMMIT_WORK
but when we commit with this it still retaining the previous project status in LUW and trying to commit previous project too.
and commit is getting failed.
I am not able to roll back or free the project with BAPI:BAPI_CPROJECTS_ROLLBACK_WORK and BAPI_BUS2172_FREE
BAPI_CPROJECTS_ROLLBACK_WORK: when iam trying to use this BAPI it is going to short dump
BAPI_BUS2172_FREE: It is returing error saying unable to free the project.
Could you please tell how to roll back the changes to the project or how to commit only success full projects (Project with out any errors in status change.)
Program flow
Loop at It_Project
*Status Change for Check List
CALL FUNCTION 'BAPI_BUS2176_SET_STATUS'
EXPORTING
checklist_guid = p_guid
IV_STATUS_PROFILE =
is_business_transaction = lv_bus_trans
TABLES
return = t_return.
*Status Change for task
CALL FUNCTION 'BAPI_BUS2175_SET_STATUS'
EXPORTING
task_guid = p_guid
is_business_transaction = lv_bus_trans
TABLES
return = t_return.
;
;
*Status Change for project
CALL FUNCTION 'BAPI_BUS2172_SET_STATUS'
EXPORTING
project_definition_guid = p_guid
is_business_transaction = lv_bus_trans
TABLES
return = t_return.
If there is a sucess in changing the status.
CALL FUNCTION 'BAPI_CPROJECTS_COMMIT_WORK'
TABLES
return = t_creturn.
Else.
CALL FUNCTION 'BAPI_CPROJECTS_ROLLBACK_WORK'
TABLES
return = t_rreturn.
Endif.
Endloop.
In the above code when we are executing BAPI_CPROJECTS_ROLLBACK_WORK is going for dump.
If we simply commit with BAPI_CPROJECTS_COMMIT_WORK for all the projects then if any project
commits with error same error is re produced for all the following projectsid (unable to destroy the LUW).
and in CRM we can't use 'BAPI_TRANSACTION_ROLLBACK'.
Could any one help me with how to approach this scenario.
I want to complete the LUW after every single project process.
Kindly do the needful
Thanking you.
-ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.