cancel
Showing results for 
Search instead for 
Did you mean: 

Change of UI Properties during runtime with SET_ATTRIBUTE_PROPERTY

Former Member
0 Kudos

Hi guys,

I'm trying to change the UI properties during runtime.

I have searched through several threads raised by the others related to this issue, and have also looked at the sample posted by Pritam at:

[http://wiki.sdn.sap.com/wiki/display/WDABAP/SimpleapplicationtochangepropertiesofUIElementsduringruntimeinWebDynproABAP|http://wiki.sdn.sap.com/wiki/display/WDABAP/SimpleapplicationtochangepropertiesofUIElementsduringruntimeinWebDynproABAP]

I tried using the SET_ATTRIBUTE_PROPERTY, but my UI properties does not seem to change. Did not work in WDDOINIT or ONACTIONs.

CALL METHOD lo_el_equipment->set_attribute_property
      EXPORTING
        attribute_name = 'RECEIPT'
        property       = 3
        value          = 'X'.

Can anyone advise on the possible reasons why the method is not working for me?

Not sure if this will help, but during my debugging, I noticed that IF_WD_CONTEXT_ELEMENT~E_PROPERTY is not marked as binded. When I double click into it and try to manually change the values in debug mode, I am getting the following message:

Variable -IF_WD_CONTEX does not exist

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi ,

it works well for me in WD DOINIT ,

u need to have a context attribute RECEIPT under ur CONTEXT tab in ur view .

rgds,

amit

Former Member
0 Kudos

Hi amit,

I do have an attribute called RECEIPT in my view context.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi guys, thanks for the answers.

Amit's method worked perfectly. Thank you. (Though I'm still curious why the SET_ATTRIBUTE_PROPERTY doesn't work for me, but I guess it still works!)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

go thru this link

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm

in this go to - "Properties of Context Attributes"

here you can get detail regarding set_attribute_property which might give u adequate way of doing it

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

The node name is Equipment and you have an attribute Reciept in that node rght?

DATA lo_nd_equipment TYPE REF TO if_wd_context_node.

  • DATA lo_el_equipment TYPE REF TO if_wd_context_element.

  • DATA ls_equipmentTYPE wd_this->element_user_view.

  • DATA lv_accept_enable LIKE ls_user_view-accept_enable.

    • navigate from <CONTEXT> to <USER_VIEW> via lead selection

  • lo_nd_equipment = wd_context->get_child_node( name = wd_this->wdctx_equipment).

*

    • get element via lead selection

  • lo_el_equipment = lo_nd_user_view->get_element( ).

*

CALL METHOD lo_el_equipment ->SET_ATTRIBUTE_PROPERTY

EXPORTING

ATTRIBUTE_NAME = 'RECEIPT'

PROPERTY = " of type T_PROPERTY

VALUE =

.

Priya