Skip to Content
0
Former Member
Nov 27, 2008 at 10:08 AM

performance issue

20 Views

SELECT vbeln kunnr

FROM vakpa

INTO CORRESPONDING FIELDS OF TABLE t_vbak4

FOR ALL ENTRIES IN t_likp

WHERE kunde = t_likp-kunnr " Bill to

AND parvw = 'AG'

AND vkorg = p_vkorg

AND trvog = '4' " contracts

AND auart IN r_doc_type1 " doc type range

AND datbi GT sy-datum. " Valid-to date

IF NOT t_vbak4[] IS INITIAL.

SELECT vbeln kunnr vgbel auart

FROM vbak

INTO CORRESPONDING FIELDS OF TABLE t_vbak4

FOR ALL ENTRIES IN t_vbak4

WHERE

vbeln = t_vbak4-vbeln.

There is a performance issue with the second select statement.It is passing vaues into the same internal table t_vbak4 which is already appended by the 1st select statement.

How can this cause a performance issue?