cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro set value problem

Former Member
0 Kudos

Hi all,

I have a requirement of adding an URL in the SRM portal.

When we click on create button the URL need to be displayed. When we click on create button some attachment functionality is triggering. Our functional people don't want that functionality. They want me to display URL when they click on create button.

I have to remove the existing 2 columns and add an extra column URL in the existing portal.

I have created an enhancement and created a new column named URL(LINK TO URL) in the existing component. OI have also created a node URL in the context and binded this to the newly created URL column.

I have also created overwrite enhancement for over writing the existing create button functionality (created an enhancement spot for the exact method calling the create button). By using magic stick I have set the value for URL.

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

DATA lv_url TYPE wd_this->element_context-url.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

  • @TODO handle not set lead selection

IF lo_el_context IS INITIAL.

ENDIF.

  • @TODO fill attribute

  • lv_url = 1.

LV_URL = 'http://www.google.com'.

  • set single attribute

lo_el_context->set_attribute(

name = `URL`

value = lv_url ).

When I open the portal I am able to see URL field as third column, BUT when I click on create button the URL is not displaying

In this regard I have 2 questions:

1) How can I display value when I click on create button.

2) How can I disable the remaining two columns?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks for your replies. The probelm got solved by changing the binding. I have creatd an extra attribute and binded it in the begining. Now I have binded the url field in one of the standard tables used in this create button I view.

An URL is displaying in the portal when I click on create button. But it is getting refreshed when I go to any another tab.

My requirement is to show this url when we publesh RFx. But the URL is getting rereshed when I go to any other tab.

I struck up very badly here. It would be very help full if any body can help me with this.

Thanks in advance.

Former Member
0 Kudos

Hi,

for disabling the columns create one attribute of type wdy_boolean, then bind this attribute in property enabled of column which u want to disable. then on create button set attribute value as ABAP_FALSE.

gill367
Active Contributor
0 Kudos

HI

first create one attribute in the node which is acting as the data source of the table.

and then bind this attribute to the target and text property of the table col's cell editor ( link to URL)

then fill the value in this attribute for the element selected on create button event handler.

thanks

sarbjeet singh

Former Member
0 Kudos

HI ,

Despite your long post , I am quite confused with your requirement.

First of all , Which UI element are you using???

Considering it as a normal Table , you now want to disable (or hide) the two columns and add a new column whose cell editor is a link to URL???

And the value to this linktourl is set on click of a 'Create Button' and also you want to make the linktourl visible only when the create button is clicked??

Please clarify the following points...

And answer to your 2nd question How can I disable the remaining two columns? would be to set the enabled property of the table column's cell editor to abap_false or unticking the enabled property.

Thanks,

Aditya.