Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calcuation between Columns Of a table Ui Element.

Hi Expert,

I m Using a table for showing some data.there is one field is input field.i want to fill data in two more columns of that table.after the calculation.

let column 4 is Total Amount = Basic(i will give this at run Time) + hra(column 1) +Ta(column3)

so i want to get total Amount without using any button Ui Element in the 4th column .

if u have any proble plz help me.

Regards,

Susheel

Former Member
Former Member replied

Hi,

If you donot want to have the button for calculation then you need to use only the table events that are avaiable.

onColSelect

onDrop

onFilter

onLeadSelect

onScroll

onSelect

onSort

There is no ENTER event.

In this case you need to use the Events for that column selection, For the Input field of the table column there will be ENTER event write code in that and popuplate the other columns.

I mean for each Table columns, (BASIC/HRA/.._ that are Input fields create an event for ONENTER.

Popupate the total cost column in these events using the context element attribute in the event parameters.

But this will trigger only when the ENTER on those columns is clicked by the user. Check the user feasibility.

data:
 lr_element type ref to if_wd_context_element.
ls_element type  <<table structure>>.

lr_node->get_element( index =  ) "can be captured in the ENTER event parameters
lr_element->get_static_attributes( importing value = ls_element ).
ls_element-total = ls_element-HRA + ls_element-BASIC ...

lr_node->bind_element( lr_element).

Regards,

Lekha.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question