Skip to Content
author's profile photo Former Member
Former Member

BAPI_BUS21xx_SET_STATUS status change not saved

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 08, 2014 at 09:37 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2013 at 02:27 PM

    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.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.