Access to KONV
I would like to obtain a sum of discounts (which in our case is consistent with the "Condition type" KSCHL 'ZDPP' and 'ZDPX') to to send data to BW
I thought to do this as follows:
SELECT SUM(KBETR) into v_kbetr
WHERE KNUMV = VBRK-KNUMV
AND KPOSN = i_mc13vd0itm-posnr
AND KSCHL = 'ZDPP'
OR KSCHL = 'ZDPX'.
But as the table KONV is a cluster table, there are two problems:
1- I can't do SELECT SUM
2- I can't access by indexes (being cluster table) and I am afraid that the program, to try a lot of data, it dies.
I would like to make the selection with another table or with inner join of several tables because I think that it can be better than a select into table from konv and a loop.