Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Web Dynpro Abap: Make Button invisible

Former Member
0 Likes
1,037

Hi,

seems like a simple task, but I can't get it to work:

(I checked the tutorials first, but I could not make the sample work)

Can someone post a sample code of how to set a button to invisible in the WDOINIT section?

Thanks

hs

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
780

Hi Holger,

refer to the link below, you can do the same & pass the value in WDOINIT rather than Method ONACTIONENABLE_DISABLE as done in the example below:

https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdabap/simple%252bapplication%252bto%252bchange%2...

With luck,

Pritam.

Hi,

seems like a simple task, but I can't get it to work:

(I checked the tutorials first, but I could not make the sample work)

Can someone post a sample code of how to set a button to invisible in the WDOINIT section?

Thanks

hs

4 REPLIES 4
Read only

Former Member
0 Likes
780

HI Holger,

bind that visibilty of that button in the properties.

then in the initiliaztion do as follwo.

wd_context->set_attribute( exporting name = 'BUTTON' value = '1' ).

check 1 or 2 i think its 1 for the hide.

Thanks!

Read only

Former Member
0 Likes
781

Hi Holger,

refer to the link below, you can do the same & pass the value in WDOINIT rather than Method ONACTIONENABLE_DISABLE as done in the example below:

https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdabap/simple%252bapplication%252bto%252bchange%2...

With luck,

Pritam.

Read only

0 Likes
780

I already tried that tutorial, but it does not work. The "SET_ATTRIBUTE" method does not do it.

Read only

0 Likes
780

Hi Holger,

Now for youe caseI have added the below code in WDOINIT to make FIRST_NAME & LAST_NAME invisible and its working

data lo_el_radio_node1_11 type ref to if_wd_context_element.
  lo_el_radio_node1_11 = wd_context->get_element(  ).

* Call method set attribute property and pass value as SPACE to HIDE
  call method lo_el_radio_node1_11->set_attribute_property
    exporting
      attribute_name = 'FIRST_NAME_1'
      property       = 1
      value          = space.

* Call method set attribute property and pass value as SPACE to HIDE
  call method lo_el_radio_node1_11->set_attribute_property
    exporting
      attribute_name = 'LAST_NAME_1'
      property       = 1
      value          = space.

and in by my first answer go to ONACTIONSHOW_HIDE instead of ONACTIONENABLE_DISABLE .

With luck,

Pritam.

Edited by: Pritam Ghosh on Mar 5, 2009 4:17 PM