cancel
Showing results for 
Search instead for 
Did you mean: 

How to make one colume to show as a hyperlink in a view?

Former Member

Hi expert,

I'm doing an enhancement for a view on a component on WEB UI.

I created a table view and want to make one column to display as hyper link?

What should I do?

Thank you.

Jerry

Accepted Solutions (1)

Accepted Solutions (1)

former_member210661
Active Contributor
0 Kudos

Hi Jerry,

Go to table view context node under attributes select the field and generate get_p_method

declare like this..

CASE iv_property.

  WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.

    rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.

  WHEN if_bsp_wd_model_setter_getter=>fp_onclick.

    rv_value = 'HYPERLINK'.

ENDCASE.

go to events create event name with the same name what you have passed in get_p_method. ex here HYPERLINK.

write the logic over there to navigate.

see this link...

SAP CRM WEB UI : 32.MAKING A FIELD VALUE AS HYPERLINK IN TABLE VIEW

Creation of Hyperlinks to navigate dynamically on Web UI - CRM - SCN Wiki

let me know if you have any queries..

Regards,

Srinivas.

Former Member
0 Kudos

Hi Srinivas,

I redefined my GET_P method,and created the event handler method,but the field is still displayed in normal mode,no hyperlink. I debuged the program,the system get into to GET_P method only ONCE,

the value of IV_PROPERTY is "backgroundColor", that's wierd. Is there any other settings I need to make?

Thank you.

Jerry.

Former Member
0 Kudos

Hi Jerry,

Can you please share the component/view name and screen shot of webui.

Regards,

Ankit

Former Member
0 Kudos

Hi Ankit,

I solved the problem.

Thanks for your attention.

Jerry.

Former Member
0 Kudos

I am having the same problem.
get_p method has been enhanced and created an event handler accordingly.

How did you solve it? Thanks in advance.

Answers (2)

Answers (2)

deepika_chandrasekar
Active Contributor
0 Kudos

.HI Jerry,

Yoy have to put code in GET_P method to make it as hyperlink  fot that perticular attribute.

Regards,

Deepika

Former Member
0 Kudos

HI Jerry,

Generate the Get_P_XXX method for your column and change the FieldType.

Sample Code:

CASE iv_property.

     WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.

       rv_value = cl_bsp_dlc_view_descriptor=>field_type_link.

     WHEN IF_BSP_WD_MODEL_SETTER_GETTER=>fp_onclick.

       rv_value = 'EVENT_NAME'.

       "...

   ENDCASE.



Regards,

Ankit Gupta