Skip to Content
0
Former Member
Oct 24, 2006 at 05:03 AM

Performance Issue

30 Views

Hi,

Can anyone let me know where exactly the performance is getting slow in the below code. My final internal table here is <b>i_iflot</b>. It contains around 30000 Records to be displayed in the output. For less number of records the performance is good. But to display 30000 records its taking much time to process. Pls let me know where exactly i can change the code to improve performance. While in Debug mode i could not find any delay in executing the below statements.

SORT : i_iflot,

i_iflotx,

i_zcs_instal,

i_zcs_nct,

i_jest,

i_t25a3,

i_zcs_nc1.

*Populating Export table

LOOP AT i_iflot INTO w_iflot.

SELECT objnr stat inact FROM jest INTO TABLE i_inst_jest

WHERE objnr = w_iflot-objnr AND

stat = 'I0076' AND

inact = ' '.

IF sy-subrc NE 0.

SELECT objnr stat inact FROM jest INTO TABLE i_inst_jest

WHERE objnr = w_iflot-objnr AND

stat = 'E0004'.

IF sy-subrc EQ 0.

SELECT objnr stat inact FROM jest INTO TABLE i_inst_jest

WHERE objnr = w_iflot-objnr AND

stat = 'I0320' AND

inact = ' '.

ENDIF.

ENDIF.

IF sy-subrc <> 0.

installation_list-installation_number = w_iflot-tplnr.

installation_list-installation_old_name = w_iflot-old_name.

installation_list-installation_long_text = 'Text'.

IF module_number = 0.

i_advance_list2-superior_fun_location = w_iflot-tplma.

ENDIF.

IF module_number = 0.

i_advance_list2-installation_number = w_iflot-tplnr.

ENDIF.

CLEAR w_iflotx.

READ TABLE i_iflotx

INTO w_iflotx

WITH KEY tplnr = w_iflot-tplnr

BINARY SEARCH.

IF sy-subrc = 0.

installation_list-installation_name = w_iflotx-pltxt.

IF module_number = 0.

i_advance_list2-installation_name = w_iflotx-pltxt.

ENDIF.

ENDIF.

CLEAR w_zcs_instal.

READ TABLE i_zcs_instal

INTO w_zcs_instal

WITH KEY tplnr = w_iflot-tplnr

BINARY SEARCH.

IF sy-subrc = 0.

installation_list-lloyds_number = w_zcs_instal-zzlyod.

installation_list-inst_app_category = w_zcs_instal-zzinst_appl.

  • To get Installation Application category text

IF installation_list-inst_app_category = 'M'.

MOVE 'Ship Power' TO installation_list-inst_app_category.

ENDIF.

IF installation_list-inst_app_category = 'P'.

MOVE 'Power Plant' TO installation_list-inst_app_category.

ENDIF.

IF installation_list-inst_app_category = 'O'.

MOVE 'Others' TO installation_list-inst_app_category.

ENDIF.

installation_list-project_name = w_zcs_instal-zzshipyard_name.

installation_list-project_number = w_zcs_instal-zzinst_yardn.

installation_list-country_of_operation = w_zcs_instal-landx.

  • To display Sales area text

CLEAR w_zcs_nc1.

READ TABLE i_zcs_nc1

INTO w_zcs_nc1

WITH KEY zznc = w_zcs_instal-zznc

BINARY SEARCH.

IF sy-subrc = 0.

CLEAR w_t25a3.

READ TABLE i_t25a3

INTO w_t25a3

WITH KEY ww009 = w_zcs_nc1-zzsanew

BINARY SEARCH.

ENDIF.

IF sy-subrc = 0.

installation_list-sales_ares = w_t25a3-bezek.

ENDIF.

IF module_number = 0.

i_advance_list2-lloyds_number = w_zcs_instal-zzlyod.

i_advance_list2-project_name = w_zcs_instal-zzshipyard_name.

i_advance_list2-country_of_operation = w_zcs_instal-landx.

ENDIF.

ENDIF.

CLEAR w_zcs_nct.

IF installation_list-lloyds_number = '0000000000'.

REPLACE ALL OCCURRENCES OF '0' IN installation_list-lloyds_number WITH space.

ENDIF.

CLEAR w_jest.

READ TABLE i_jest

INTO w_jest

WITH KEY objnr = w_iflot-objnr

stat+0(1) = 'E'

inact = ' '.

IF sy-subrc = 0.

installation_list-operating_status = w_jest-stat.

IF installation_list-operating_status = 'E0001'.

installation_list-operating_status = 'Operating'.

ENDIF.

IF installation_list-operating_status = 'E0002'.

installation_list-operating_status = 'Not Operating'.

ENDIF.

IF installation_list-operating_status = 'E0003'.

installation_list-operating_status = 'Pending'.

ENDIF.

IF installation_list-operating_status = 'E0004'.

installation_list-operating_status = 'Scrapped'.

ENDIF.

ENDIF.

IF module_number = 0.

i_advance_list2-status = w_jest-stat.

ENDIF.

READ TABLE i_zcs_nct

INTO w_zcs_nct

WITH KEY zznc = w_zcs_instal-zznc

BINARY SEARCH.

IF sy-subrc = 0.

installation_list-resp_network_company = w_zcs_nct-zznct.

IF module_number = 0.

i_advance_list2-responsible_unit = w_zcs_nct-zznct.

ENDIF.

ENDIF.

CLEAR w_t005t.

IF module_number = 2.

APPEND installation_list.

SORT installation_list BY installation_name.

ELSE.

APPEND i_advance_list2.

ENDIF.

CLEAR installation_list.

CLEAR advance_list.

REFRESH i_cust_final.

ENDIF.

ENDLOOP.

Regards,

Madhu