cancel
Showing results for 
Search instead for 
Did you mean: 

fields must be filled and calculated

Former Member
0 Kudos

Hi Community,

for a requirement must the following be implemented.

There must be something like a table.

If the fields are filled by somebody , the program must perform the necessary calculations line by line

and finally in the last line the result must be displayed as sum.

I have no idea how do it. Can anyone in this help me help in this matter.

Regards

Ertas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

how else can I solve the problem.

Because there will be four or five ALVs on the page . Between the ALVs are dependancies

that means I will have three subtotal until the total sum at the last ALV

Regards

ertas

Former Member
0 Kudos

Ok, If you have three ALV's then also you can do with one Button.

In the onAction of Button, Sum up all the ALV's separetly and final add all to get total sum.

With one button also, it could be accomplished.

Thanx.

Answers (6)

Answers (6)

Former Member
0 Kudos

Thank you very much for all your answers.

I have still a question.

How can I let display the sum automatically after any user

enters values into the fields. Or is that not possible ?

Thx in advance for your kindly efforts.

Bye

ertas

Former Member
0 Kudos

hi,

After user enters the field, you have to create a button for which you have onAction and write the logic to get sum there.

Thanx.

former_member40425
Contributor
0 Kudos

Hi,

Go through to this [Link|]. There is same problem which you have.

i hope it helps.

Regards,

Rohit

Former Member
0 Kudos

I wuold rather like use ALV table but how can I mek it editable to insert values into the fields

regards

ertas

arjun_thakur
Active Contributor
0 Kudos

Hi Ertas,

Refer this thread:

Regards

Arjun

Former Member
0 Kudos

hi,

Refer this link : https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdabap/referencesandLinks

It has various Articles and code snippets regarding Editing an ALV.

Refer this thread to make Editable:

Thanx.

Edited by: Saurav Mago on Apr 22, 2009 2:34 PM

Former Member
Former Member
0 Kudos

HI,

->Make a Table UI Element with the no of columns you want.

->Bind this table with context Node having attributes(= no of columns).

->Insert Input field in the Table column so that user can enter values into it.

->Make a button and in the onAction of Button write the logic to sum up.

->For that, read the Context which is binded to your column and whose sum is required.

->Add all the values and show the result in OnAction of Button.

Also check standard component : WDR_TEST_TABLE .

Refer :

Thanx

arjun_thakur
Active Contributor
0 Kudos

Hi Ertas,

You can achive this reqirement by either using table UI element. But in that you have to write the code to get the sum of the values of a perticular column. Or you can use ALV table where you can use the AGGREGATION property of it to achive the desired functionality.

Refer the thread for sum functionality of ALV:

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Hi,

U can write the code for summation in the OnEnter event of the table.

In OnEnter method just sum the values.

Thanks

Pankaj