Skip to Content
0
Former Member
Feb 22, 2011 at 07:36 AM

webdynpro set value problem

484 Views

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?