cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform - sum if

Former Member
0 Kudos

Hello everyone,

In my smartform I have my internal table with the correct values and I want to sum it.

The question is I want to sum if the field z_docnr is equal to 2 or 3, because it corresponds to the values of the documents 21, 22, 23, 31, 32, 33.

It should be like this

2 200

21 50

22 0

23 150

3 10

31 3

32 2

33 5

Total: 210

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

It depends on the internal table is managed in your smartform, I suppose u have a loop for it, so u can create an abap node where u calculate the sum only if the value of field z_docnr is 2 or 3.

If you don't have a LOOP u need to create an abap node where u loop the table and calculate the sum.

MAx

Former Member
0 Kudos

Thank you, it solved the problem.

Answers (0)