Skip to Content
avatar image
Former Member

Add Prortfolio Item Custom Fileds


Dear Expert,

I have requirement to add the certain custom fields in Portfolio Item.

I have added fields in structure /RPM/TS_ITEM_D_DATA_CUST in customer include CI_RPM_ITEM_ATT and am able to add this custom fields with drop down on front end by config and this works fine.

Now i want to have dropdown with multiple selection for some fields. I was thinking to enhance the standard webdynpro component - /RPM/ITEM_DETAILS view - VI_GEN_INFO.

However am not able to see the custom fields added in CI_RPM_ITEM_ATT in to context node ITEM_ATTRIBUTES.

Need your assistance to achieve this? May be in different way using BADI or enhancement.

Regards,

Youraj Thete

Add comment
10|10000 characters needed characters exceeded

  • The Custom fields that we add in the customer include are available in the context only at run time. So you do not need to add them. you can start debugging and check their value in the context.

    You can use the existing hook methods in the webdynpro view/application to achieve the requirements.

    Kind regards,

    Vamsi

  • Follow
  • Get RSS Feed

3 Answers

  • Mar 10, 2014 at 11:47 AM

    Hello Youraj,

    The regular steps are:

    You add the customer fields in CI_RPM_ITEM_ATT. It is advised to user Y_/Z_ as a prefix to the field name (to avoid problems with future releases). Also, you need to activate the Structure.

    If you go into the DDIC structure /RPM/TS_ITEM_D_UI, you should be able to see the newly created fields.

    In component /RPM/ITEM_DETAILS, you cannot directly enhance the context nodes. Unfortunately you'll have to do this via coding. You need to create a new node, maybe Y_ITEM_ATTRIBUTES, with the dictionary structure /RPM/TS_ITEM_D_UI, but only add your custom attributes.

    In the VI_GEN_INFO view, you can add your elements (input fields, labels, etc.) which you must map to the newly created node.

    Go back to the component controller, and create a post-exit for WDDOINIT, here you'll have to change the context. You'll have to rebuild the ITEM_ATTRIBUTES node with the new structure.

    (You can obviously do this from the beginning and create all the UI elements dynamically)

    Next step, you need to create a pre-exit for method WDDOMODIFYVIEW, here you'll have to check the parameter first_time. Here you need to remap the context. Meaning you'll have to change the binding path of all your Y_/Z_ UI elements.

    This might be difficult at first, but you'll figure it out and then it will get easier.

    Hope this helps!

    Tudor

    Add comment
    10|10000 characters needed characters exceeded

    • Key Point to note here is that the custom fields are available in the context only at runtime. but they are available.

      You just need to adapt your code to be able to read the nodes during runtime rather than work with it at design time.

      Kind regards,

      Vamsi

  • avatar image
    Former Member
    Mar 09, 2014 at 07:20 AM

    You best bet is to attach search help for those field and implement input validations in BADI RPM_PROJ_CUST_FIELDS.

    Otherwise, you can create a custom tab for portfolio item and place these fields on that tab.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 11 at 04:02 AM

    you can refer to this OSS note from SAP.

    https://launchpad.support.sap.com/#/notes/2548063

    Kind regards,

    Vamsi

    Add comment
    10|10000 characters needed characters exceeded