I'm trying to fetch the invoice number form BSEG table.
The query is
loop at IT_BSEG2 INTO WA_BSEG2.
SELECT SINGLE BELNR FROM bseg INTO invoice
where BUKRS = WA_BSEG2-BUKRS and
GJAHR = WA_BSEG2-GJAHR and
BUZEI = '001' and
AUGBL = WA_BSEG2-BELNR and
KOART = 'K' and
SHKZG = 'H' and
lifnr = wa_bseg2-lifnr .
but its making performance issue. How i can increase the performance of this code.
Kindly give your valuable guidance.