Skip to Content
0

Replace PPM ID with PS

Aug 02, 2017 at 09:49 PM

211

avatar image

Hi,

We have implemented, PPM integration to PS and it works fine..!! Since we are already using PS ( and have a number range for Project & WBS), we would like to use the same number for PPM as PS.. For E.g., PPM creates a project with 14XXX and PS creates ZZ-101010, at the end of save of PPM we would like to overwrite 14xx with ZZ-XXX.

For this, we tried to modify the entry in table DPR_project-PROJECT_ID via BADI WORKBREAKDOWN_UPDATE. The method On save is triggered on PS project creation. For sometime the values are changing in DB.

However, after changing the value in BADI , when control goes back to PPM ( from PS), the values are again reset to 14XX and there is no change in Project_ID.

Please advice,the best approach to change the ID in PPM ( Any PPM BADI) etc..

I have already looked at DPR_ATTRIBUTES & DPR_DEMO_SUBSYSTEM and it did not help. Also Generate number range method is triggered before the PS project creation. We are looking for event/BADI which is triggered after the PS project is created and when the cotrol comes back to PPM system from PS.

Thanks!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Harish Wadhwani Aug 04, 2017 at 08:33 PM
0

Hi All,

Please advice, if anyone has faced this situation..!!

We would like to copy PS ID with PPM ID for ease of the user search or reporting purpose ,avoiding need of Cross Reference.. !! The challenge here as mentioned is, On Save of PPM BADI, PS project is not yet created and On Save of PS Project, if i make change to PPM ID, SAP over writes back to old PPM ID..

I am looking for way to update the PPM ID after PS project ID creation and before the statues is locked in PPM.

Thanks!

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Harish,

Tag ABAP network https://www.sap.com/community/topic/abap.html

Regards

Terence

0
Harish Wadhwani Aug 07, 2017 at 03:27 PM
0

Thanks for directing to me to ABAP.. Nowadays, it is so hard to post question on SDN with SAP removing the folders and giving 3 word selection..!! Hope SDN folks are seeing this issue and reverting to old folder based SDN instead of going user 3 letter option...

Share
10 |10000 characters needed characters left characters exceeded
Francesco Pezzoli
Aug 09, 2017 at 10:14 AM
0

Hello Harish.

I think it was OK for you to tag this question "SAP Portfolio and Project Management", as it primarily concerns which PPM BAdI is appropriate for what you are trying to achieve.

I assume that you are talking about the usual scenario where the PS project is created automatically when saving the Project Management project (after release or transfer status). If not, and you are actually trying to link existing PS projects, the following does not apply.

I am not sure why you have discounted BAdI DPR_ATTRIBUTES, in my opinion this is the correct one for what you are trying to do (Indeed I am aware of at least one SAP customer who was using it for this purpose). The key thing is that this BAdI will be processed before the creation of the PS project, so what you need to do is to ensure that the numbering is carried out in such a way that it will fit your coding mask and numbering logic in PS (maybe in order to so so you will need to implement a logic in the BAdI which will call your ERP system, check the next free number with the desired coding mask and return it to the BAdI?). Once you have influenced the numbering of the Project Management project via the BAdI, you should see that this numbering is reflected upon automatic creation of the PS project.

Depending on your specific scenario, you may also need to implement BAdI GCC_PS_PROJECT_LABEL on ERP side to influence the

keys and names of the PSP project definitions and PSP elements that are created automatically. The BAdI documentation provides further details.

Best regards

Francesco

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi,

Based on your reply, i tried to use BADI DPR_ATTRIBUTES-Get Project ID. Here i get the next PS project no and update the PPM project with that..!! However i have some challenges

(1) This BADI-method is triggered at various stages ( Save, release, Flag for transfer) and does not give any parameter on which mode, it is triggered.

