cancel
Showing results for 
Search instead for 
Did you mean: 

/RPM/ITEM_MODIFY is not taking custom number range for external ID during creation

Former Member
0 Kudos


Hi Experts,

I face an issue in trying to create projects through file using /RPM/ITEM_MODIFY.

I have been successfully able to create both item and project but it somehow is not taking the external number range for project ID that we had defined for the item type. It takes the SAP standard number for Project ID (external ID). I want the FM to create using the external number range that we use.

Can someone help me with this?

Regards,


Amit

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member186390
Participant
0 Kudos

Hi Amit,

You can implement BADI RPM_OBJECT_SERVICES method GET_NEXT_NUMBER_FOR_EXTID based on Object type. This will help you to manipulate the external number. This BADI Implementation will be called when you use /RPM/ITEM_MODIFY.

Thanks/Amit

Former Member
0 Kudos

Hi Amit,

This might actually work. Let me try this out.

If this works I will let you know

Regards,

Amit Kurup

Former Member
0 Kudos

Hi Amit,

     Did you cross check the coding mask in PS  with the external number range that you have given for Item.

Does FM has the conversions?

check the Note - Note 1641575 - RPM_DX_ITEM does not create Project in Project System

Rgds,

Sudhir reddy

Former Member
0 Kudos

Hi Sudhir,

we don't have an integration with PS. we are just trying to create a project with the custom number range in PPM itself. But through back ground processing using some FM.

As mentioned we are able to create project and item but we are not able to do it with custom number range.

Regards,

Amit Kurup

Former Member
0 Kudos

Hi Amit,

    The custom number in the sense you are following some coding.

Make sure what ever custom code you are using, that coding exists in PS coding Mask and also Edit check box should be unchecked in the PS coding mask.

When ever you try to create a PS Project using a function module, then there should be a conversion exit in the FM how the Internal should be converted in PS coding mask (Same as Item coding Mask).

0WBS_ELM_EX  WBS Conversion exit and include in the FM.

Rgds,

Sudhir

Former Member
0 Kudos

Sorry sudhir but I am not understanding what is PS coding mask.

Yes there is a custom code to fire our custom numbers but it is written in a BADI DPR_Attributes.

We are currently not looking to create project through the standard way and are trying to use Function module  /RPM/item_modify to create a project from the backend. this is where the issue is as it doesn't go through the BADI and doesn't take the custom code.

Can you be more specific as to what I can do in such a case.

Regards,

Amit Kurup

Former Member
0 Kudos

Hi Amit,

     Are you trying to create cProject from Item or PS Project?

I assume you are creating PS Project.

If it is a cProject def you are creating from Item, then check the DFM settings.

There should be a Syn between Portfolio Item and cProject Def in the DFM settings and also check for cProject creation there should be an conversion exit. As you mentioned there is a Custom code in the BAdI.

Rgds,

Sudhir Reddy


Former Member
0 Kudos

It is not through PS project. No linkage as we have not integrated this with PS. It is through item.. check the code. This is just to check how to create from backend. This is where we don't get our custom project id. it takes sap project id.

DATA : ls_item_context type /RPM/TS_ITEM_CONTEXT.

DATA : ls_attributes type /rpm/ts_item_d_api.

data : ls_GUID Type /RPM/TT_GUID .

data : ls_detail_guid type /RPM/TT_GUID.

data : l_rc type i.

data : lT_ATTRIBUTES TYPE  /RPM/TT_ITEM_D_API.

data : LV_NRLEVEL type NRLEVEL.

data : Lv_NRLEV type char20.



ls_item_context-CREATE_CPROJECT = 'X'.

ls_item_context-CPRO_TEMPLATE = '45A24B95FB43010200000000837FF54C'.

ls_attributes-portfolio_GUID = '456C418E3AED018800000000837FF54C'.

*ls_attributes-EXTERNAL_ID = '102680'.

*ls_attributes-parent_GUID = '4576F8DCF90B01F800000000837FF54C'.

ls_attributes-parent_GUID = '4717C6437A8D010A00000000837FF54C'.

ls_attributes-Proj_description = 'NEW TEST'.

ls_attributes-item_type = 'ZPEP_PT_31'.



*Select single NRLEVEL into lv_nrlevel from NRIV where OBJECT = 'ZPEP_NPO'.

*lv_NRLEVEL = Lv_NRLEVEL + 1.

*lv_NRLEV = lv_NRLEVEL.

*

*ls_attributes-EXTERNAL_ID =  lv_NRLEV.

*

APPEND ls_attributes to lt_attributes.





CALL FUNCTION '/RPM/ITEM_MODIFY'

  EXPORTING

    IV_LANGUAGE             = 'EN'

    IV_CHANGE_MODE          = 'C'

*   IV_COMMENTS             =

*   IV_SHORT_TEXTS          =

   IS_MODIFY_CONTEXT       = ls_item_context

IMPORTING

   EV_RC                   = l_rc

  TABLES

    IT_ATTRIBUTES           = lt_attributes

*   IT_ACLS                 =

*   ET_MSG                  =

    ET_GUID                 = ls_GUID

    ET_DETAIL_GUID          = ls_detail_guid

          .

If sy-subrc = 0.



  CALL FUNCTION '/RPM/SAVE_CHANGES'

*   EXPORTING

*     IV_CHECK_ONLY           = /RPM/CL_CO=>SC_FALSE

*     IV_REMOVE_OBJECTS       =

*   IMPORTING

*     EV_RC                   =

*     ET_MSG                  =

            .

    if sy-subrc = 0.

    endif.

  endif.

Former Member
0 Kudos

Hi Amit,

I Really don't understand what Project ID means, Is it Portoflio Item ID/cProject Def ID?

Anyways check the Configuration:

1. Go to transaction SPRO and open "SAP Reference IMG"
2. Navigate to SAP Customizing Implementation Guide->SAP Portfolio and
Project Management->Portfolio Management->Global Customizing->Global
Settings->Override Default Global Settings.
3. Add new entries as mentioned below.
  Area      0002
  Name      0010
  Setting Value X

And also check the Global Project Management in PPM incase you are creating cProject.

Project Management-->Basic Settings-->Check Global Settings.

apply the same settings.

Rgds,

Sudhir Reddy

Former Member
0 Kudos

Hi Sudhir,

basically project id means /rpm/item_d -external_id. It is item id.

the set up in configuration is default and I cannot touch those. it might impact other things.

Is there anything else I can do.. the code is given on top.

Regards,

Amit Kurup


ravi_ekambaram
Active Contributor
0 Kudos

Hi Amit,

If you are looking for automatic project numbers using user-defined rules, then you can refer the below SAP note.

1607418 - Project ID is not generated automatically



Regards,

Ravi


Former Member
0 Kudos

Hi Ravi,

We are looking at creating the Project through external file.. through the FM  /RPM/ITEM_MODIFY. The note suggests how to do this through the standard way by adding BADI. we have this already for the standard way of creating

But I cant add the BADI in the FM.

Regards,

Amit Kurup

anuradha_majumdar
Active Participant
0 Kudos

Hi Amit,

Have you tried using RPM_DX_ITEM instead of the FM. RPM_DX_ITEM can take files as input and it perhaps calls the BAdI also.

Regards,

Anuradha