on 12-18-2013 10:13 AM
Hello experts,
i have a problem with the BAPI's BAPI_BUS21xx_SET_STATUS. We are using SAP PPM 5.0. We don't use any user status for the project definition or project phases.
When i execute a test sequence from SE37 and use the BAPI's BAPI_BUS2172_SET_STATUS and BAPI_CPROJECTS_COMMIT_WORK i get the following results.
Input Data for BAPI_BUS2172_SET_STATUS:
PROJECT_DEFINITION_GUID: my project guid
IS_BUSINESS_TRANSACTION-BUSINESS_TRANSACTION: RELEASE
all other fields are empty. The result is:
I DPR_BAPI 157 BOR object Project 'PROJECTNAME': BAPI method SET_STATUS
I DPR_BAPI 050 No active status profile - deletion is not necessary
The result from the commit BAPI is:
S DPR_CORE 001 No changes were made. Data is not saved
Does anyone have a solution for my problem?
Thanks in advance.
Regards
Christian
Hi Christian,
I could reproduce it in SAP internal system as well. Actually it is not a problem, rather the test of funtion modul is not flexible as a normal program.
The test of function modul in your case is like to run the following codes:
CALL FUNCTION 'BAPI_BUS2172_SET_STATUS'
EXPORTING
project_definition_guid = lv_guid
IV_STATUS_PROFILE = ' '
is_business_transaction = lv_transaction
TABLES
return = lt_return.
Once you codes in the following way in a program, it works fine:
CALL FUNCTION 'BAPI_BUS2172_SET_STATUS'
EXPORTING
project_definition_guid = lv_guid
* IV_STATUS_PROFILE = ' ' " comment out this importing parameter
is_business_transaction = lv_transaction
TABLES
return = lt_return.
Using the function modul test, it is not possible to not given the importing parameter. The not filled importing parameters are considered as 'value = space'. For this BAPI is big difference:
IV_STATUS_PROFILE not set : no change of status profile.
IV_STATUS_PROFILE = space : initialize the status profile. => leads to problem
Kind regards,
Zhenbo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
We are using the same BAPI for setting the status of a task followed by BAPI_CPROJECTS_COMMIT_WORK' and it works all fine. Check the sample code below:
DATA: LS_BUSINESS_TRANSACTION TYPE BAPI_TS_BUSINESS_TRANSACTION.
LS_BUSINESS_TRANSACTION-BUSINESS_TRANSACTION = 'CANCEL'
CALL FUNCTION 'BAPI_BUS2175_SET_STATUS'
EXPORTING
TASK_GUID = TASKGUID
IS_BUSINESS_TRANSACTION = LS_BUSINESS_TRANSACTION
TABLES
RETURN = LT_RETURN.
* check whether the return tabel contains any error entry i.e Return-Type = 'E'
CALL FUNCTION 'BAPI_CPROJECTS_COMMIT_WORK'
TABLES
RETURN = LT_RETURN.
If you are using for Project level, make sure that the project structure is created before going for these BAPI calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
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.