Skip to Content
0
Former Member
Nov 03, 2011 at 10:40 PM

Performance Issue

101 Views

Hi,

I am facing peroformane issue with faglflexa table select statement,.

In table there is standard index 3 'Index using BSEG key' ( index fields Sequence : RCLNT BELNR RBUKRS GJAHR BUZEI RLDNR DOCLN ), but i have only few index fields match with the BSID table..

Please help to correct if the below select statement is incorrect in performance point of view.

SELECT ryear docnr rbukrs buzei prctr hsl segment INTO TABLE it_faglflexa

FROM faglflexa

FOR ALL ENTRIES IN it_bsid

WHERE docnr EQ it_bsid-belnr

AND rbukrs EQ it_bsid-bukrs

AND gjahr EQ it_bsid-gjahr

AND ryear EQ it_bsid-gjahr

AND buzei EQ it_bsid-buzei.

Also i am trying to read the above internal table as below to fetch segment field from it_faglflexa , please correct if i am doing wrong.

it_output contains bsid data.

Loop at it_ouput into wa_output.

IF wa_output-profit_cntr IS INITIAL.

READ TABLE it_faglflexa into ls_faglflexa with key rbukrs = wa_output-bukrs

docnr = wa_output-document_no

ryear = wa_output-year

buzei = wa_output-buzei.

if sy-subrc eq 0.

wa_output-segment = ls_faglflexa-segment.

endif.

endif.

endloop.

Thanks

Sireesha

Edited by: Sireesha_SAP on Nov 4, 2011 3:21 AM

Edited by: Sireesha_SAP on Nov 4, 2011 3:24 AM

Edited by: Sireesha_SAP on Nov 4, 2011 3:25 AM