(2) Lets say, if the user creates a PPM project and gets next PS number range and somehow PS projects does not get created ( error etc) Now this PS no is locked for this project ID but not not in PS Database(as no PS project got created). Another used comes and creates PPM proj.. Now he will get the same no as the last due to PS projects not in DB ( from last one).. Both has the same PS no for PPM.. This is causing the issues in reporting etc..

I am looking for any BADI/EP which is triggered at the end of the PS process so i can safely update the PPM ID.

Thanks!

0
Harish Wadhwani Aug 11, 2017 at 03:11 PM
0

Thanks Francesco for detail reply. Yes, I am talking about the usual scenario where the PS project is created automatically when saving the Project Management project (after release or transfer status).. I had looked at the BADI DPR_ATTRIBUTES specially the method GENERATE_PROJECT_ID.

The issue with this is, as you mentioned, BADI is called before the PS project creation ( although it is also called one time after it as well but i could not change the data).. Imagine a situation where this BADI fetches a number using FM ' CN_SUCHE_FREIE_NUMMER'.

Now the PPM has new no. but if the PS project with same no, fails to create ( due to some other validation, Z or SAP), this no would be saved in PPM Table ( irrespective of successful completion of PS project).. !! Now when the correction is made to data & PS project creation process is fixed, it will take the no range which is already used ..Also if multiple uses creates the PPM project and some of them failed to create PS project, it would create inconsistency..

The way we coded was to have 99.99% guarantee, that PS project would be created. This is achieved by coding in BADI 'WORKBREAKDOWN_UPDATE' method AT_SAVE. This is called before PS project is created and after all checks are done.

In this method e doing direct update to table DPR_PROJECT field PROJECT_ID ( as this is no PK). This update looks good in table but when the control goes back to PPM, it overwrites the field with Old No ( that PPM no range generated)..

I am looking for solution for this as business don't want to maintain 2 IDs ( PPM and PS) and search would be difficult with 2 IDS.

Also we tried to update the PS id into empty search field (SEARCH_FIELD) in DPR_PROJECT table. However we are facing the same issue, table gets updated first and then again removed with blank ( or original value)

Please advice .

Thanks!

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 11 at 10:44 AM
0

Hi Harish,

have you already found a solution ? At the moment we are struggling with the same issue... Updating the field in DPR_PROJECT is not sufficient because the ID is also used in various other locations, f.i. tables CGPL_PROJECT, CGPL_ENTITY etc.

Class CL_CGPL_PROJECT has a public method SET_ATTRIBUTES which itself calls a private method SET_EXTERNAL_ID . Sounds promising but up until now I have not been able to get it to work so any help is welcome...


Joop


Share
10 |10000 characters needed characters left characters exceeded
Harish Wadhwani Feb 26 at 06:46 PM
0

Hi,

We used BADI DPR_ATTRIBUTES and method GENERATE_PROJECT_ID, to direclty update the DPR table with PS ID.

This method is called several times in process and to make sure, it updates only when the PS projects is created, a check is made in view VIAOM_CPRO_PRPS to see if the project is created. For us the PS ID is Z field in DPR & /RPM tabless.

Here is the code, hope it helps..!!

DATA: POSID TYPE PS_POSID.
** Find the PS ID from PPM
  SELECT SINGLE POSID FROM VIAOM_CPRO_PRPS INTO POSID
    WHERE PROJECT_ID =  is_project-PROJECT_ID " this is input in BADI
    AND OBJECT_TYPE = 'DPO'. " Project
  IF sy-subrc eq 0.
    UPDATE DPR_PROJECT
    SET ZZPPJPSID = POSID
    WHERE PROJECT_ID = is_project-PROJECT_ID.
    IF Sy-subrc EQ 0.
      UPDATE /RPM/ITEM_D
      SET ZZPPJPSID = POSID
      WHERE EXTERNAL_ID = is_project-PROJECT_ID.
    ENDIF.
  ENDIF.
Share
10 |10000 characters needed characters left characters exceeded