Skip to Content

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

select statement

Hi experts,

Pls see the following select statement.

Iam getting AUFNR value from Z table.

  SELECT AUFNR FROM <b>ZCSPICKLISTGROUP</b> INTO TABLE
  T_HDR WHERE GRPNO = P_GRPNO.
IF NOT T_HDR[] IS INITIAL.
     SELECT MBLNR ZEILE MATNR MENGE AUFNR 
        RSNUM EQUNR ABLAD ZEILE
         INTO CORRESPONDING FIELDS OF TABLE T_DET
           FROM MSEG
           FOR ALL ENTRIES IN T_HDR
             WHERE <b>AUFNR = T_HDR-AUFNR</b> AND
                   <b>BWART = '981'</b>.
ENDIF.

Iam trying to get the values using AUFNR & BWART from MSEG.Since these fields are not key fields it is taking lot of time.Is it possible to put <b>indexing</b> for this table to increase the performance??

If it is possible Can any one tell me how to put indexing?

Thanks

Kaki

Tags:
Former Member
replied

Hi Kaki,

You can create indexes for the table in SE11.

Open your table and then in the menu Goto->Indexes.

In the popup, click the create button to create a new index.

You can ask your BASIS people to do this for you.

And use INTO TABLE instead of INTO CORRESPONDING FIELDS OF

in your select query...

Regards,

Wenceslaus.

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