cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI to update planned start and finish date

Former Member
0 Kudos

Hi Experts,

I am very new to SAP PPM and I have no prior knowledge about PPM although I have started to explore it. I am an ABAPer and I would like to know how would I be able to change planned start date and planned finish date for an item. Is there any BAPI available for it to change these dates ?

I am following below process. Kindly advise/suggest/guide/help me to understand this. Right now I understand that from table /RPM/ITEM_D, I get planned start date and planned finish date .

Thanks and regards,

Abhijit.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Abhijit,

In the enhancement spot from where you want to change the planned start / finish dates, just call the FM /RPM/ITEM_MODIFY passing ITEM GUID in IS_MODIFY_CONTEXT-ORIGINAL_ITEM and with IV_CHANGE_MODE as 'U' (mass upload).

Then in the IT_ATTRIBUTES, you can put planned start / finish dates in D_PLANSTART and D_PLANFINISH.

Hope this helps.

Best regards

Aditya

Former Member
0 Kudos

Hi Aditya,

Indeed thanks for the reply.

However, I asked question incorrectly. My bad.

My requirement is to find out the projects those have Start and Finish dates and I need to clear these dates. Please find attached screen shot.

Any idea in which table I will find these date ? I could not find these dates in /RPM/ITEM_D. Please advise.

Former Member
0 Kudos

Hi Experts,

Appreciate your advice/suggestions/help.

Thanks and regards,

Abhijit.

Former Member
0 Kudos

Hi Abhijit,

It seems that you want to clear the dates of project roles pertaining to certain project. May I ask, what is the requirement of clearing these dates as it is determined from the tasks and resources associated with the role?

By the way, the best way to change the role assignment dates is through FM BAPI_BUS2169_ROLE_ASSIGN_CHANG.

Best regards,

Aditya

Former Member
0 Kudos

Hi Aditya,

Thank you once again.

We have a custom view in PPM and issue is at present, these start date and finish date is controlling validation of the assigned roles. It results in to inconsistency. It means if start date and finish dates are greater than those of calculated start date and calculated end date, cost will be available till start and finish dates. In order to avoid this, I was informed to implement this work around as of now. I had found another BAPI BAPI_BUS2177_ROLE_DIST_SET.

Now one more question as I have limited knowledge of PPM. IN the said FM, BAPI_BUS2169_ROLE_ASSIGN_CHANG, how would I get TASK_TMPL_GUID ? I know couple of tables like /RPM/ITEM_H, /RPM/ITEM_D and DPR_PROJECT. So the parent GUID will be the TASK_TMPL_GUID ? Based on Project_ID I will get IV_ROLLASSIGNMENT_GUID. Is my understanding correct ?

Thanks and regards,

Abhijit.

Former Member
0 Kudos

Hi Abhijit,

My bad on giving the FM name. The FM to change Task to Role assignment details should be BAPI_BUS2175_ROLE_ASSIGN_CHANG. Here you will have to assign Task GUID and Role assignment GUID.

If you are calling the FM from any enhancement spot or custom program, then I believe you will be able to retrieve Task GUID from local variables. However, Task GUIDs for project can be retrieved from FM BAPI_BUS2172_GET_TREE where input parameter is Project GUID which can be retrieved from DPR_PROJECT.

The one with BUS2169 is for the task in project template.

The FM BAPI_BUS2177_ROLE_DIST_SET would be also an ideal one for you to set the demand. Only the thing is - From the enhancement spot or custom program, the Role GUID should be available in one of the local variable and I am sure that will be the case for you.

Let me know if you need any further details on this.

Best regards

Aditya

Former Member
0 Kudos

Thanks a ton Aditya. However, I could not get IV_ROLLASSIGNMENT_GUID part. There are many GUIDS related to roles. How would I be able to get IV_ROLLASSIGNMENT_GUID ?

Kindly correct my understanding.

From DPR_PROJECT, I will get project GUIDs. Based on project GUIDs how would I get IV_ROLLASSIGNMENT_GUID ? I have found another FM, BAPI_BUS2177_GET_DETAIL. Will this help ? I am designing a new custom program here. So first step should be to get Project definition and based on project definitions, I should get roll assignment guids. As a first step, I referred program RBUS2175 and found that IV_ROLLASSIGNMENT_GUID are coming from some workflow and I think this is standard program which has been scheduled in order to get IV_ROLLASSIGNMENT_GUID. Any other way to get this IV_rollassignment_GUID?

Thanks and regards,

Abhijit.

Former Member
0 Kudos

Following should be the steps:

1. Project GUID from DPR_PROJECT based on PROJECT_ID.

2. Get complete list of Tasks from FM BAPI_BUS2172_GET_TREE by passing Project GUID of Step 1. Here tasks can be identified where OBJECT_TYPE is 'TTO'.


3. Pass each individual TASK GUID in FM BAPI_BUS2175_ROLE_ASSIGN_GET_D with IV_ROLEASSIGNMENT_GUID as '*'.

--> In the ES_ROLEASSIGNMENT you will find all list of all ROLEASSIGNMENT_GUID and ROLE_GUIDs.

Best regards,

Aditya Kotak

Former Member
0 Kudos

Hi Aditya,

I tried the same yesterday itself and fortunately I have done the same steps as you have mentioned. In the program, I kept the dates blank and expected it will update the dates on portal. I also used both BAPIs; BAPI_CPROJECTS_COMMIT_WORK and BAPI_TRANSACTION_COMMIT alternately. It did not show the blank dates. I am wondering how it is not updating the dates. In the past I have used other BAPIs like BAPI_PO_CHANGE and I was able to see the changes. Here, I am not able to understand why dates have not been updated. Is there anything else I have to do here ?

Thanks and regards,

Abhijit.

Former Member
0 Kudos

Hi Abhijit,

My suggestion would be, at least adjust the assignment dates with the demand dates or as per the cost calculation required by business based on some logic. System wont allow you to keep the dates blank.


Other ECC objects like PO, GR, IO, etc., objects might not have date / schedule dependency on like Role assignment in PPM. Hence clearing out dates would have worked there.



Best regards

Aditya

Former Member
0 Kudos

Hi Aditya,

Thanks a lot. By any chance do you know if there are any documents for PPM + ABAP ? How should I start with ? I mean I know very little about PS but I am not confident about PPM. There are plenty BAPIs in PPM. How to identify business object type specific BAPIs for example BUS2168, BUS2175, BUS2177 etc. ? Most of them appear same to me.

Thanks and regards,

Abhijit.