cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro ABAP

Former Member
0 Kudos

hi ,

i have button in my table rows ,

when click on buttons iwant data relate to the row , not the row of lead selection .

pl send code for this , itried get_lead_selection( ) also .

its very urgent ..pll

thanks

setu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Setu,

In the action handler that you have defined for the button, use the following code:

data: lr_element type ref to if_wd_context_element,

ls_data type <your context node structure type>.

lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

lr_element->get_static_attributes(

importing

static_attributes = ls_data

).

Now the structure ls_data will have your row data.

Regards,

Nithya

mohammed_anzys
Contributor
0 Kudos

Hi Setu,

You could also use

CALL METHOD WDEVENT->GET_DATA

EXPORTING

NAME =

  • IMPORTING

  • VALUE =

.

Here the name indicates , the name of the attribute you want , where as the data indicates the values.For example in the row you have colum1,colum2....column5...

Here in this situation , if you want only one value of the row. You could use this rather than the one mentioned by Sascha..

CALL METHOD WDEVENT->GET_DATA

EXPORTING

NAME = 'Column1'

  • IMPORTING

  • VALUE = mydata

.

Thanks

Anzy

Former Member
0 Kudos

hi nitya ,

thank u for u r answer .

i solved tht problem .

i got another problem .

i hve a table and i am using onenteraction in one of the field .

so when i create new row and preeon tht field , i hve to find the index of tht row .

pl help on this naaa.

thanks in advance

Former Member
0 Kudos

Can you award points if the answers were helpful!

Thanks,

Nithya

Former Member
0 Kudos

defenetely i wii award.

pl help on tht ..

thanks setu

Answers (3)

Answers (3)

Former Member
0 Kudos

hi experts ,

i solved tht problem by usind wd_event .

thank u for u r answers .

Former Member
0 Kudos

U can do this.

U have used defined linktoaction and action handler.

Now on click of the button you can retrieve the row that u have click by Get_index() ,and u can read that the elements you want and bind it to the display element.I guess it helps.

Nirad

Former Member
0 Kudos

hi setu.

in the action handler method you defined for the button in your table row

you see the wdevent attribute in the signature.

Using this object you can access the current element which belongs to the row

the button was clicked in.

Data:
        lr_element            type ref to if_wd_context_Element.

lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

Use the method call as it is. 'CONTEXT_ELEMENT' is not a place holder for the name of the node. So do not replace it.

Cheers,

Sascha

Message was edited by:

Sascha Dingeldey

Former Member
0 Kudos

hi sascha ,

thank u very much ,

i placed the same code u have given .

thank u very much

.

i got another problem tht i want to find the index no of row .

the problem is

i am using on action enter in a field of a table .

so when i create new row and i enter on tht i want to read the index of tht row .

pl reply me ..

thanks in advance