cancel
Showing results for 
Search instead for 
Did you mean: 

Add Prortfolio Item Custom Fileds

Former Member
0 Kudos


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

vamsixk
Active Participant
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

TudorRiscutia
Active Participant

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

Former Member
0 Kudos

Thanks Tudor for your response!

Can You please explain in more details!!

fabian_nelis
Explorer
0 Kudos

Hello Tudor, yuvraj,

That's exactly what I need.

Does any of you have some coding examples? I'm kinda new to this.

Thanks in advance

Fabian

vamsixk
Active Participant
0 Kudos

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

Former Member

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.

vamsixk
Active Participant
0 Kudos

you can refer to this OSS note from SAP.

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

Kind regards,

Vamsi