Skip to Content
1
Former Member
Jun 17, 2010 at 08:08 AM

into corresponding fields of table VERSUS into table

7390 Views

Hi,

I want the select statement outside the loop can any one write the performance to increase and select single statmenet should be outside the loop.

IF i_komfk-vbtyp CA 'PO'.              " debit/credit memo
    SELECT vbeln INTO TABLE ivbfa FROM vbfa
           WHERE vbelv = i_komfk-vbeln AND
                 ( vbtyp_n = '5' OR vbtyp_n = '6' ).



    LOOP AT ivbfa INTO ivbfa_wa.
      CLEAR: fksto_lv,sfakn_lv.


    SELECT SINGLE fkart fksto sfakn INTO (fkart_lv, fksto_lv, sfakn_lv)
           FROM vbrk
           WHERE vbeln = ivbfa_wa-vbeln.

      CHECK: sy-subrc = 0,
             fksto_lv IS INITIAL,
             sfakn_lv IS INITIAL.
      MESSAGE e310(zz) WITH fkart_lv ivbfa_wa-vbeln.
    ENDLOOP.
  ENDIF.

Moderator message: next time please use code tags and post in the correct forum. Also use more descriptive subject lines.

Edited by: Thomas Zloch on Jun 17, 2010 2:45 PM