0

I've created a report that contains a selection screen that has select options for fields like : kunnr,sortl etc from standard SAP tables.

In addition, I've created a variable that sums a few fields from a table. Now I need to add a select option for this field so I can run the report searching By the amount I will enter in it(range or specific amount). I've searched the web and haven't found a solution.

Would really appreciate any help. Thank you!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Assaf
  • 63
  • 4
  • 11
  • 1
    It's all about the SELECT-OPTIONS principle, to be used with the IN operator. Is it really your question, or is your question about how to perform a IN **on a SUM** in the SELECT? – Sandra Rossi Nov 01 '18 at 09:19

1 Answers1

1

Following is suggestion for your case.

Tables: KNA1,EKKO.
SELECT-OPTIONS:  so_kunnr FOR kna1-kunnr.
                 so_amt FOR ekko-dpamt.

**********
SELECT * FROM KNA1 WHERE kunnr IN so_kunnr

********** Variable Amount
   IF  lv_var IN so_amt.
******** Your Logic
   ENDIF.

regards,

Umar Abdullah

Umar Abdullah
  • 1,282
  • 1
  • 19
  • 37
  • When for example I do: so_kunnr FOR kna1-kunnr. Then in the SELECT * FROM KNA1 I write WHERE kunnr IN so_kunnr. What should I do in my case? – Assaf Nov 01 '18 at 07:27