cancel
Showing results for 
Search instead for 
Did you mean: 

Input field in Table

Former Member
0 Kudos

Hi Experts,

I have input field as my table column in my table. I have a requirement that when the user type something in the input field and after pressing Enter i have to calculate something and display result in another column in the same row.

I am trying to catch values the user entered in the Enter Event but i am not able to do it use the Lead selection.

Can you help on this....

Thanks,

Karthik

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Kanda, It worked...Thanks.

prasenjit_sharma
Active Contributor
0 Kudos

Karthik,

You'd have to use the event onEnter of the input field.Link it to the method to fetch the values entered from the object WDEVENT. You may test this in debug mode how the field value is captured.

Let me know if that works.

Regards

Prasenjit

Former Member
0 Kudos

Hi try the following code.

Use get static attributes to get the elements in a row

->DATA : lo_nd_cn_table TYPE REF TO if_wd_context_node ,

-> lo_el_cn_table TYPE REF TO if_wd_context_element ,

-> ls_cn_table TYPE wd_this->element_cn_table.

->* navigate from <CONTEXT> to <CN_TABLE> via lead selection

-> lo_nd_cn_table = wd_context->get_child_node(

-> name = wd_this->wdctx_cn_table ).

->** get element via lead selection

-> lo_el_cn_table = lo_nd_cn_table->get_lead_selection( ).

-> lo_el_cn_table->get_static_attributes( IMPORTING

-> static_attributes = wa_table ).

Former Member
0 Kudos

Mohamed, I think you dint get my point. i have an input field in my table and in the Event OnEnter i need to know which line they have entered value.

And its not selecting a row in the table.

Regards,

Karthik.

Former Member
0 Kudos

Hi Karthi,

Try this..

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

lo_el_items->get_static_attributes( IMPORTING static_attributes = ls_bbu_items ).

Now in ls_bbu_items will contain the data. U can do your calculation with this and use the below code to set the values.

lo_el_items->set_static_attributes( ls_bbu_items ).

Now your newly calculated values will be binded..

Thanks,

Mugundhan