Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

help in performence

hi,

i need help in performance because this program is runtime is to much:

Regards


SELECT    vbrk~vbeln vbrk~vbtyp vbrk~fkdat vbrk~netwr vbrk~waerk vbrp~kvgr3 tvv3t~bezei dd07v~ddtext
      FROM ( ( ( vbrk
      INNER JOIN vbrp ON vbrp~vbeln EQ vbrk~vbeln
          AND vbrp~posnr EQ '00010'
          AND vbrp~ps_psp_pnr EQ l_project )
    LEFT OUTER JOIN

        tvv3t ON tvv3t~kvgr3 EQ vbrp~kvgr3
        AND tvv3t~spras EQ sy-langu )

    LEFT OUTER JOIN
        dd07v ON dd07v~domname EQ 'VBTYP'
        AND dd07v~ddlanguage EQ sy-langu
        AND dd07v~domvalue_l EQ vbrk~vbtyp )

    INTO TABLE sdprojectinvoice

    WHERE vbrk~rfbsk EQ 'C'
          AND vbrk~fksto EQ ''
          AND vbrk~sfakn EQ ''.


Tags:
Former Member
replied

Hi,

Sorry ... please try this.

TABLES: VBRK, VBRP, TVV3T, DD07V.

SELECT vbrk~vbeln vbrk~vbtyp vbrk~fkdat vbrk~netwr vbrk~waerk vbrp~kvgr3
FROM vbrk 
INNER JOIN vbrp ON vbrp~vbeln EQ vbrk~vbeln
               AND vbrp~posnr EQ '00010'
               AND vbrp~ps_psp_pnr EQ l_project
INTO TABLE sdprojectinvoice
WHERE vbrk~rfbsk EQ 'C'
  AND vbrk~fksto EQ ' '
  AND vbrk~sfakn EQ ' '.
 
LOOP AT sdprojectinvoice.
  SELECT SINGLE bezei
  INTO tvv3t-bezei 
  FROM tvv3t
  WHERE kvgr3 EQ sdprojectinvoice-kvgr3
    AND spras EQ sy-langu.
 
  IF sy-subrc = 0.
    sdprojectinvoice-bezei = tvv3t-bezei.
  ENDIF.
 
  SELECT SINGLE ddtext
  INTO dd07v-ddtext
  FROM dd07v
  WHERE domname EQ 'VBTYP'
    AND ddlanguage EQ sy-langu
    AND domvalue_l EQ sdprojectinvoice-vbtyp.
 
 
  IF sy-subrc = 0.
    sdprojectinvoice-ddtext = dd07v-ddtext.
  ENDIF.
 
  MODIFY sdprojectinvoice.
ENDLOOP.

Regards,

Ferry Lianto

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question