cancel
Showing results for 
Search instead for 
Did you mean: 

regarding 'get_attribute_props_for_node'* method from if_wd_context_node

Former Member
0 Kudos

hello gurus,

i have requirement in a view it has two radio buttons named as release and un release.if i select release button the view data in display mode only , it meaans in view one header information and one item table is there.in the second case when i select un release button the view data again in change mode.how can i achive this requirement.right now i can get the release status at runtime through radio button group by key ui element onselect action.now i need to impliment depends upon release information view data into change mode or display mode. for this can we use 'get_attribute_props_for_node' method from if_wd_context_node . if yes how can we pass parameters to this method and how can i achive my requirement through this.

i am very new for webdynpro abap .could any one suggests me on this and could any one can send sample code regarding this if possible.

thanks in advance for your reply

regards,

babu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rajasekhar,

Create on eattribute of type WDY_BOOLEAN and bind this to view elements REadonly property ( which you want to edit and display mode ). or Enabled proeprty. OR

If you are using Transaparent container bind TC enabled property, check as per your requirement.

Onaction of the radio button write code to edit or readonly by using SET_ATTRIBUTE method.

for ex : for edit mode... unreleased

lo_nd_segment1->set_Attribute(

name = 'CELL_DESIGN' // this is attribute of type wdYbooelan.

VALUE = ABAP_TRUE ).

released..

lo_nd_segment1->set_Attribute(

name = 'CELL_DESIGN' // this is attribute of type wdYbooelan.

VALUE = ABAP_FALSE ).

Cheers,

Kris.

Former Member
0 Kudos

hi kris ,

thanks for your reply.ok i got one more dought .how can i set display and change modes for a tbale in this view.why because i have some individual attributes and one table also there.and if possible could you send me the sample code how can we pass the parameters to 'GET_ATTRIBUTE_PROPS_FOR_NODE' method.

regards,

babu

Former Member
0 Kudos

Hi Rajasekhar,

Every attribute (input ) has a property READ ONLY and in table every field if it is input has READONLY property. bind this proeprty

to attribute created of type wdy_boolean.

Why you are using 'GET_ATTRIBUTE_PROPS_FOR_NODE' i am not getting.

There is not much code here.. You ahve to create one attribute in context of type wdy_boolean.

ex : lv_readonly of type wdy_boolean. and bind this to read only property of your individual and table fields.

in your onaction of radio button..code like this..

lo_nd_segment1->set_Attribute(
name = 'READ_ONLY'        // this is attribute of type wdYbooelan.
VALUE = ABAP_TRUE ).

released..

lo_nd_segment1->set_Attribute(
name = 'READ_ONLY'   // this is attribute of type wdYbooelan.
VALUE = ABAP_FALSE ).

Cheers,

Kris.

Former Member
0 Kudos

hi kris,

thanks for your valuable reply and it is working fine for individual attributes.but in my view i have displayed one alv table.

in this table i have to display one field in edit mode and remaining fields in display mode.now i am showing in that format only.

now when i press release button that edit mode field also in display mode and when i select un release option i need table in initial format means one field in edit mode and remaining in display mode.

regards,

babu.

Former Member
0 Kudos

Hi Rajasekhar,

For ALV you have to write some code like this.. follow this

lr_column = lr_column_settings->get_column( 'FIELD' ). // Field is one field you wnat to display in edit mode..

      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'FIELD'.
      lr_input_field->set_read_only( abap_true ).
      lr_column->set_cell_editor( lr_input_field ).

OR folow below

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a...

http://forums.sdn.sap.com/click.jspa?searchID=72897441&messageID=6805421

foolow LEkhas answer in this

also this..

Cheers,

Kris.